microsoft / microsoft/WSL

WSL crashes and leaves residual processes that prevent the Windows restart sequence from completing

Open
#40,705 9 comments 0 reactions 0 assignees View on GitHub
emailed-logs needs-investigation wsl2
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### Windows Version

Microsoft Windows [Version 10.0.26200.8457]

### WSL Version

WSL version: 2.7.3.0 Kernel version: 6.6.114.1-1 WSLg version: 1.0.73 MSRDC version: 1.2.6676 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26200.8457

### Are you using WSL 1 or WSL 2?

- [x] WSL 2
- [ ] WSL 1

### Kernel Version

6.6.114.1-microsoft-standard-WSL2

### Distro Version

Debian GNU/Linux 13 (trixie)

### Other Software

Client:
Version: 29.4.3
API version: 1.54
Go version: go1.26.2
Git commit: 055a478
Built: Wed May 6 17:06:42 2026
OS/Arch: linux/amd64
Context: default

Server: Docker Desktop 4.73.1 (226574)
Engine:
Version: 29.4.3
API version: 1.54 (minimum version 1.40)
Go version: go1.26.2
Git commit: 56be731
Built: Wed May 6 17:07:37 2026
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v2.2.3
GitCommit: 77c84241c7cbdd9b4eca2591793e3d4f4317c590
runc:
Version: 1.3.5
GitCommit: v1.3.5-0-g488fc13e
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Client:
Version: 29.4.3
Context: default
Debug Mode: false
Plugins:
agent: Docker AI Agent Runner (Docker Inc.)
Version: v1.54.0
Path: /usr/local/lib/docker/cli-plugins/docker-agent
ai: Docker AI Agent - Ask Gordon (Docker Inc.)
Version: v1.20.2
Path: /usr/local/lib/docker/cli-plugins/docker-ai
buildx: Docker Buildx (Docker Inc.)
Version: v0.33.0-desktop.1
Path: /usr/local/lib/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v5.1.3
Path: /usr/local/lib/docker/cli-plugins/docker-compose
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.47
Path: /usr/local/lib/docker/cli-plugins/docker-debug
desktop: Docker Desktop commands (Docker Inc.)
Version: v0.3.0
Path: /usr/local/lib/docker/cli-plugins/docker-desktop
dhi: CLI for managing Docker Hardened Images (Docker Inc.)
Version: v0.0.3
Path: /usr/local/lib/docker/cli-plugins/docker-dhi
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.31
Path: /usr/local/lib/docker/cli-plugins/docker-extension
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.4.0
Path: /usr/local/lib/docker/cli-plugins/docker-init
mcp: Docker MCP Plugin (Docker Inc.)
Version: v0.42.0
Path: /usr/local/lib/docker/cli-plugins/docker-mcp
model: Docker Model Runner (Docker Inc.)
Version: v1.1.37
Path: /usr/local/lib/docker/cli-plugins/docker-model
offload: Docker Offload (Docker Inc.)
Version: v0.5.85
Path: /usr/local/lib/docker/cli-plugins/docker-offload
pass: Docker Pass Secrets Manager Plugin (beta) (Docker Inc.)
Version: v0.0.25
Path: /usr/local/lib/docker/cli-plugins/docker-pass
sandbox: (Docker Inc.)
Version: v0.12.0
Path: /usr/local/lib/docker/cli-plugins/docker-sandbox
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: /usr/local/lib/docker/cli-plugins/docker-sbom
scout: Docker Scout (Docker Inc.)
Version: v1.20.4
Path: /usr/local/lib/docker/cli-plugins/docker-scout

Server:
Containers: 15
Running: 15
Paused: 0
Stopped: 0
Images: 15
Server Version: 29.4.3
Storage Driver: overlayfs
driver-type: io.containerd.snapshotter.v1
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Discovered Devices:
cdi: docker.com/gpu=webgpu
Swarm: inactive
Runtimes: io.containerd.runc.v2 nvidia runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 77c84241c7cbdd9b4eca2591793e3d4f4317c590
runc version: v1.3.5-0-g488fc13e
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.6.114.1-microsoft-standard-WSL2
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 31.34GiB
Name: docker-desktop
ID: 4000ea4f-9a2a-4dd3-96cb-fce34986b95b
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Labels:
com.docker.desktop.address=unix:///var/run/docker-cli.sock
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5555
::1/128
127.0.0.0/8
Live Restore Enabled: false
Firewall Backend: iptables

### Repro Steps

Possibly related to https://github.com/microsoft/WSL/issues/40591

I don't think it is practical to provide logs with this one because the WSL crash occurs hours into starting Windows and upping the Docker Compose stack, at which point the logs would've grown to hundreds of GBs. This problem occurs on one of 3 PCs that use identical setups - Win 11, WSL2, Debian 13, Docker Desktop with WSL integration and identical versions within this tech stack.

What happens in practice:
1. PC/Win11 starts
2. I start Docker Desktop
3. I open a ConEmu with a bunch of startup tasks - WSL2 console and Docker container interactive console tabs
4. I open some WSL-integrated projects in PhpStorm
5. Even without any activity/load on this PC, WSL will eventually crash
6. The crash will cause a cascade of crashes - all Docker containers, ConEmu console terminals, PhpStorm will freeze (indicating that WSL cannot restart successfully on its own the way it does when for example WSL has crashed on the other PCs (a much more rarer occurrence and recoverable).
7. The crashed WSL consoles in ConEmu would leave ghost processes, visible in task manager. The ConEmu window cannot be closed using the X button at the top/right. Closing it through task manager does not seem to end the whole process tree cleanly. PhpStorm must also be closed through Task Manager. Using task manager in this situation has also caused Task Manager itself to become non-responsive and have to force-close it using the X button top/right and clicking it a second time after the window has went blank/frozen.
8. The overall PC state does not seem to be experiencing stability issues or high resource usage - I can still open apps and move windows around and control the PC through TeamViewer
9. Restarting Windows from the start menu would cause the blue "restarting windows" screen to hang there forever
10. I have to shutdown the PC from the power switch

### Expected Behavior

WSL to not crash and cause stuck processes and restart prevention.

At this point I'm considering reinstalling WSL and reimporting the distro. Is this a possible fix? Could it be a problem with the distro itself? Do I need to reinstall WSL, then install a fresh distro and copy my files and provision the environment to its current state (hopefully not as it will be a lifetime of work)? Does reinstalling actually carry any chance of fixing the problem? I mean this particular PC carries both the network translation problem as well as the WSL crashes and it makes using it a hassle...

### Actual Behavior

WSL crashes, freezes, leaves residual processes, causes Windows to be unrestartable

### Diagnostic Logs

_No response_

Contributor guide

Open the contributing guide

Research direction

No source file, test, or entry point is named, and the diagnostic logs are absent. Start with the numbered Windows startup, Docker Desktop, WSL console, and restart sequence alongside the reported version details; the work is done when the crash, residual processes, and restart hang are reproducible and their cause is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, linux
Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.