Repository navigation
Description
Windows Version
Microsoft Windows [Version 10.0.19045.3930]
WSL Version
2.0.14.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
I can't run wsl.exe --status right now because wsl is hanging
Distro Version
I can't run lsb_release -r right now because wsl is hanging
Other Software
wsltty, updated earlier today while experiencing this problem: https://github.com/mintty/wsltty/releases/tag/3.7.0.2
Repro Steps
Unfortunately I can't reproduce this consistently. After a fresh restart, wsl.exe / Ubuntu usually behave as expected, but after hours of uptime, wsl.exe hangs.
Normally I don't wait for it to finish: it can take up to 30 minutes before a wsl.exe command completes, and it doesn't always result in resolving the problem when it does complete. Sometimes it errors, sometimes wsl.exe starts an ubuntu prompt.
Expected Behavior
I would like wsl.exe to immediately respond with correct output. e.g., if I run wsl.exe --status, I would like to immediately see that response.
If wsl.exe can't be run for some reason, I would like it to fail fast instead of 30 minutes later. I've been waiting 20+ minutes for wsl.exe --status to complete as I write this up, but I will probably restart my computer before it finishes because it is blocking my ability to work.
Actual Behavior
Occasionally, any wsl.exe command will hang for 10s of minutes before showing any output.
Diagnostic Logs
-
WslLogs-2024-01-23_15-16-07.zip These first logs prompted me to create this issue. I ran
wslin an administrator cmd.exe and it took a very long time to complete. I captured the log while it was hanging and then noticed it completed. This seemed unique enough to share, as I haven't noticed other issues saying it worked eventually after waiting long enough: it opened up a wsl command prompt (2nd line of screenshot).The first line occurred after I manually killed the wsl service in the task manager (shown in this screenshot) then ran
wsl:Eventually it errored with
Server execution failed\nError code: Wsl/0x80080005. I tried again and it hung for 10+ minutes, but then it opened up the wsl command prompt. All of the other commands worked immediately except for the very last line (i.e.,wsl.exe --status). I'm still waiting on that one and it feels like it's been ~45 minutes at this point. -
WslLogs-2024-01-23_15-28-12.zip The second logs were generated when I ran
wsl.exe --statusand it was hanging 1-20 minutes when I collected those logs (sorry I'm not timing it exactly). -
Just in case it may help, WslLogs-2024-01-23_16-04-16.zip these logs are of the same hanging
wsl.exe --statuscommand. This one is around 20-45 minutes since it started. -
wsl.exe --version:WSL version: 2.0.14.0 Kernel version: 5.15.133.1-1 WSLg version: 1.0.59 MSRDC version: 1.2.4677 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.3930 -
I'm not sure if this should be running in the latest WSL2 versions, but whenever these symptoms occur, I've noticed that the
vmmemprocess is no longer running in the task manager. -
I'm sure there's way too much information in here as it is, but I decided to thoroughly document a similar troubleshooting experience I had a few weeks ago. Perhaps it'll provide some useful information: https://superuser.com/questions/1825580/how-do-i-troubleshoot-an-unresponsive-wsl2-on-windows-10
After system restart 1 of n
wsl was working fine for ~20 minutes, but now everything is hanging like before. Here's a fresh log:
WslLogs-2024-01-23_17-56-57.zip
After system restart 2 of n
I can get some of this information now.
Kernel Version
Default Distribution: Ubuntu
Default Version: 2
Distro Version
No LSB modules are available.
Release: 24.04


Activity
github-actions commentedon Jan 24, 2024
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please 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. Thank you!
Open similar issues:
Closed similar issues:
DanKaplanSES commentedon Jan 24, 2024
My
wsl.exe --statusis still hanging. I think this means I've experienced two separate issues here:And just to provide as much helpful information as I can, I'm going to create yet another WSL log right before I restart:
WslLogs-2024-01-23_17-04-47.zip
It might help to show the times in which I created these logs:
re: the bot's links
As far as I can tell those issues weren't exactly the same as mine. This one appears to have the most helpful information, mainly the second half of the comments: #4144 I use the word "appears" because I tried one and it didn't fix the problem:
I looked into my
services.mscand saw that LxssManager was stuck in a "Stopping" state.After I killed it, I opened a new wsltty terminal and it's hanging like before. I don't plan to stick around long enough to see if it eventually finishes; I'm going to restart my computer now.
DanKaplanSES commentedon Jan 25, 2024
I tried the other major suggestion from #4144
It did not fix the issue.
I ran
sfcanddsim(sp?). The former found nothing. The latter found something and fixed it, but it did not fix the issue, even after restart.DanKaplanSES commentedon Jan 25, 2024
Okay I decided to
wsl --exportand reinstall everything with these steps: https://gist.github.com/4wk-/889b26043f519259ab60386ca13ba91bEverything was working fine with my new install. Then, I these last two steps, then the permanent hanging issue immediately came back:
1.
I modified my
/etc/wsl.confto change the user back to what it was (See https://learn.microsoft.com/en-us/windows/wsl/basic-commands#change-the-default-user-for-a-distribution )2.
wsl --update.It was this:
PS C:\Windows\system32> wsl --version
WSL version: 2.0.9.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3996
It became this:
PS C:\Windows\system32> wsl --version
WSL version: 2.0.14.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3996
Now I'm stuck at
PS C:\Windows\system32> wsl
WslLogs-2024-01-24_23-28-12.zip
It might be worth noting vmmem is running in the task manager again.
Without reinstalling WSL, I killed WSL in the task manager, unregistered my imported distro, reimported it, set the user to the original value. I'll report back if it happens yet again.
If it does happen again, next I'll try reinstalling WSL without running
wsl --upgrade.It seemed to be working all right until I noticed vmmem was using 1.5 gigs, so I ran
wsl --shutdown. This command hung indefinitely. I don't know what's stopping it from completing because I don't see anything in my services.msc that are trying to stop and I don't see wsl mentioned in my task manager.Guess I'll reinstall everything from scratch again.
DanKaplanSES commentedon Jan 26, 2024
okay I followed these steps again but skipped the
wsl --upgradestep. I added one additional variable this time: I turned off the hyper-v feature and restarted and turned it back on again and restarted.So far so good. Up to this point I could reproduce these problems in one tenth of the time and in one tenth of the attempts to trigger it.
wsl --shutdownran and completed instantly, too.I'm willing to run
wsl --upgradeto remove that last variable, but hopefully the log files have given enough information to troubleshoot.OneBlue commentedon Jan 30, 2024
/dumps
DanKaplanSES commentedon Jan 30, 2024
Blue (@OneBlue) I've attached six log files throughout this thread. You can find them by searching for ".zip" in your browser. Let me know if they are missing information. Thanks
DanKaplanSES commentedon Feb 1, 2024
Blue (@OneBlue) Hope you don't mind the second ping so soon. Let me know how else I can help, because I think I'm in a good position to do so!
OneBlue commentedon Mar 13, 2024
Daniel Kaplan (@DanKaplanSES): I'm not seeing any dumps in the zip files, I think given that the symptoms what we need is a dump of the WSL processes while things are 'stuck'. /dumps
DanKaplanSES commentedon Sep 22, 2024
I noticed vmmem was taking up ~40% of my ram so I ran
wsl --shutdownand it hanged as described above. I started capturing the dump, opened up the wsltty terminal, then waited a few minutes before I stopped capturing.I don't know if that counts as a reproduction since I couldn't start logging before it occurred, but it does look like this zip files has more files than some of the others.
WslLogs-2024-09-21_21-20-58.zip
If you need me to start capturing before it occurs, I might need to run the capture script for hours or even days. I can't consistently reproduce this. I am willing to do this if it helps, but I'd prefer not to as I assume it'll slow down my system to have it running. Let me know.
github-actions commentedon Sep 22, 2024
Diagnostic information