Usually, WSL2 runs fine, but maybe once a month or two, it becomes completely unresponsive and I'm not sure why. Usually restarting the entire computer fixes it, but I'd like to know if there is any way to troubleshoot this and, ideally, prevent it from happening. I also want to know if this could be caused by system corruption.
There's a lot of information in this post, but I attempted arrange it in order of importance. Please be aware the bullet points are numbered in the order in which I wrote this post: "Symptoms", "System Information", then "30-60 minutes later".
Symptoms:
When I attempt to run wsl.exe in powershell/cmd.exe, the command hangs:
I've been waiting for this to do something for over 10+ minutes now. The same thing occurs via attempt to
wsl.exe --shutdown
:When I start a WSL terminal, it opens a window, but it is similarly unresponsive:
I don't normally open a WSL terminal directly. Usually I open mintty.exe/wsltty via a shortcut that runs this command:
%LOCALAPPDATA%\wsltty\bin\mintty.exe --tabbar=4 -o "KeyFunctions=t:new-window-cwd;w:close" --WSL="Ubuntu" --configdir="%APPDATA%\wsltty" -
. Like the other examples, these all hang:
30-60 minutes later:
Roughly 30-60 minutes into writing this post, the bottom Ubuntu window you see in point 3 closed on its own. Now the top Ubuntu window says it's installing, the cmd.exe's
wsl.exe
command errored out, but the powershell window remains unresponsive:About 10 minutes later, the powershell's
wsl.exe
command errored out too:I think this delay is due to running the powershell command roughly ten minutes after the cmd.exe command.
About five minutes later, the Ubuntu window closed on its own.
The vmmem.exe process is still not running, which concerns me, but I haven't retried anything yet.
The Microsoft store says that I'm using this version of Ubuntu. Unfortunately, as I mentioned in point 10, I don't know if this is any different from before the install occurred.
Unfortunately, when I try to do anything with WSL, I still have all the same symptoms I described at the beginning.
I'm going to restart now but if that fixes it, that'll limit my ability to provide information until it happens again. I've exported a list of running services to a file in case it helps to see what was active during this issue.
System Information:
I installed (and upgraded) WSL2 months ago and use it almost daily.
When I go into the task manager, I notice the vmmem.exe process is not running. That feels important, but I don't know how to start it; I can only find people asking how to stop or restart it, and those answers all use
wsl.exe
. As you can see in the Symptoms section, I can't use that command right now.According to the task manager, my CPU usage is around 0-5%. When I sort by usage, descending, I don't see anything WSL2 related in the top ten.
According to the task manager, my Memory usage is around 50%. When I sort by usage, descending, I don't see anything WSL2 related in the top ten.
Windows update says I'm up to date (I checked while writing this):
There was one optional update available, but for some reason, whenever I install this, my system can no longer connect to the Internet.
I've installed Ubuntu from the Windows Store, and I'm interpreting from the UI, that it doesn't need an update:
I wish I could find exactly what version is installed, but I'm not sure how to find that in this UI.
Update: Now I see you need to scroll past most of the content to find this information. Unfortunately I only noticed this after step 12, so I'm not sure what version I had at the time of writing this bullet point.
Although Ubuntu is installed from the Windows Store, WSL2 is not. Apparently I downloaded and installed it manually. According to my "Apps & features" settings, I'm running this version:
If
wsl.exe
says a different version, I'll come back and edit this line. At the moment, I'm unable to provide that information because the only way I know how is to runwsl.exe
, andwsl.exe
currently hangs.
wsl --upgrade
. I've yet to confirm which of those last two are necessary, but I'm pretty confident at least 1 is.