-
Notifications
You must be signed in to change notification settings - Fork 834
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
systemd >= 256 needs plain cgroupv2 support #11857
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
|
I can't collect logs from my system right now, so for now I'll just refer to the ones from #11739 which has the same cause: https://github.com/user-attachments/files/16076419/WslLogs-2024-07-02_20-47-17.zip |
Diagnostic information
|
Very interesting. By enabling the debug console (
This matches the fact that I am seeing systemd do nothing during 30s, then finally really start its services and be visible. There are some other interesting things to notice.
Now by enabling memory reclaim (in
Apparently the system is started with cgroup v2.
In this case, systemd starts immediately (without the warning), and everything works as was previously (with cgroup v1) in systemd v255. Alternatively, as commented in issue #6662 (comment), enabling the following kernel parameters (again in
So there are two ways to have WSL+systemd v256 work correctly by having WSL use cgroup v2. |
Yeah. If there's nothing or almost nothing left that requires cgroupv1, then just switching to cgroupv2 fully by default is the proper solution. Otherwise it might need some new parameter in wsl.conf that specifies whether a distro needs cgroupv1 or v2. I'm not sure whether it's possible to have a cgroupv1 container next to a cgroupv2 container with cgroup namespaces though. |
I got something more. |
The linux kernel doesn't do anything with systemd parameters. systemd just looks at In any case, this is unrelated to the issue here. |
Windows Version
Microsoft Windows [Version 10.0.19045.4291] (11 is affected the same way)
WSL Version
2.2.4.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.153.1-2
Distro Version
openSUSE Tumbleweed
Other Software
No response
Repro Steps
wsl --shutdown
wsl systemctl is-system-running
Expected Behavior
wsl systemctl is-system-running
should immediately reportrunning
.Actual Behavior
wsl systemctl is-system-running
fails with an error likeFailed to connect to bus: No such file or directory
.Executing
wsl systemctl is-system-running
again will eventually succeed and returnstarting
andrunning
.Diagnostic Logs
This is because of systemd/systemd#32998. The host VM uses a "hybrid" cgroupv1 support, which is no longer supported by systemd >= 256 (https://github.com/systemd/systemd/releases/tag/v256-rc3).
As systemd is running in a container here ("wsl"), it warns about this by showing a message for 30s before booting. This triggers the
/sbin/init failed to start within a 10000ms timeout
warning and the command is executed before systemd is up.The text was updated successfully, but these errors were encountered: