microsoft / WSL

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

WSL2 fails to start with HCS_E_CONNECTION_TIMEOUT after KB5043145 is installed #12087

Closed andymeadows closed 1 month ago

andymeadows commented 1 month ago

Windows Version

10.0.22631.4169

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-microsoft-standard-WSL2

Distro Version

22.04

Other Software

WSL fails to start, so any and all applications that need WSL -- docker, remote containers, etc. -- all fail.

Repro Steps

With the above versions installed:

Expected Behavior

Expecting WSL2 container to launch and present a shell prompt.

Actual Behavior

The terminal window will hang and will eventually present an HCS_E_CONNECTION_TIMEOUT error. Error code: wsl/service/createinstance/createvm/hcs_e_connection_timeout

Diagnostic Logs

I do not have access to the logs as it was critical to revert the patch to get work completed.

github-actions[bot] commented 1 month ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/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 script will output the path of the log file once done. If this is a networking issue, please use [collect-networking-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

branpurn commented 1 month ago

Same issue. The KB is breaking WSL, which breaks other critical applications that rely on WSL, like Docker. (https://github.com/docker/for-win/issues/14336)

CristianCavanzo commented 1 month ago

Same issue here 🫨🫨

OneBlue commented 1 month ago

Thank you @andymeadows. Unfortunately we need /logs to be able to root cause the issue.

If either you or someone else could share logs, that would be very helpful to help us resolve this issue

manuelhc621 commented 1 month ago

WslLogs-2024-09-27_14-12-33.zip

manuelhc621 commented 1 month ago

@OneBlue just added error logs

manuelhc621 commented 1 month ago

I have upgraded to WSL 2.3.24, but the issue is still there.

In both ETL files, the same error appear when the VM is being initialized

onecore\vm\worker\vmb\vmbcomservices.cpp(1604)\vmwp.exe!00007FF7F36B4387: (caller: 00007FFB630AD601) ReturnHr(1) tid(194) 80070490 Element not found.
    Msg:[onecore\vm\worker\vmb\vmbcomservices.cpp(1600)\vmwp.exe!00007FF7F36B42F1: (caller: 00007FFB630AD601) Exception(1) tid(194) 80070490 Element not found.
    Msg:[Failed to find handle VmbusVdevHandle for device with instance ID: D41A1872-3740-41CE-A1EE-4522AB82F991 of type: D41A1872-3740-41CE-A1EE-4522AB82F991 in handle broker manager] CallContext:[\VmInitialize\VmbInitialize\VdevOperation] 
] CallContext:[\VmInitialize\VmbInitialize\VdevOperation] 

image

Here are the logs with the newest WSL version, just in case.

WslLogs-2024-09-27_16-10-01.zip

OneBlue commented 1 month ago

Thank you @manuelhc621.

Looking at the logs, it looks like something gets stuck on the VM boot path, but it's unclear what exactly at this point.

To help us figure that out, could you:

manuelhc621 commented 1 month ago

@OneBlue please find below links to both dums, both are quite large so I uploaded it to Google drive.

vmwp vmcompute

The one for vmwp dissapears after the error is shown, so I hope it contains the correct data.

OneBlue commented 1 month ago

Also @manuelhc621, could you also write:

[wsl2]
earlyBootLogging=false

In %USERPROFILE%/.wslconfig

And share /logs of a repro again ? This should give us more details

OneBlue commented 1 month ago

Also, what's your hardware configuration ? (CPU, GPU, Memory, etc)

OneBlue commented 1 month ago

Another thing that would be super useful would be a kernel dump. To capture one, can you please:

manuelhc621 commented 1 month ago

Sorry @OneBlue I reverted the update before reading your messages and WSL is back and I can not apply it again, at least I do not know how.

Here is my system info, hope it helps.

image

If I ran into the issue again will update this ticket

identityope commented 1 month ago

just got the same issue, any solution?

MartinSGill commented 1 month ago

Seems uninstalling KB5043145 is a workaround for now. At least it worked for me.

identityope commented 1 month ago

Seems uninstalling KB5043145 is a workaround for now. At least it worked for me.

Yeah I also confirm that uninstalling this update fixed the issue

glide007 commented 1 month ago

Seems uninstalling KB5043145 is a workaround for now. At least it worked for me.

yes, it worked for me too! thanks @MartinSGill

luciandf commented 1 month ago

confirm that uninstalling worked for me too!

armando-herastang commented 1 month ago

Same issue here. Uninstalling the update solved it. Hopefully this gets resolved.

I don´t know if this is relevant. I have an AMD Ryzen CPU, a college of mine has an Intel CPU an wasn't affected by the update.

luciandf commented 1 month ago

Same issue here. Uninstalling the update solved it. Hopefully this gets resolved.

I don´t know if this is relevant. I have an AMD Ryzen CPU, a college of mine has an Intel CPU an wasn't affected by the update.

i also have a laptop with an AMD CPU. I have read on reddit that mostly the amd cpus were affected.

MartinSGill commented 1 month ago

Just to confirm as well, the PC with the problem was also running an AMD CPU. I have another laptop with an intel chip and the KB installed and it's not exhibiting this issue.

gaborauth commented 1 month ago

My Ryzen 7 6800H is affected too, uninstalled the KB5043145, now it works.

OneBlue commented 1 month ago

Thank you @manuelhc621. Unfortunately I don't have access to a live repro of this issue at the moment so I'd still need a kernel dump to understand what's stuck here.

If anyone can reproduces this issue, please:

For this to work, the dump must be captured while WSL is in that "hung" state (once the error is displayed, you need to start wsl.exe again)

bssrdf commented 1 month ago

Looks like the issue is fixed. Now WSL2 is running with KB5043145 installed. Screenshot 2024-10-02 082905

gaborauth commented 1 month ago

Looks like the issue is fixed. Now WSL2 is running with KB5043145 installed.

Is it a new WSL update or the KB5043145 altered?

armando-herastang commented 1 month ago

Looks like the issue is fixed. Now WSL2 is running with KB5043145 installed.

Is it a new WSL update or the KB5043145 altered?

I don't see any new WSL release. The update is asking me to download, since I uninstalled. I paused the updates, but with this I am worried it doesn't work. I am going to wait until the end of the week to try.

bssrdf commented 1 month ago

Looks like the issue is fixed. Now WSL2 is running with KB5043145 installed.

Is it a new WSL update or the KB5043145 altered?

I didn't update wsl2. KB5043145 got reinstalled (I previously uninstalled it) inadvertently when I restarted the machine. But this time WSL runs.

daryllmoya commented 1 month ago

Can someone send any documentation for reference that this issue has been addressed properly?

armando-herastang commented 1 month ago

Looks like the issue is fixed. Now WSL2 is running with KB5043145 installed.

Is it a new WSL update or the KB5043145 altered?

I don't see any new WSL release. The update is asking me to download, since I uninstalled. I paused the updates, but with this I am worried it doesn't work. I am going to wait until the end of the week to try.

Can confirm WSL is working for me now after installing the update again!

Haven´t found anything official related to WSL issues being fixed by the update. Here they acknowledge there are issues, no mention of WSL thought, but they say to have mitigated them.

Anyway. I am good for now!

datacompboy commented 1 month ago

If anyone can reproduces this issue, please:

  • Then go back to "System" -> right click, "Create live kernel memory dump file" -> "full live kernel memory dump"
  • Share that file with us (either via Google Drive, OneDrive, or send to secure@microsoft.com

I've sent the dump to secure@, CRM:0305058140

Uninstall of KB5043145 fixes wsl but brakes explorer ("can't open start menu, reboot"); re-installation of KB fixes explorer but breaks wsl :(

gaborauth commented 1 month ago

I installed again the KB5043145 and the issue somehow fixed. Maybe an uninstall of the update and reinstall of it fixed? Hm. Strange.

anhdinh commented 1 month ago

If anyone can reproduces this issue, please:

  • Then go back to "System" -> right click, "Create live kernel memory dump file" -> "full live kernel memory dump"
  • Share that file with us (either via Google Drive, OneDrive, or send to secure@microsoft.com

I've sent the dump to secure@, CRM:0305058140

Uninstall of KB5043145 fixes wsl but brakes explorer ("can't open start menu, reboot"); re-installation of KB fixes explorer but breaks wsl :(

the issue happens on my system, Uninstall KB5043145 WSL works but the search bar doesn't work completely

anhdinh commented 1 month ago

I installed again the KB5043145 and the issue somehow fixed. Maybe an uninstall of the update and reinstall of it fixed? Hm. Strange. should I do that? I need the search bar for everything

luciandf commented 1 month ago

If anyone can reproduces this issue, please:

  • Then go back to "System" -> right click, "Create live kernel memory dump file" -> "full live kernel memory dump"
  • Share that file with us (either via Google Drive, OneDrive, or send to secure@microsoft.com

I've sent the dump to secure@, CRM:0305058140 Uninstall of KB5043145 fixes wsl but brakes explorer ("can't open start menu, reboot"); re-installation of KB fixes explorer but breaks wsl :(

the issue happens on my system, Uninstall KB5043145 WSL works but the search bar doesn't work completely

is this with the new KB5043145? After I uninstalled it, it didn't pop back until a few days later when I saw that they apparently changed it but I didn't have the patience for another f-up so I have not installed it yet.

anhdinh commented 1 month ago

If anyone can reproduces this issue, please:

  • Then go back to "System" -> right click, "Create live kernel memory dump file" -> "full live kernel memory dump"
  • Share that file with us (either via Google Drive, OneDrive, or send to secure@microsoft.com

I've sent the dump to secure@, CRM:0305058140 Uninstall of KB5043145 fixes wsl but brakes explorer ("can't open start menu, reboot"); re-installation of KB fixes explorer but breaks wsl :(

the issue happens on my system, Uninstall KB5043145 WSL works but the search bar doesn't work completely

is this with the new KB5043145? After I uninstalled it, it didn't pop back until a few days later when I saw that they apparently changed it but I didn't have the patience for another f-up so I have not installed it yet.

I updated wsl to the newest version, then uninstalled and reinstalled KB5043145 and now it seems everything is working correctly(docker and also the search bar), it was annoying and took a morning to fix.

datacompboy commented 1 month ago

is this with the new KB5043145? After I uninstalled it, it didn't pop back until a few days later when I saw that they apparently changed it but I didn't have the patience for another f-up so I have not installed it yet.

there is no "new" update with same number as far as I know.

but i see there is a fresh KB5044285 -- it fixed wsl issue. now both wsl and start menu is working again.

pantharshit007 commented 1 month ago

Image with this update powershell, WSL, Docker all are working fine

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

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-file it as a new issue.

Thank you!