microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.27k stars 812 forks source link

WSL 1.0.3 hangs forever #9659

Open gaelxcowi opened 1 year ago

gaelxcowi commented 1 year ago

Version

Windows version: 10.0.22621.1265

WSL Version

Kernel Version

5.15.74.2

Distro Version

Any

Other Software

Docker Desktop

Repro Steps

After installing wsl 1.0.3 cannot start it. Tried completely re-installing, unregistered and registering the distros (tho they get stuck at the installation). I can see that a new process called vmmemWSL is tarted with around 700mb memory and 0% CPU that lingers around.

Rolled back to wsl 1.0 works ok.

Expected Behavior

wsl to work

Actual Behavior

wsl hangs either on start or on installation with the vmmemWSL process being dropped after a long time (can be speedup by stopping the wslservice process)

Diagnostic Logs

No response

gaelxcowi commented 1 year ago

Tried the solution (well it was already there) with the CFG - not helped - the only thing that helped was to completely delete wsl and install the wsl 1.0.0.0 from the msixbundle

Also tried the pre-release version and none worked :/

ghost commented 1 year ago

Without /logs we can't do much.

microsoft-github-policy-service[bot] commented 1 year ago

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:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

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!

gaelxcowi commented 1 year ago

Without /logs we can't do much.

Will add some, at this moment cannot do that, as it is fixed, but will try during the weekend to update back to 1.0.3 and get the logs of what's going on.

Gitii commented 1 year ago

I have the same issue (WSL-Version: 1.1.3.0). Here is the log: WslLogs-2023-02-24_14-04-01.zip

I hope it's useful because wsl already hangs when the user session starts.

gaelxcowi commented 1 year ago

Unfortunately did not have time to "break it" to get the logs - have a deadline so need a working machine. Thank you @Gitii <3 hopefully it would be enough to diagnose. Do you have similar behavior where a vmmem process is started with ~700 MB and 0-0.5% CPU that take a very long time to die?

Gitii commented 1 year ago

@gaelxcowi I've checked and it's ~830MB for me and 0-0.1% CPU. On my laptop, I noticed that after a clean start, everything is fine. But standby causes this behaviour. After realizing that, I have created a new log file with reproduction: WslLogs-2023-02-27_11-22-21.zip I've started logging, put system to sleep (power safe), waited until it's on standby, turned the system on again, waited a few minutes and then stopped logging.

It might be unrelated, but Microsoft Terminal is killed after standby&resume (it's no longer running after resume of the system) and docker desktop is super dead. It cannot start anymore but that's expected as it depends on the wsl2 vm to function.

Gitii commented 1 year ago

After a few days of playing around, I can confirm that version 1.0 is working without issues for me (no freezes, no "slow" start). Just as expected. With version 1.0, Microsoft Terminal survives standby, too.

ghost commented 1 year ago

Thanks @Gitii, I'll have a look this coming week.

ghost commented 1 year ago

I'm sorry, I've gotten routed elsewhere and won't be able to look into this for the time being.

Gitii commented 1 year ago

@pmartincic No worries and thanks for the honest update! I really appreciate that!

Gitii commented 1 year ago

@gaelxcowi I couldn't reproduce this issue with 1.1.5.0 and the latest windows update anymore. So maybe it has been fixed?

gaelxcowi commented 1 year ago

@Gitii sorry for late reply, got really slumped these days, but tried just now and not really, Initially I had this issue; https://github.com/microsoft/WSL/issues/7850 But after trying the fix in there got back to the same issue, luckily this time didn't have to debug for an hours bur rather downgraded back to 1.0.0.0

Edit:

Tried with both 1.1.5.0 and 1.1.6.0 - same result, didn't have the power to try 1.1.7.0

DanKaplanSES commented 8 months ago

@gaelxcowi Did you mean to check the WSL2 checkbox? I only see you mentioning v1. My mistake. @gaelxcowi was referring to wsl2 v1 whenever they said v1.

gaelxcowi commented 7 months ago

@DanKaplanSES not sure what you mean, yes I meant to check WSL 2 check box, as I was using WSL 2 version 1.0.3. A for exmple now I am running WLS 2 version 1.3.11.0 unless I am mistaking something :/

image

xz-viewray commented 6 months ago

I'm happy to report that after updating to Windows 11 a few weeks ago, the issue has yet to occur since the update.

The following is the wsl --version output after the update.

WSL version: 2.0.14.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.3155