11

I've installed WSL Ubuntu 20.04 LTS using wsl --install -d ubuntu.

But sometimes it stops responding and freezes when I've been in Linux for a long time.

Windows Version: 21H2. CPU virtualization, Linux subsystem, and virtual machine platform are enabled.

NotTheDr01ds
  • 17,574
  • 4
  • 44
  • 81
iykctywub
  • 111
  • 1
  • 1
  • 3
  • 1
    When it "freezes", I assume there's no error message, right? The next time it freezes, try opening PowerShell or CMD and then run `wsl ~` a second time. Does it start? If so, add the output of `ps n -efH` to the question. That may give you some idea what's going on. You may be able to `kill ` the offending processes from another WSL window and get the first one to start again. – NotTheDr01ds Mar 29 '22 at 20:17
  • Also, it probably won't matter but is this Windows 10 or 11? Both have "21H2" releases. – NotTheDr01ds Mar 29 '22 at 20:20
  • I have exactly the same issue I'm using wsl2 with ubuntu and zsh/oh-my-zsh + starship prompt ``` Edition Windows 11 Pro Version 21H2 Installed on ‎8/‎23/‎2022 OS build 22000.1098 Serial number PF3ZL4QL Experience Windows Feature Experience Pack 1000.22000.1098.0 ``` – laertis Oct 15 '22 at 11:06
  • 3
    Moreover. VScode Server for wsl also hangs and says "reload window" as being unresponsive which indicates that's a wsl problem. Sometimes, opening cmd in administrator mode and issueing `wsl --shutdown` works but not everytime There are resources to to restart wsl - https://www.how2shout.com/how-to/how-to-reboot-wsl-windows-subsystem-linux-in-windows-10.html - https://superuser.com/questions/1126721/rebooting-ubuntu-on-windows-without-rebooting-windows – laertis Oct 15 '22 at 11:08
  • 2
    I've experienced the same thing (W11, 22H2). Seems to be tied to my laptop or desktop resuming from some form of sleep. The restart of the VM doesn't seem to be possible (`wsl` command just hangs elevated prompt or not) - reboot is the only one I can recover. – Gordon Jan 01 '23 at 20:34
  • FWIW, instead of reboot you should be able to kill wslservice.exe – CervEd Mar 18 '23 at 11:15
  • 1
    @NotTheDr01ds tried your suggestion, by killing a bash script that ran an ssh session (only), and got my original terminal back. Will continue observing to see if this happens when the terminal is just sitting idle. Can confirm that the plan9 file server is not the culprit (in my case). https://superuser.com/questions/1749690/what-is-this-weird-process-i-see-in-wsl-called-plan9 – goldfishalpha Apr 13 '23 at 09:42
  • I'm seeing this too (Win 11 22h2, WSL2), but when it freezes, I don't have to reboot as others have said, I can just launch another instance. It doesn't fix the frozen instance, but I can at least resume what I was doing without any serious interruption to my workflow. – Bryan Jul 25 '23 at 15:29
  • Plain vanilla Debian instance (both 11 and 12): same thing. Just hangs for a minute, and then comes back to life. It feels exactly like when the garbage collector was triggered in the C64 BASIC to tidy up strings... – Sz. Aug 03 '23 at 21:54

0 Answers0