microsoft / microsoft/WSL

WSL 2.6.3 hang (HCS_E_CONNECTION_TIMEOUT) + "Phantom" Package State (Cannot Uninstall)

Open
#14,056 15 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

emailed-logs
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.7462]

### WSL Version

2.6.3.0

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

- [x] WSL 2
- [ ] WSL 1

### Kernel Version

6.6.87.2-1

### Distro Version

Ubuntu (Specific version inaccessible due to hang)

### Other Software

Docker Desktop (Installed, but disabled on startup. UI is unresponsive/frozen, so "Resource Saver" mode cannot be toggled via GUI).

### Repro Steps

1. Open PowerShell as Administrator.
2. Run `wsl`.
- Result: Hangs for several minutes, eventually fails with `Error code: Wsl/Service/CreateInstance/HCS_E_CONNECTION_TIMEOUT`. Or, sometimes it just hangs forever.
3. Run `wsl --shutdown`.
- Result: Hangs for ~60 seconds, returns no output.
4. Run `Get-AppxPackage -AllUsers *WindowsSubsystemForLinux*`.
- Result: Returns NULL/Nothing (The system thinks the app is not installed).
5. Run `Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like "*WindowsSubsystemForLinux*"}`.
- Result: Returns NULL/Nothing.
6. Run `wsl --version`.
- Result: Still reports `WSL version: 2.6.3.0`.

Troubleshooting attempted (all failed):
- `netcfg -d` and removal of HNS UDP:53 firewall rules.
- Restarting `hns`, `vmcompute`, `wslservice`.
- Full Cold Boot (Shift+Shutdown).
- Attempting to overwrite via `Add-AppxPackage -ForceUpdateFromAnyVersion` (fails due to package state).

### Expected Behavior

WSL should start normally. Alternatively, if the installation is corrupted, `Remove-AppxPackage` or `Get-AppxPackage` should correctly identify the installed version so it can be uninstalled or downgraded to a stable version (2.4.13).

### Actual Behavior

The system is in a "Phantom" package state.

1. `wsl.exe` executes and reports version 2.6.3.0, confirming the binaries are active.
2. The Appx database (`Get-AppxPackage`) reports no package installed, making standard uninstall commands impossible.
3. The WSL Service is deadlocked with `HCS_E_CONNECTION_TIMEOUT`.
4. `wsl --update` reports success but does not resolve the hang or the package mismatch.

Note that I don't really get the issue nor know what I am doing, all this info is the result of copy pasting commands and troubleshooting with an LLM. There are no known causes for me for wsl randomly starting to hang one day, with wsl being unusable ever since.

### Diagnostic Logs

(Will email to wsl-gh-logs@microsoft.com)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported PowerShell commands, especially `wsl`, `wsl --shutdown`, `wsl --version`, and the Appx package queries. Review the diagnostic logs sent to wsl-gh-logs@microsoft.com and determine whether the WSL hang and phantom package state have a reproducible cause; done means the failure is explained or a supported recovery path is identified.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.