Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible for barco to support WSL2 as well? #3

Open
tanyeun opened this issue Aug 16, 2023 · 6 comments
Open

Is it possible for barco to support WSL2 as well? #3

tanyeun opened this issue Aug 16, 2023 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tanyeun
Copy link

tanyeun commented Aug 16, 2023

Great project btw

I was able to compile on WSL2
Distribution: Ubuntu 22.04
Kernel: 5.15.90.1-microsoft-standard-WSL2

but when I ran the example, it gave me to following error:
image

@lucavallin
Copy link
Owner

Hey @tanyeun! Thanks for opening the issue - it's nice to see people are cloning the project and testing it out ;)
Unfortunately I don't have a way to test barco on WSL2, but I will add a few labels to the issue to invite contributors to look into the problem and hopefully come up with a solution.

@lucavallin lucavallin added enhancement New feature or request help wanted Extra attention is needed labels Aug 17, 2023
@lucavallin
Copy link
Owner

Hey @tanyeun! I just noticed the 5.15.90.1-microsoft-standard-WSL2 and I am thinking, is 5.15.90.1 the Linux Kernel version? If so, that might be the issue: I tested barco on version 6.1.0 and it's possible that 5.15.90.1 does not support cgroups v2 by default yet. If possible, you could try and manually enable cgroups v2: it might help!

@tanyeun
Copy link
Author

tanyeun commented Sep 3, 2023

Hi @lucavallin

My default linux kernel version is

5.15.90.1-microsoft-standard-WSL2

But I was not able to load linux modules so I follow the suggestions from this post

https://unix.stackexchange.com/questions/594470/wsl-2-does-not-have-lib-modules

to rebuild the bzImage, now my kernel version is

5.15.123.1-microsoft-standard-WSL2+

I turned on the debug message. The issue was I was not able to create this file

/sys/fs/cgroup/barcontainer

mkdir(cgroup_dir, S_IRUSR | S_IWUSR | S_IXUSR)

although this function call return 0, the actual file didn't create.

I tried to change the path to another folder under my home directory.

the function returns -1 but the acutal file created.

I am not sure why.

@lucavallin
Copy link
Owner

Hey @tanyeun! I am not entirely sure, but it seems it could be an issue with cgroups in WSL. I found this question on SO that might help: https://stackoverflow.com/questions/73021599/how-to-enable-cgroup-v2-in-wsl2. Let me know how that goes!

@yangjinhao1234
Copy link

have solve this problem?
i have the same question. and after i debug, i find barcontainer can be created , but
fd = open(setting_dir, O_WRONLY) can be breate, seem like cant create cgroup file in wsl2?
can anybody help me ? Or i should find a linux pc

@ghost
Copy link

ghost commented Sep 11, 2023

My kerver version is Linux version 5.15.0-83-generic, seems the problem is from WSL2.

Repository owner deleted a comment from hyassine1 Mar 18, 2024
Repository owner deleted a comment from 7empestx Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants