WSL icon indicating copy to clipboard operation
WSL copied to clipboard

WSL is non-responsive after waking from hibernate

Open roja45 opened this issue 4 years ago • 521 comments

Version

Windows 11 Pro 21h2 build 22000.832

WSL Version

  • [ ] WSL 2
  • [ ] WSL 1

Kernel Version

5.10.60.1

Distro Version

Ubuntu 2-.04

Other Software

Docker desktop windows

Repro Steps

Hibernate machine Start up windows open a new terminal

Expected Behavior

Shouldn't hang

Actual Behavior

No response, terminal hangs. wsl --shutdown from command prompt also hangs, only solution is to restart the machine.

Diagnostic Logs

No response

roja45 avatar Aug 06 '22 12:08 roja45

image

roja45 avatar Aug 06 '22 12:08 roja45

image

roja45 avatar Aug 06 '22 12:08 roja45

WslLogs-2022-08-08_08-43-05.zip

logs captured while trying to restart wsl

roja45 avatar Aug 08 '22 13:08 roja45

WSL has found it hard to reconnect to the PC's storage by the sounds of things.

The next time this happens, I believe restarting WSL will fix it, as it does appear to have a memory leak as well.

Close then re-open is what I meant by this.

De-Been-Tech-Solutions avatar Aug 09 '22 00:08 De-Been-Tech-Solutions

But how do I restart wsl? wsl --shutdown just hangs.

roja45 avatar Aug 09 '22 00:08 roja45

You close it.

Then you re-open it.

De-Been-Tech-Solutions avatar Aug 09 '22 00:08 De-Been-Tech-Solutions

If it won't close, open task manager then kill the process from there.

De-Been-Tech-Solutions avatar Aug 09 '22 00:08 De-Been-Tech-Solutions

Same happens to me, no posible to wsl --shutdown, it hangs as well. The only solution is to restart windows, what is is quite annoying.

david-dlc-cerezo avatar Aug 16 '22 07:08 david-dlc-cerezo

Hello Same issue for me, the wsl command hangs at each command image

Edit : I managed to relaunch it without restarting windows by killing all wsl processes in task manager

QuentinLemCode avatar Aug 16 '22 11:08 QuentinLemCode

I don't think this is related to hibernation, I was also using PHPStorm (latest version which was supposed to have fixed a bug with WSL). I have finally abandoned PHPStorm and have been using VSCode for the last week or so, and no more problems with WSL crashing, it has been rock solid ever since.

roja45 avatar Aug 16 '22 13:08 roja45

I'm on 22000.918 I do get an error after hibernate wake: image

Only a full restart fixes it! 👎

pnmcosta avatar Sep 07 '22 19:09 pnmcosta

On Windows OS Build 22000.918, I am also getting a freeze of WSL2 on return from hibernate. CPU use is high: image

I also can't stop the service: image

WSL doesn't respond at all (listing doesn't work, status doesn't work, version doesn't work): image

I am using the latest WSL release 0.66.2.

Restart works to bring things back but that is all that works.

rowleya avatar Sep 08 '22 10:09 rowleya

rowleya you may to try update Docker Desktop for last version (v4.12) https://github.com/microsoft/WSL/issues/8703

In my case I have same problems with WSL2 and hibernate behavior. I tried to turn off hibernation but looks like my laptop dont support S1-S3 sleep mode. So updating the Docker fixed vmmem leak, but not wsl2 stucks after waking up.

egorgam avatar Sep 11 '22 09:09 egorgam

I don't have Docker Desktop installed here as I use docker on WSL2 when needed. Note that there isn't a vmmem memory leak here; that is just how much memory I am using!

Of interest, I usually use eclipse within WSL2 and leave that running when hibernating. That had been working until recently, but with the issue, it also meant that the CPU usage of VMMem went very high when restoring from hibernate. On Friday I closed eclipse before hibernating, and on coming back this morning, the high CPU is gone, but WSL still won't start up again without a restart of the computer.

rowleya avatar Sep 12 '22 06:09 rowleya

OK, even more interesting, I saw a thread about collecting wsl logs, so I tried to do that this morning, running the process just before hibernating. It seems that the issue didn't then show up. I don't know if this means that it is something to do with the amount of time of hibernation or something... I will try to remember to run the logging process tonight again and see what happens tomorrow...

rowleya avatar Sep 12 '22 07:09 rowleya

It happens also to me:

WSL: 0.66.2.0 Kernel: 5.15.57.1 WSLg: 1.0.42 MSRDC: 1.2.3401 Direct3D: 1.606.4 DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows: 10.0.22000.918

After hibernation (not sleeping), VmmemWSL eats 100% CPU, there is no way to shutdown, terminate or restart. I also do not see any memory leaks (memory usage is reasonable).

genmeblog avatar Sep 12 '22 08:09 genmeblog

"Working" was said a bit too soon. It was running, but it was slow! A restart has fixed that again, but I do wonder if something is slowing things down with hibernate and then by the time it comes back (if overnight for example), it has slowed down to basically nothing at all...

rowleya avatar Sep 12 '22 08:09 rowleya

OK, even more interesting, I saw a thread about collecting wsl logs, so I tried to do that this morning, running the process just before hibernating. It seems that the issue didn't then show up. I don't know if this means that it is something to do with the amount of time of hibernation or something... I will try to remember to run the logging process tonight again and see what happens tomorrow...

I observe exaclty the same thing. After I turned on logging, wsl doesn't hang...

genmeblog avatar Sep 12 '22 19:09 genmeblog

Having the same issue. It must have started probably after a Windows Update around 2-3 weeks ago as it worked before.

saschagysel avatar Sep 13 '22 06:09 saschagysel

As expected, WSL had frozen on return from hibernate this morning. I have attached the logs gathered during this time, started just before I entered hibernate, and stopped after returning; I did also try to start a WSL terminal just before stopping to ensure it was frozen. Eclipse was also open during this time but non-responsive on return (I could see the window and contents, but couldn't do anything with them).

The logs are attached below: WslLogs-2022-09-12_16-38-51.zip

rowleya avatar Sep 13 '22 06:09 rowleya