-
Notifications
You must be signed in to change notification settings - Fork 832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSL sometimes crashes when computer wakes from sleep #9563
Comments
Thank you for reporting this @kyllingstad. Can you follow the '11) Reporting a WSL process crash' section and share the wslservice.exe crash dump ? |
I am trying to reproduce it with a crash dump and will report here as soon as I'm successful. It looks like the “sleep to hibernation” transition is not a sufficient condition to trigger the crash; it remains to see whether it’s a necessary one. |
I'm experiencing the same problem after I updated |
I'm a bit of worried about sending out dump files may leak private info. I put the dump file into windbg. The output of
|
It seems this doesn't happen to me anymore. WSL used to crash every time I put my computer to sleep overnight, but now it doesn't anymore. Perhaps an update fixed it. (It's a work laptop, so I don't have full control over when updates get installed.) It's good that someone else could reproduce it. |
This is happening for me regularly when my computer is left alone overnight. It's an intermittent fault, and sometimes it might go for a week or longer without issue. I've only experienced this issue since updating WSL via
|
So you mention that it takes a while for this issue to occur, and you believe that it happens when the laptop goes from sleep to hibernation. So if you close the laptop lid and open it back up right away this does not happen? I am mainly asking, because I am encountering a similar issue, and for me it happens pretty much immediately. Maybe I have to wait until the fan stops spinning, but that's about it. And I found this issue related to windows terminal (which I noticed also closed itself) microsoft/terminal#12513 And the people in this thread encountered that for them, all apps installed through the Microsoft store close, when they close their laptops. WSL, Ubuntu and the Microsoft Terminal (Preview) are all store apps, so I tried it out and just opened every app that I had installed through the store (by going to "My Library" in the store). When I closed my laptop and opened it back up they were all gone. From this other issue, it appears that the problem is getting internal attention from Microsoft, but from what I can tell there is no consistent way of fixing it at the moment. I'm not sure if this is the same problem that you have, but I think it is at least similar in behavior. I have enabled automatic crash dumps, like @OneBlue suggested and I got some files, they were all titled I don't know if I could look at those dump files, vscode tells me they're in binary |
No, that hasn't happened to me.
This seems like a different issue. Windows Terminal never crashed for me, only WSL. |
Ok, it seems this has little to do with hibernation. It just happened now when I woke the computer from regular sleep. I've updated the issue title accordingly. Like a previous poster, I also worry about publishing dump files, so here is my windbg output of
I don't know if this is useful, so please advise on how I can send the dump file safely to Microsoft if needed. |
It also happens with my wsl1/Ubuntu 22.04. After waking up from some kind of power-saving mode (I'm not sure whether it's sleep or hibernation). The Ubuntu shell would display the following error message:
When I press any key, the window for the shell would be gone. Here is the version of the wsl:
Although the version is supposed to run WSL2, my Windows' version is too old. WSL1 is in fact running. I wonder if downgrading the wsl version would help. |
I have the same issue, and it is NOT related to hibernation, but to sleep mode. Happens consistently after I get out of sleep (sleep duration makes no difference), and I distinctly remember this has started after I "upgraded" haha to WSL2 from the store. I'm using Windows terminal and VSCode and both apps are affected. Terminal: I don't have to stop/start/restart WSL2 at this point. Its enough to open a new Ubuntu window in Terminal and continue working, so its not a workstopper but a major annoyance and time waster. This has been going on and on so many times for weeks now, that I was forced to search for a solution and found this thread.
|
@yubrshen I think you are on WSL2. https://askubuntu.com/questions/1177729/wsl-am-i-running-version-1-or-version-2 |
Same here. I deleted the app and now WSL seems running OK. The problem was only present on my work laptop where modern standby is enabled. |
@zoliweiss could you pls let me know how you reverted to "normal" WSL. Did you remove 1 or both of these under Settings > Apps & features? Did you have to reinstall WSL after that? Or something else? |
No, I removed the WSL app from the Start menu with right click remove option, if I remember correctly. I can't show you, because I already removed it.
No, it just reverted to the old version I guess, because it now sometimes displays the update message in terminal. |
OK thanks. Start menu item corresponds to "Windows Subsystem for Linux" under Apps & features. This - https://www.microsoft.com/store/productId/9P9TQF7MRM4R So just to be sure: your Ubuntu installation didnt get affected in any way right? No files lost, everything running seamlessly like before? I'll also uninstall and check for a few days and report back. |
I didn't find any problem. |
@zehawki thanks for reminding me that my Windows 10 can actually run WSL 2. Today, I tried the conversion again. It worked much better. Upon extensive search, eventually, MS new Bing told me that the top of the three reasons for the failure is the PowerShell lacked admin privilege. I then ran the same command with elevated privilege PowerShell. After nearly two hours, this time the conversion succeeded. (It looks like the recent another upgrade of wsl might have improved to my convention.) I also had to stopped the running instance of Ubuntu before the conversion, by the command: It turned out that the error message is exactly the same as appearing in the Ubuntu shell when my laptop wakes up from sleep! I'll continue to monitor if the problem of Ubuntu stopping after waking up still happens. |
I have a new finding on this - perhaps this issue is related to network, not sleep. Right now the same crash happened as soon as I turned off my VPN. I can conjecture that the same happens upon wake from sleep - the VPN takes a short time to connect and that's when the crash is seen, and we think its due to a sleep issue. For people who don't have a VPN and see this issue, perhaps some other network change happens upon wake from sleep. Edit 16/03/2023: this has happened now quite a few times (over multiple days) exactly after VPN turn off. Next Ive uninstalled "Windows Subsystem for Linux", and now I get the message when starting WSL: |
WSL2 (including Windows Terminal) crashes every time Windows 11 wakes up from sleep. Same setup is working flawlessly on Windows 10. |
I have a similar issue. the WSL process pauses when computer goes to sleep but does not resume. i have noticed that the clock of the WSL is paused at the time in the past when it paused and resumes from that time. i have noticed this behavior after work computer updated to Windows 11, version 22H2 |
On my side the issue has disappeared after uninstalling WSL2 store version (and reverting to "normal" WSL2) as advised by @zoliweiss. |
It's really confusing why this is a non-issue for Microsoft. It basically renders WSL2 unusable for any serious work on Windows 11. |
The issue is gone for me after the latest update [0]. WSL is not crashing anymore after sleep, though Windows Terminal sometimes does crash, but WSL is fine and responsive. [0] 2023-03 Cumulative Update for Windows 11 Version 22H2 for x64-based Systems (KB5023706) |
This is still a problem for me, WSL2 with Ubuntu - Crashes on wake from sleep and refused to be shutdown using This has been happening for the better part of a year. Specs - |
Same here with Sometimes only |
I can reproduce on my machine
|
I have the same issue on my laptop. It happens very often when the laptop awakes from sleep. My device info: wsl info: |
The related issue is #11806? I guess |
It's been happening on every single wake from sleep ever since I upgraded to 2.3.11.0 |
Just chiming in to say I've been experiencing the same thing for the last few days as well. Every sleep and wake results in the WSL2 guest crashing. |
@OneBlue has identified a bug in 2.3.11 and will be releasing a fix shortly. |
I updated to WSL version 2.3.12.0 last night and I did not get the error this morning. WSL is up and running after my PC woke from sleeping. Thank you to everyone involved! |
Yep. The issue seems to be fixed for WSL version 2.3.12.0 |
Looks like the issue is back on version 2.3.13.0 :-( |
@ufondu88 It works here just fine. Make sure you are using the last version with |
Crash from sleep. "Error: 0xd00002fe [process exited with code 4294967295 (0xffffffff)] wsl --version |
Similar things happening here as well. Steps
Expected: tmux session is alive Additional info
Observations
|
Version
Microsoft Windows [Version 10.0.19044.2364]
WSL Version
Kernel Version
5.15.79.1-microsoft-standard-WSL2
Distro Version
Arch Linux
Other Software
No response
Repro Steps
Expected Behavior
I expect the Linux instance to also resume from sleep/hibernation without errors.
Actual Behavior
The Linux shell is unresponsive, and in the Windows Terminal, I see the following message:
I do not think this is a duplicate of #9301, because the Linux instance can easily be started again without rebooting the computer.
I have run the
collect-wsl-logs.ps1
script and attached its output files as instructed (WslLogs-2023-01-30_16-39-46.zip), but its console output indicates that it wasn't entirely successful:The part starting with "Saving logs..." is of course from after the computer has woken again. And I have run that script successfully before, so I guess that the error is related to WSL crashing.
I have also checked Event Viewer and found some log entries there which seem like they could be relevant. In chronological order:
The driver \Driver\vpcivsp for device ROOT\VPCIVSP\0000 stopped the power transition.
The system is entering sleep. Sleep Reason: Button or Lid
The driver \Driver\vpcivsp for device ROOT\VPCIVSP\0000 stopped the power transition.
The ms-resource:AppName service terminated unexpectedly. It has done this 2 time(s).
The system is entering sleep. Sleep Reason: Hibernate from Sleep - Fixed Timeout
The Error message there caught my eye. In Services, I can see that ms-resource:AppName is actually
C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_1.0.3.0_x64__8wekyb3d8bbwe\wslservice.exe
. So I guess this means that the WSL service crashes.Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: