Skip to content
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

wslservice.exe hanging #8628

Closed
1 of 2 tasks
mwoodpatrick opened this issue Jul 17, 2022 · 7 comments
Closed
1 of 2 tasks

wslservice.exe hanging #8628

mwoodpatrick opened this issue Jul 17, 2022 · 7 comments

Comments

@mwoodpatrick
Copy link

Version

Microsoft Windows [Version 10.0.22621.290]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.102.1

Distro Version

Debian 11

Other Software

vscode 1.70.0-insider
podman.exe version 4.2.0-dev

Repro Steps

It's not really clear exactly what provokes this issue and I'm trying to narrow this down so guidance on best way to gether more information about this would be appreciated.

Expected Behavior

wslservice does not hang

Actual Behavior

I'm seeing a problem where after using wsl for a while any command trying to access wslservice hangs. This could be trying to start a new wsl session via the windows terminal menu. Trying to access a distro via vscode or running a command like "wsl..exe --status" or "wsl.exe --shutdown", commands like "wsl.exe --help" or "wsl.exe --version" do not hang. Running process explorer I am able to see several wsl.exe sessions running if I have a PowerShell window open and running "wsl.exe --status" command which is hanging killing the wsl.exe sessions does not affect the hang but killing wslservice.exe allows the wsl.exe command to rxit and when a new wslservice.exe is started I am able to run the "wsl.exe --status" command without issue. I did see issue :all wsl.exe commands hang · Issue #4144 · microsoft/WSL (github.com)" which is related but this issue is closed with a request to file a new issue. I would like to get guidance on how best to debug this further as I have been unable to find very little information on this service. Does it generate a log file somewhere? Please provide some pointers

Default Distribution: Alpine
Default Version: 2
WSL version: 0.61.8.0
Kernel version: 5.10.102.1
WSLg version: 1.0.39
MSRDC version: 1.2.3213
Direct3D version: 1.601.0
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22622.290

Diagnostic Logs

No response

@extensia
Copy link

I am seeing similar issues along with a completely broken Docker Desktop. Everything was working fine until the latest Windows updates landed. Now Docker Desktop attempts to start on reboot and then shuts down after a couple of minutes since it is failing to start docker-desktop-data. After rebooting, I can able to establish new Linux sessions for a minute or two, then attempting to start new sessions fails with a communications timeout. I suspect that is what is preventing Docker Desktop from starting.

I found that the LxssManager service also hangs when stopping the service. I was able to stop and restart the service by killing the corresponding svchost process. After restarting the service I am temporarily able to start new sessions again, but wsl reverts to the broken state again after a few minutes. Uninstalling Docker Desktop make wsl somewhat more usable, but the hang still problem still occurs only less frequently.

Ongoing stability problems with wsl and Docker Desktop are creating major problems for our development workflow. The amount of time wasted (three man days and counting) is forcing us to revert to remote development on Linux VMs hosted on VMware ESXi. Troubleshooting is proving near impossible due to the dearth of diagnostic tools.

@benhillis
Copy link
Member

Thanks for reporting. Any clues how you got into this state so we can repro?

also: /logs

@ghost
Copy link

ghost commented Jul 19, 2022

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!

@OneBlue
Copy link
Collaborator

OneBlue commented Jul 19, 2022

Thanks for reporting this @mwoodpatrick .

Can you please share dump of a hanging wslservice.exe ?

@mattjuk
Copy link

mattjuk commented Jul 20, 2022

+1 for this. Since the latest Windows 11 update my WSL now no longer launches at all via Windows Terminal.

@ghost ghost closed this as completed Jul 27, 2022
@ghost
Copy link

ghost commented Jul 27, 2022

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-open it.

Thank you!

@mwoodpatrick
Copy link
Author

I'm still having this issue see attached log
WslLogs-2022-08-21_07-19-26.zip
s

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants