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

catastrophic failure after enabling systemd in wsl.conf #8981

Closed
1 of 2 tasks
Sadra-jl opened this issue Oct 9, 2022 · 11 comments
Closed
1 of 2 tasks

catastrophic failure after enabling systemd in wsl.conf #8981

Sadra-jl opened this issue Oct 9, 2022 · 11 comments

Comments

@Sadra-jl
Copy link

Sadra-jl commented Oct 9, 2022

Version

Windows version: 10.0.25211.1010

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.68.1

Distro Version

No response

Other Software

No response

Repro Steps

installed pengwin from the windows store. enabled [boot] systemd=true in /etc/wsl.conf, shutdown wsl, and rerun wsl, after a few moments, I got the: "catastrophic failure Error code: Wsl/Service/CreateInstance/0x8000ffff "

note: systemd is working fine in arch Linux inside wsl with the same steps above.

Expected Behavior

expected to see the distro start successfully and work with systemd.

Actual Behavior

gets the error "catastrophic failure"
with Error code:" Wsl/Service/CreateInstance/0x8000ffff "

Diagnostic Logs

No response

@OneBlue
Copy link
Collaborator

OneBlue commented Oct 11, 2022

/logs

@ghost
Copy link

ghost commented Oct 11, 2022

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

Thank you!

@bangbang93
Copy link

Same problem for me.
WslLogs-2022-10-13_23-30-15.zip

@Sadra-jl
Copy link
Author

so sorry for the delay, I live in Iran, and, well government cut off our internet as they pleased.
anyway here is the log.
WslLogs-2022-10-13_19-56-20.zip

@ghost ghost removed the needs-author-feedback label Oct 13, 2022
@OneBlue
Copy link
Collaborator

OneBlue commented Oct 20, 2022

Thank you @Sadra-jl. Unfortunately I'm not seeing any WSL log entries in the file you shared. Did you reproduce the issue while the log collection was running ?

@josesa-xx
Copy link

josesa-xx commented Nov 3, 2022

I've used Windows 11 with Microsoft Store WSL preview (0.70.4.0) and tried to enable cgroupv2 by doing

WIN_WSLCONFIG=$(wslpath $(wslvar USERPROFILE))/.wslconfig
git config -f ${WIN_WSLCONFIG} wsl2.kernelCommandLine "cgroup_no_v1=all"
wsl.exe --shutdown

Problem shows when starting up.
WslLogs-2022-11-02_21-01-42.zip

systemd was already enabled and working.

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 3, 2022

Thank you @josesa-xx. Now I can see what's happening.

During boot, WSL tries to mount /sys/fs/cgroup/memory, but with cgroup_no_v1=all , this fail:

698	False	Microsoft.Windows.Lxss.Manager	GuestLog	0	11-02-2022 21:01:51.746	7920	"text: 	""[    2.493568] WSL (1) ERROR: Mount:1761: mount((null), /sys/fs/cgroup/memory, cgroup, 0x20000e ""
vmId: 	{4a81dc2a-f949-4fa4-b16c-abad63c1acbd}"	"	"				3384	5		00000000-0000-0000-0000-000000000000			

Which is why WSL fails to start

@YiuTerran
Copy link

Same problem here. Any idea to restore settings?

@josesa-xx
Copy link

josesa-xx commented Nov 18, 2022

If you have the same problem as me it should be simple to edit the file in %USERPROFILE%\.wslconfig and remove the line about kernelCommandLine

@ilan-schemoul
Copy link

1.0.1.0 fixed the issue in my case (my exact case was putting kernelCommandLine=cgroup_no_v1=all with systemd enabled, see #6662 (comment))

@OneBlue
Copy link
Collaborator

OneBlue commented Dec 9, 2022

Indeed this was fixed with 1.0.1. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants