-
Notifications
You must be signed in to change notification settings - Fork 823
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
all wsl.exe commands hang #4144
Comments
Run Things to try: |
@onomatopellan everything you suggest also hangs |
restarting fixed this, but obviously i don't know if it will happen again... |
I'm running 18917 inside a Hyper-V VM and it didn't happen to me yet. Next time you can try Process Explorer to see what's happening during the hangs. |
Seems related to issue #4047. |
It occasionally happens on my PC running 10.0.17763.740. |
Seeing this with 10.0.19013.1. |
Observed 10.0.19041.388.
|
Also facing this issue recently. I also tried restarting my laptop, but still, the issue persists. Windows: Version 10.0.19041.450 |
Also experiencing this with |
I'm also running into this problem on 10.0.20211.1000, restarting the host machine (maybe a couple of times) usually does the trick. |
Started happening recently, all |
same issue, except wsl --help is hanging as well [Version 10.0.19041.572] if that helps edit: double restart fixed it for now |
I had this problem too. Trying to install an image would get stuck in the Installing state, or converting an image from WSL1 would report the error "the operation could not be started because a required feature is not installed." The suggestion of disabling the override of Control Flow Guard in this comment solved the problem: #4626 (comment) |
same issue, all |
same issue, all wsl commands (including wsl --help) hang for a long time and then return with:
Which looks like this same issue described on superuser OS: Windows 10 No updates to Windows in past eight days, yet this issue begins out of the blue... |
Update: Disabling Hyper-V seems to have solved my issue. Or rebooting six or eight times; I guess I won't ever know. Details Results Theory Pro Tip |
This is another long-running issue that encapsulates many separate issues with a similar symptom. Since the original issue, we have fixed many things that could display that symptom. I'm going to close this issue so that we can accurately track new issues and not lose anything. If you see an issue with unstable Hyper-V or a hang in LxssManager, please file a new issue so we can gather logs and get it fixed. Thanks! |
Managed to fix the issue by disabling all WSL related features, rebooting, then enabling them again and rebooting once more. |
Disabled Hyper-V plus WSL -> reboot -> enable them again -> reboot solved my issue! |
I reproduced the issue, and it stops all commands from working, try not breaking your WSL dist. |
also try restarting your PC |
@JohnCido Can confirm, I did what you said, to fix my issue after upgrading from Windows 10 to Windows 11. Docker Desktop, Hyper-V, and WSL 2 were already installed on Windows 10 prior to the upgrade. I wondered if a change in OS version causes the WSL to fail? |
I have this issue on fresh Windows 11 install (not upgraded from Windows 10), so it's probably not related to a previous upgrade. |
As of 23 Apr 2022, this issue persists. I have encountered it a couple of times since I started using WSL in late 2020. |
WSL worked on my machine on Friday. I shut down for the weekend and started up on Monday and I experienced the issue described in this thread. WSL Ubuntu-20.04 hangs when try to start Ubuntu from the windows search menu I shut down my pc and started it after 30 minutes but this WSL issue persisted. |
I created gist that kill/restart everything related to Docker/WSL and restarts, for me, regardless of the source issue - this successfully unlocks wsl and docker - https://gist.github.com/alkuzad/438993ecfea601cd56536bc360e5f581 |
I have neiher Hyper-V enabled nor lxssmanager running yet my WSL is totally dead. Any tips for me? |
|
Issue still persists, and I am tired of doing this over and over again when everything hangs. Becomes annoying reaaaally quick. and I was here last month again. this is the only reason I choose bare metal over WSL, this critical issue is here FOR ONE WHOLE YEAR. and yeah this comment is for bumping the issue. |
Shutting down and then booting back up did not fix the issue. But a "restart" immediately fixed the issue. Apparently it is not always the same in Windows to shutdown and boot up again as it is to restart. I tried several times to shutdown and then start and that didn't work, but one true "restart" of Windows fixed it. |
You need to untick "Turn on fast startup" in control panel -> hardware and sound -> power options -> system settings |
There is no such option. |
Strangely this happened to me just now, first time trying WSL2. Started when I ran wsl --shutdown and it didn't respond. After reading a lot of stuff, I landed on LxssManager service in services.msc and saw it was stuck at "stopping". Did this on my experiments build - used ProcessHacker to simply terminate the svchost instance that was running LxssManager and started the service again. WSL commands instantly started working again. Not sure if this can cause any data loss but this worked without restarting once or without disabling anything. Keep in mind I'm using KProcessHacker3.sys driver with unrestricted access for full control... trying to kill the process with other methods might result in some sort of access denied message. You can also try with a command prompt running as SYSTEM to do this but I haven't tested it yet. It's been a while since I've updated this build, happened on Windows 10 OS Build 19044.2816 and v21H2. Hope this helps if someone wants to deal with this without rebooting or disabling/re-enabling features :) |
in my case this caused an immediate BSOD 😭 |
People still fly by to this issue and can replicate it, why is this closed? |
This is still happening on 19044.3086 on Windows Enterprise. |
@guillemdj's comment works for me C:\Windows\System32>taskkill /f /im wslservice.exe
SUCCESS: The process "wslservice.exe" with PID 6424 has been terminated. During this operation, a crash occured... it may help WSL team to understand the issue
You can also collect logs with - https://github.com/microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1 |
Just encountered this on |
Happened just now, all wsl commands hanging except |
Same here, can't use wsl anymore, no matter what I try |
This worked for me. Thanks! |
I used the following command to shut down the LxssWanager service to solve the problem. |
Thank you.... it worked for me..
|
I'm on Windows 10 so that might be the difference, but when I tried to kill this in the task manager, it displays me It's worth stating that after I followed the recommended steps, it didn't make a difference: wsl.exe still hangs.
I'm on Windows 10. Would anyone be able to explicitly list these features/services that should be disabled? I don't know if I'm doing it right because after restarting, WSL and the same set of hyper-v services were enabled automatically. UPDATE: It turns out "features" in these comments refer to Start Menu > Turn Windows Features on or off. Windows 10 has many settings with "features" in the name, so I wanted to disambiguate this detail for others. I still don't know what "WSL related features" means as it could mean many things. I'm assuming these: |
I can really only replicate this problem by opening vscode from wsl/ubuntu and then forgetting to close the window when I let my computer go to sleep at the end of the workday. Coming back typically wsl has hung, won't respond to Using |
Killing |
thought my gmail glitched wtf is that name lmao, also I never got BSOD when killing wsl.exe, don't kill wslservices.exe |
what revived it in my case was killing of all wsl related processes in taskmgr, then restarting lxssmanager service. It seems like every weekly windows update and subsequent mandatory restart (this is on a company laptop) messes it up. You also dont need to have hyper-v in enabled in features, just wsl and virtual machine platform. |
I have the same issue. I have even uninstalled any distros, disabled all features, rebooted, enabled the features, rebooted, and tried to reinstall the distro. It hangs still. I am on Win 11 with latest updates. At this point, I am looking at reinstalling Windows.... |
for me I had this caused all the wsl commands ( after stopping the rclone service wsl began working again. |
Having the same issue with Window 10 Version 22H2 OS build 19045.4651. My issue was the my physical hard drive ran out of memory while I was using VS Code and building docker images. This comment tipped me off:
I right clicked on my terminal and Ran as Adminstrator then ran the command above. In the same terminal I then ran From there I was able to open WSL by either opening up the Ubuntu app from the start bar or typing |
Constantly experience this Issue, regardless reboots.
|
Please fill out the below information:
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.18917.1000]
$ wsl.exe --help
$ wsl.exe -d Debian
etc...
Example with
--help
passed (screenshot taken 30s after running command)wsl.exe
should not hang.The text was updated successfully, but these errors were encountered: