Skip to content

wsl --debug-shell hangs when exits #13330

@chansey97

Description

@chansey97

Windows Version

Microsoft Windows [Version 10.0.26100.4652]

WSL Version

2.5.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.87.2

Distro Version

Mariner based root file system

Other Software

No response

Repro Steps

This is not an urgent issue. I was just reading this document from https://learn.microsoft.com/en-us/windows/wsl/wsl-plugins#plugins-linux-user-space and wanted to inspect the content of the "very minimal Mariner based root file system".

But it still appears to be a BUG, as it cannot exit properly.

  1. Open an Command Prompt in Windows Terminal
  2. Input wsl
    NOTE: This step is necessary, otherwise
    The system cannot find the file specified.
    Error code: Wsl/DebugShell/ERROR_FILE_NOT_FOUND
    
  3. Open an elevated Command Prompt in Windows Terminal
  4. Input wsl --debug-shell
    Welcome to CBL-Mariner 2.0.20240829 (x86_64) - Kernel 6.6.87.2-microsoft-standard-WSL2 (hvc2)
    DESKTOP-7942QN8 login: root (automatic login)
    
  5. Input exit
    logout
    <<hangs....>>
    

Expected Behavior

Return to the Command Prompt normally.

Actual Behavior

Hangs forever...

Other things you can do:

  • Open the 2nd elevated Command Prompt in Windows Terminal
    C:\Users\Chansey>wsl --debug-shell
    All pipe instances are busy.
    Error code: Wsl/DebugShell/ERROR_PIPE_BUSY
    
  • The only way to reset everything, is sc.exe stop wslservice.

Diagnostic Logs

WslLogs-2025-08-03_22-21-44.zip

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions