-
Notifications
You must be signed in to change notification settings - Fork 832
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 commands hang (including wsl --shutdown) but WSL is constantly using 30-40% CPU #8529
Comments
I have this issue as well. Killing the WSL process from taskmanager recovers, but it does it again. Especially (but not only) after it comes back from sleep. |
Looks like something is wrong with your trace, could you please collect a trace using these instructions? |
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:
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! |
Could you also share the output of Thanks! |
This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it. Thank you! |
I'm not the original poster, but I'm having a similar issue: every
I attached the logs from collect-wsl-logs.ps1: |
Same problem here. Killing WSL from Task Manager solves the issue but is obviously not ideal. |
Same here; this just started happening in the last few days; Please re-open this MSFT! |
Same here. Need to terminate the process from task manager. This issue started after updated WSL to the Store version. |
Please reopen, this issue should not have been closed. This happens all the time, usually after waking the computer from sleep. Usually a simple This problem is really frustrating as it forces me to restart Docker and all containers, as well as my IDE, which with large projects can take some time. |
I was literally about to comment the same thing! This issues has been driving me CRAZY!!! My wsl version is:
Please can we reopen and address this? |
What's worse, if this happens and I forget to close my IDE before terminating WSL, when I reopen the project everything needs to be reindexed. While the entire restart process takes seconds to do and I could live with this inconvenience, indexing can take minutes, which is not inconvenient - it's infuriating. It is simply unacceptable that this issue persists and I'm absolutely blown away that this seems to be ignored on purpose. |
Same issue here. After coming back from sleep Vmmem brings CPU usage to 100% |
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: |
ERROR: The process "wslservice.exe" not found |
This worked for me. Thanks a lot! Previously I would do a hard reset. |
did you start powershell as admin? |
yes |
This workaround doesn't work for me either but |
This is some kind of joke, right? |
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. |
+1 this issue occurs for me on a new SP9 SQ3 on 22H2 22621.755 in debian bullseye on WSL2 with the systemctl flag enabled in wslconfig. WSL hangs when I stop a docker container. I then need to restart wsl but wsl --shutdown hangs. only rebooting or taskkill /f /im wslservice.exe seems to fix it. Issue should not be closed @craigloewen-msft hello friend can you help us? If there's anything I can do to share more info on how to reproduce please let me know. Thanks and big shoutout to you folks working on WSL, it TOTALLY ROCKS <3 |
To all those affected here, as this is already closed. I can't reproduce on my work laptop, but can reproduce on both my weak, 'personal' laptops. Work machine has 64GB Ram and personal laptops have 16GB (Yeah, I know). Worse when multiple instances of vscode are running under WSL. If everyone here has low-ish memory, this could be the culprit. |
Hi folks, reopening this so it can be visible to the WSL team. It was closed automatically since we didn't get any feedback from the original author. Thanks for flagging us on it! |
PLEASE FIX WHATEVER IS CAUSING THIS!!! There are literally DOZENS of threads online about this issue, including several on this GitHub repo! All was good in Win10, now WSL goes zombie after a sleep/hybernate and it is not even clear how to bring it back without rebooting the WHOLE SYSTEM. |
@benhillis Can you maybe assign someone else to this task if you aren't working on it? And have you escalated it to someone like a manager yet, or are there any experts who understand the problem? Same for related issues like |
updated to latest wsl prerelease. issue seems to be gone now. |
I said that too early, issue still present. |
I am having a freeze in Powershell after running wsl --shutdown command. |
Same problem here. |
I have been using the custom kernel that was mentioned by onereal7, following these instructions. So far, after a month with the new kernel, I have not had another hang like the ones that previously plagued me every few days. I don't know if it really has fixed the issue, but it is very promising. I'm using Windows 10 22H2, WSL 2.2.4.0, with CentOS7 and Alma9 distros. |
|
I just posted this on a similar issue; hope it helps others.
|
So if I understand right, if you use this feature on MS's multiuser operating system, then the only solution that avoids restarting the whole OS is to be an administrator on that multiuser operating system. |
I have the same problem, WSL2 freeze! And |
Same issue here 😞 |
Does the command |
Same issue here from 2023 😞 |
This issue still persists, and still makes developing on Windows completely impracticle for me. This really feels like it should be a higher priority given the push for better developer integration with windows at the moment. |
I’m facing the same issue. Everyone involved in development needs WSL in particular with java and docker images. Switching to Linux has been on my mind constantly. |
People who still see this problem: is it the same as discussed in this comment: #6982 (comment)? I applied the workaround mentioned there and earlier in this thread (#8529 (comment)) and have not since seen the problem after 4 months. I am using Windows 10 (that problem is supposed to be fixed in Windows 11 22H2) and WSL2 without Docker (I don't know if the workaround works with Docker). The workaround involves installing a patched WSL2 kernel as described here. As you know, the WSL2 kernel is normally the same for all your distros, so it should work for all types (I use Alma9, and occasionally ancient versions CentOS7 and Ubuntu 20.04). |
Just for the lost mind as me that did not understand what was going on.
If this is the case, just try to start bash without any. wsl.exe -e bash --norc If it works, you got a recursion in your login/bashrc script. |
Still experiencing... Can't even begin to explain how disruptive this is to my workflow lol. |
@GhostDog98 I feel like we're kindred spirits right now. I literally just found this issue an hour after your comment to complain as well. Restarting my whole machine just to get WSL to work is super irritating, which is often what I have to do. I haven't launched any VMs of any kind since my last machine restart and I have this issue. Maintainers, please make this a priority. |
try this command with Powershell: |
if you are willing to try, read this post, try a modified kernel. for me, bzImage-5.15.153.2-microsoft-standard-WSL2 link [here] worked. |
same issue and even |
Somewhat ironically... the only machine I am having this issue on... is a microsoft surface 🤦♀ |
got same issue at the end of 2024 |
This should be quoted as solution / workaround in the original report! It absolutely works. I had been suffering from hangs when sleeping / hibernating and using the patched kernel solved it. Anyone still reporting experiencing this issue, find your matching kernel with the patch and configure wsl2 to use it. If you're still having issues after that, it may be a separate problem. |
Too bad this isn't a solution for users who aren't willing to install an untrusted kernel binary build, provided by a random user, on their system :( Btw. @mhofman, you didn't report whether it also works with Docker. |
Docker works perfectly. I looked at how that binary was created, and it's the CI system that generated it from the original commit of the kernel that my version of Windows was using, with a single commit reverted, so I didn't bother recreating it. |
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
The text was updated successfully, but these errors were encountered: