You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open WSL2, let computer go to sleep, wake up - vscode can no longer connect to WSL2, any existing WSL2 terminal window will continue to work, but cannot open a new one.
Whilst researching this issue, I encountered #10710. I found a process with an associated vhdx handle and I killed it (NB this is a bad idea, it blue-screened my laptop).
Once my laptop booted back up, WSL was working fine again.
Then, I've went away for an hour and my laptop must have went to sleep.
Vscode could no longer connect to WSL:
An existing WSL window is open, and I can interact with it fine. If I try to open another WSL window I get an error:
I am experiencing a similar issue. In my case, wsl will lose connection 2-3 times per day, even while actively being used.
Windows Version
Version 10.0.22631 Build 22631
WSL Version
2.5.7.0
Are you using WSL 1 or WSL 2?
WSL 2
Distro Version
Ubuntu 24.04.2 LTS
Other Software
Docker Desktop installed.
Repro Steps
I Work as usual, and am interrupted by a fatal error, causing vscode to disconnect from WSL. I also cannot connect to the Ubuntu command line directly.
Expected Behavior
I expect WSL2 to open
Actual Behavior
It hangs
Diagnostic Logs
|[2025-06-02 14:40:01.788] Extension version: 0.99.0
[2025-06-02 14:40:01.788] L10N bundle: none
[2025-06-02 14:40:01.797] authorityHierarchy: wsl+Ubuntu
[2025-06-02 14:40:01.797] WSL extension activating for a local WSL instance
[2025-06-02 14:40:01.835] Resolving wsl+Ubuntu, resolveAttempt: 1
[2025-06-02 14:40:01.835] NodeExecServer run: C:\Windows\System32\wsl.exe --status
[2025-06-02 14:40:02.219] Download in background is enabled
[2025-06-02 14:40:02.995] WSL feature installed: true (wsl --status)
[2025-06-02 14:40:02.996] NodeExecServer run: C:\Windows\System32\wsl.exe --list --verbose
[2025-06-02 14:40:04.084] 2 distros found
[2025-06-02 14:40:04.084] Starting VS Code Server inside WSL (wsl2)
[2025-06-02 14:40:04.084] Windows build: 22631. Multi distro support: available. WSL path support: enabled
[2025-06-02 14:40:04.085] Scriptless setup: false
[2025-06-02 14:40:04.085] No shell environment set or found for current distro.
[2025-06-02 14:40:05.238] WSL daemon log file:
[2025-06-02 14:40:05.240] Probing if server is already installed: if [ -d ~/.vscode-server/bin/848b80aeb52026648a8ff9f7c45a9b0a80641e2e ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf 'alpine-'; fi; uname -m;
[2025-06-02 14:40:05.240] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu -e sh -c if [ -d ~/.vscode-server/bin/848b80aeb52026648a8ff9f7c45a9b0a80641e2e ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf 'alpine-'; fi; uname -m;
[2025-06-02 14:40:06.446] Unable to detect if server is already installed: Error: Failed to probe if server is already installed: code: Failed to probe if server is already installed: code: 4294967295, , Catastrophic failure
[2025-06-02 14:40:06.446] Error code: Wsl/Service/E_UNEXPECTED
[2025-06-02 14:40:06.446]
[2025-06-02 14:40:06.446] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 848b80aeb52026648a8ff9f7c45a9b0a80641e2e stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=502170542-1780045292-3071028689-571095613 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all'
[2025-06-02 14:40:07.766] Catastrophic failure
[2025-06-02 14:40:07.766] Error code: Wsl/Service/E_UNEXPECTED
[2025-06-02 14:40:07.766]
[2025-06-02 14:40:07.767] For help with startup problems, go to https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
I think the issue is related to, if not duplicate of, #12991 .
I was able to fix by disabling resource saver: settings > resources > advanced > resource saver.
There is a greater underlying issue, but i have been crash free with this workaround.
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Activity
github-actions commentedon May 23, 2025
Diagnostic information
claremont-awilson commentedon May 27, 2025
Whilst researching this issue, I encountered #10710. I found a process with an associated vhdx handle and I killed it (NB this is a bad idea, it blue-screened my laptop).
Once my laptop booted back up, WSL was working fine again.
Then, I've went away for an hour and my laptop must have went to sleep.
Vscode could no longer connect to WSL:
An existing WSL window is open, and I can interact with it fine. If I try to open another WSL window I get an error:
I've generated new diagnostics logs.
WslLogs-2025-05-27_12-33-16.zip
Interstingly the Oracle Linux 9.2 image is the one having an issue (my default), if I launch OL7.9 it works fine and same with Ubuntu 24.04...
Although that wasn't true when it was hanging, they didn't launch either. I feel my issues are 2-fold...
github-actions commentedon May 27, 2025
Diagnostic information
claremont-awilson commentedon May 27, 2025
Just realised the dmesg output may be useful from the still running OL9.2 image:
addlatt commentedon Jun 2, 2025
I am experiencing a similar issue. In my case, wsl will lose connection 2-3 times per day, even while actively being used.
Windows Version
Version 10.0.22631 Build 22631
WSL Version
2.5.7.0
Are you using WSL 1 or WSL 2?
WSL 2
Distro Version
Ubuntu 24.04.2 LTS
Other Software
Docker Desktop installed.
Repro Steps
I Work as usual, and am interrupted by a fatal error, causing vscode to disconnect from WSL. I also cannot connect to the Ubuntu command line directly.
Expected Behavior
I expect WSL2 to open
Actual Behavior
It hangs
Diagnostic Logs
|[2025-06-02 14:40:01.788] Extension version: 0.99.0
[2025-06-02 14:40:01.788] L10N bundle: none
[2025-06-02 14:40:01.797] authorityHierarchy: wsl+Ubuntu
[2025-06-02 14:40:01.797] WSL extension activating for a local WSL instance
[2025-06-02 14:40:01.835] Resolving wsl+Ubuntu, resolveAttempt: 1
[2025-06-02 14:40:01.835] NodeExecServer run: C:\Windows\System32\wsl.exe --status
[2025-06-02 14:40:02.219] Download in background is enabled
[2025-06-02 14:40:02.995] WSL feature installed: true (wsl --status)
[2025-06-02 14:40:02.996] NodeExecServer run: C:\Windows\System32\wsl.exe --list --verbose
[2025-06-02 14:40:04.084] 2 distros found
[2025-06-02 14:40:04.084] Starting VS Code Server inside WSL (wsl2)
[2025-06-02 14:40:04.084] Windows build: 22631. Multi distro support: available. WSL path support: enabled
[2025-06-02 14:40:04.085] Scriptless setup: false
[2025-06-02 14:40:04.085] No shell environment set or found for current distro.
[2025-06-02 14:40:05.238] WSL daemon log file:
[2025-06-02 14:40:05.240] Probing if server is already installed: if [ -d ~/.vscode-server/bin/848b80aeb52026648a8ff9f7c45a9b0a80641e2e ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf 'alpine-'; fi; uname -m;
[2025-06-02 14:40:05.240] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu -e sh -c if [ -d ~/.vscode-server/bin/848b80aeb52026648a8ff9f7c45a9b0a80641e2e ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf 'alpine-'; fi; uname -m;
[2025-06-02 14:40:06.446] Unable to detect if server is already installed: Error: Failed to probe if server is already installed: code: Failed to probe if server is already installed: code: 4294967295, , Catastrophic failure
[2025-06-02 14:40:06.446] Error code: Wsl/Service/E_UNEXPECTED
[2025-06-02 14:40:06.446]
[2025-06-02 14:40:06.446] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 848b80aeb52026648a8ff9f7c45a9b0a80641e2e stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=502170542-1780045292-3071028689-571095613 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all'
[2025-06-02 14:40:07.766] Catastrophic failure
[2025-06-02 14:40:07.766] Error code: Wsl/Service/E_UNEXPECTED
[2025-06-02 14:40:07.766]
[2025-06-02 14:40:07.767] For help with startup problems, go to https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
claremont-awilson commentedon Jun 4, 2025
It's been a couple of weeks. Is there anything we can provide to assist with diagnosing the issue?
addlatt commentedon Jun 5, 2025
I think the issue is related to, if not duplicate of, #12991 .
I was able to fix by disabling resource saver: settings > resources > advanced > resource saver.
There is a greater underlying issue, but i have been crash free with this workaround.
YingcaiDong commentedon Jul 8, 2025
A temporary fix. When WSL freezes, open PowerShell in administrator mode, and run this command
tasklist /svc /fi "imagename eq svchost.exe" | findstr LxssManagerSource: https://www.reddit.com/r/bashonubuntuonwindows/comments/10zotx1/comment/jf8e2a6/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
microsoft-github-policy-service commentedon Jul 9, 2026
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!