Open dennisameling opened 2 years ago
Unfortunately the workaround that requires admin is not helpful for users without admin privileges. Need to reboot.
Upgrading to the latest Windows (Version 10.0.22621 Build 22621) seemed to made the problem go away for me.
Hi, this happens to me too. Please reopen the issue.
How to fix this issue?
It happens when I try to restart wsl2 to work around the notorious inter op broken issue (https://github.com/microsoft/WSL/issues/5065). wsl --shutdown
just get stuck and if I cancel it with ctrl+c, I cannot even enter the wsl environment again.
wsl --shutdown
just works well when inter op is OK, which makes me think those 2 issues may have some connections.
I'm having a similar (the same?) issue. WSL execution stuck, but I have ~0 CPU usage, and cannot use wsl --shutdown. Please reopen and do not automatically close after 7 days.
Similar issue, in my case this happens 100% of time when waking up the computer from sleep. This is happening since a Windows and/or WSL update 1-2 months back. The only solution which works (apart from restarting Windows) is:
taskkill /f /im wslservice.exe
.
Docker Desktop then prompts me to restart it.
It's really annoying as I have to reopen all my console windows and VS Code.
WSL version: 1.0.3.0 Kernel version: 5.15.79.1 WSLg version: 1.0.47 MSRDC version: 1.2.3575 Direct3D version: 1.606.4 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22623.1037
Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy
Happening quite often recently after starting to use IntelliJ Remote Development with WSL
taskkill /f /im wslservice.exe
helped
This started happening to me after upgrading WSL to the Microsoft Store version. Interestingly, when the problem occurs, both of my distributions (Ubuntu and Debian) hang and CPU usage goes to 80-90%.
The only way to (temporarily) solve the problem is to open a PowerShell shell as administrator and use taskkill /f /im wslservice.exe
.
Same issue here. Using WSL2...
wsl --shutdown
hangs as does any other wsl
command.
taskkill /f /im wslservice.exe
results in ERROR: The process "wslservice.exe" not found.
How to properly force kill/restart WSL in this situation without rebooting?
I can confirm that this issue also haunts me. This occurs whenever my laptop goes to sleep.
Suspending the WSL does not help. Only killing it with taskkill /f /im wslservice.exe
helps until the next system wake-up.
I'm using Docker, so I must restart a docker service.
Could you also share the output of
wsl.exe dmesg
?Thanks!
https://github.com/microsoft/WSL/issues/8529#issuecomment-1169249606
All commands hang, including wsl dmesg
I've been having the same issue; in my case, I managed to solve it by running "wsl --shutdown" (which hung), and then restarting docker desktop from the task tray.
Yep, all commands hang, including wsl dmesg. Please fix this once and for all, I have work unaccessible within wsl.
Since this issue is closed, it may not receive much attention from from the maintainers. If there is someone who can reproduce this issue and is willing to keep interacting with the ticket to keep it open, it might make sense to file a new issue (not sure if this is best advice but what else can we do?). You can reference this ticket in the new one...
@craigloewen-msft Could you please reopen this?
This looks like a follow-up of the same issue that is currently open.
As a palliative solution. I managed by removing Docker Desktop and WSL installation in Windows Features, then installing all again. Of course don't forgot to make a backup of the .docker folder
I put my PC into sleep every night so here i am.
I also had this issue on Windows 11. Using the taskkill command helped.
Day or two ago the issue started. each time laptop return from sleep WSL terminals are closed. new terminals are not starting. wsl --shutdown is not working. taskkil work some times .. at some point i have to restart to fix the issue.
biggest issue is that i am using recommended very low sleep / hibernate timeouts to save power as suggested by windows 11 itself both on battery and AC so .. each quick talk with someone lead to WSL kill and open everything again.
You probably have LxssManager service stuck at stopping state like me and only Windows restart helps.
What I did to make WSL2 and Docker usable on Windows 10 (latest) on a daily basis, since I cannot work without minikube cluster running in Docker, is I always stop containers in Docker before I put my laptop to sleep. I also use Ubuntu 18.04 for WSL2 purposes. I have .wslconfig set up to restrict both swap and memory to bare minimum I need to run a minikube cluster, because WSL2 will drain every single bit of RAM you allow it to. And I also use Ubuntu script to clear swap and ram that I trigger from time to time over bash to release excessive ram usage by vmmem process.
I know it's not a proper solution, but a workaround, but I cannot wait for something that doesn't exist, need to make a buck, after all. I have been testing this approach for around 2 weeks now and it hasn't failed on me so far and I never shut down my business laptop, it usually runs out of battery during weekend breaks, tho. So when I launch my laptop, I start docker container(-s), re-start minikube cluster on it, occasionally run Ubuntu clean up script and I'm good to go. Not a single WSL2 hang so far, nor excessive ram usage growin over time.
I have been trying to find a better/proper solution for like 2 days, no go. Everyone just says restart wsl or restart windows, as if that was a viable solution for software developers.
Experienced the same issue here with wsl --shutdown hanging and vmmemwsl with high CPU usage, all happening after a sleep of my laptop. A windows restart didn't help me. @craigloewen-msft I'm joining others in asking for you to please re-open this ticket, would be a huge quality of life improvement to not have to deal with these issues.
Same problem, access denied when trying to kill the process. I went to Services-tab in task manager, and stopped the "WsLService", the service auto-restarts but the process VmmemWSL is gone.
All good until it just happens again...?
I have a system with a WSL 1 system I ssh into, and a WSL 2 VM. I switch to the latter by running cmd
in the former, then wsl -d Debian
under CMD.
The latter recently has started to hang, the same way as described here. How can I fix that without losing the sshd on the WSL 1 system?
I just updated Docker, might have been the issue since the release notes mentioned WSL restart issues being resolved. Haven't put this to the test yet though.
davidsr2r dixit:
I just updated Docker, might have been the issue
Not here, not using Docker.
It came back for me :/
Also having this issue:
wsl --shutdown
in admin powershell hangswsl -l
hangsRestarting machine rectifies.
I've been experiencing the same issue for a whle now. I keep checking different threads to see if there's an actual fix and not just killing wslservice.exe.
What do we need to do to even get some acknowledgement?
I don't think it's as simple as a low memory thing as one user suggested - 16GB isn't pushing limits but I wouldn't say it's low.
I've got 32GB of RAM, DDR4 and DDR5 laptops and I'm facing this issue, especially when waking from sleep.
This is a relatively recent issue (in the last year) as I was not experiencing this in 2021 and 2022 on Windows 10 and early releases of Windows 11.
Update: I found that that specifically in my case the issue was likely due to a poorly written USB floppydrive driver. I don't think this is the case for everyone, but I thought I should mention.
@robindegen Details please? We use vscode dev containers and having to reboot or even wsl --shutdown
is killing us all slowly.
Same issue here (after restoring from hibernate), all wsl commands including wsl --shutdown
hangs (that helped previously, ~1-2 months ago), however taskkill /f /im wslservice.exe
was working without reboot.
We solved this issue by moving all dev machines and servers to real linux. Good bye M$
Also got this issue. CPU Usage of the Vmmem.exe process shoots up to 90% usage, seemingly at random.
taskkill /f /im wslservice.exe
works, but it's rather annoying to do this every time this issue occurs.
Hopefully there will be a fix one day soon, but I understand that identifying the source of this problem can be quite difficult and maybe this is an environment issue (Drivers, hardware, etc.).
@robindegen Details please? We use vscode dev containers and having to reboot or even
wsl --shutdown
is killing us all slowly.
Not much to say unfortunately. I have a usb floppy drive made from the finest chineseum and it was causing the problems for me. When I leave it unplugged I never have wsl issues anymore. When I have it plugged in, every so often the whole thing just locks up as described here. Must be a bad driver.
It also gives me this problem. wsl --shutdown does not work, terminal remains stuck on black screen, no output
The only way is to reboot the operating system
Hey @f-liva as a workaround try this one.
For me the problem may be fixed after updating to Windows 11 Version 22H2
. No VmmemWSL
hangs since a week 🤞
It worked thank you!
This error again appears - windows 10
Also happening here - lastest version of Windows 11, was fine up until about a week ago
Now every time I wake my PC from sleep WSL won't respond to any commands.
Have to do taskkill /f /im wslservice.exe
and then restart everything and docker desktop.
Restarted machine, and... already wsl is hungin on every command, using 30% cpu constantly
For wsl2 try:
on CMD with admin access:
` taskkill /F /FI "IMAGENAME -eq wsl.exe"
taskkill /F /FI "IMAGENAME -eq wslhost.exe"
taskkill /F /FI "IMAGENAME -eq wslservice.exe" `
For wsl2 try:
on CMD with admin access:
` taskkill /F /FI "IMAGENAME -eq wsl.exe"
taskkill /F /FI "IMAGENAME -eq wslhost.exe"
taskkill /F /FI "IMAGENAME -eq wslservice.exe" `
This worked for me.
Running taskkill /f /im wslservice.exe
would complete but not help with resizing the VHD, the optimize command would say the disk is still in use despite wsl --list --verbose
saying Ubuntu wasn't running.
Facing same issues, Couldn't end process (vmmem) from task manager, it says access denied, also powershell command to taskkill also says process not found.
Same problem. It's running under a different user . Some kind of 036A94A8-1418-9295-A028AEFF305F
So I can't kill it even from Admin prompt / Admin Task Manager
taskkill /f /im wslservice.exe
helped
$ wsl --version
WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2604
This issue still exists, it surprises me a issue affecting so many people is closed..
Same here @ddonov, when docker desktop is running and notebook awakes from sleep.
My workaround is to kill the wslservice.exe in a admin powershell:
taskkill /f /im wslservice.exe
Thanks for the command, now we are running this command instead of rebooting all the time
Update here - we have identified a couple of causes of the vmmem process geting into this state (which also causes the wslservice executable to stop responding). Unfortunately, these issues are in the Windows OS, so we're working through the process of backporting the fixes.
It's been months, I am facing same issue, when laptop goes sleep and come back then this issue start appearing
follow up because i wrote some time ago. my issue disappeared 2 days ago. i did not have CPU issue but each sleep / hibernate lead to WSL2 to become not responsive. kill command was workaround + keeping laptop in presentation mode while in office (short breaks; 3 minutes timeouts for sleep as most green option in windows 11).
so it just stopped. might be latest windows patches / updates.
however that come with another issue which was fixed.
time in wsl2 / ubuntu is paused and not synced after sleep.
after wake i should run sudo hwclock -s
. that is an issue with JWT tokens and etc. it was fixed long time ago via kernel update.
i hope other people got the fix too but check your time in wsl2 :)
Version
Microsoft Windows [Version 10.0.22621.160]
WSL Version
Kernel Version
5.10.102.1
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
This mostly seems to be happening when the device wakes from sleep - after a system restart, I can access the WSL distro as expected
wsl --shutdown
Expected Behavior
Actual Behavior
Diagnostic Logs
Feedback Hub logs: https://aka.ms/AAh9fcl