Skip to content

wsldevicehost DllHost surrogate persists after wsl --shutdown and grows threads/handles every VM cycle #42324

Open

Description

Windows Version

Microsoft Windows 11 Home 26H2, build 10.0.26300.9974

WSL Version

3.0.5.0 (kernel 6.18.58.1-1, WSLg 1.0.79)

Are you using WSL 1, WSL 2, or WSLC?

  • WSL 1
  • WSL 2
  • WSLC

Ubuntu 26.04.1 LTS, version 2 (stopped when observing the leak).

Other Software

Windows Terminal. %USERPROFILE%\.wslconfig:

[wsl2]
networkingMode=mirrored
dnsTunneling=true
autoProxy=true
firewall=true
memory=5GB
processors=4
swap=4GB

[experimental]
autoMemoryReclaim=gradual
sparseVhd=true
hostAddressLoopback=true

Repro Steps

  1. Starting from no device-host surrogate, count the device-host surrogate:

    Get-Process dllhost | ForEach-Object {
      $p = $_
      $m = $p.Modules | Where-Object { $_.ModuleName -match 'wsldevicehost|vmdevicehost' }
      if ($m) { [pscustomobject]@{ PID=$p.Id; Threads=$p.Threads.Count; Handles=$p.HandleCount; Modules=($m.ModuleName -join ',') } }
    }
  2. Run three start/stop cycles, measuring between each step:

    wsl -d Ubuntu -u root -- true
    Start-Sleep 3    # measure
    wsl --shutdown
    Start-Sleep 5    # measure
  3. Observe the persistent surrogate across cycles.

Expected Behavior

The device-host surrogate should stop accumulating resources when the VM stops, and the thread/handle count should return to the idle baseline after wsl --shutdown.

Actual Behavior

One DllHost.exe /Processid:{17696EAC-9568-4CF5-BB8C-82515AAD6C09} surrogate stays alive after the VM stops and keeps wsldevicehost.dll loaded. Its threads and handles grow every cycle and never drop back:

Point Threads Handles
baseline (no surrogate) – –
after start 1 23 194
after shutdown 1 21 179
after start 2 24 220
after shutdown 2 22 204
after start 3 28 242
after shutdown 3 26 227

(A separate 5-thread DllHost.exe that loads only vmdevicehost.dll appears for each VM start and exits on shutdown — that one behaves correctly.)

On a machine with 10 days of uptime and ordinary interactive wsl.exe use, the same persistent surrogate had:

  • 1,678 threads, 7,269 handles, ~2 MB working set
  • all 1,670 idle threads in UserRequest wait, 8 in Unknown
  • loaded modules: wsldevicehost.dll, vmdevicehost.dll, wsldevicehostproxystub.dll, vmprox.dll
  • Ubuntu reported Stopped for the whole time it was observed

Stopping that process freed ~7,000 handles, but it reappeared with the next WSL start and began growing again. This looks related to #42051 (the same AppID and wsldevicehost), but that issue covers one leaked process per VM started from session 0; here it is unbounded thread/handle growth inside a single long-lived surrogate.

Diagnostic Logs

  • Command line: C:\WINDOWS\system32\DllHost.exe /Processid:{17696EAC-9568-4CF5-BB8C-82515AAD6C09}
  • The 1,678-thread instance was observed on WSL 3.0.5.0 / Windows 26300.9974; the cycle table was measured on the same build after killing it.

Activity

  1. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor

    Logs are required for review from WSL team

    If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
    Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

    How 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 script will output the path of the log file once done.

    If this is a networking issue, please use .\collect-wsl-logs.ps1 -LogProfile networking instead, following the instructions in Collect WSL logs for networking issues

    Once completed please upload the output files to this GitHub issue.

    See Collect WSL logs (recommended method).

    If you choose to email these logs instead of attaching them to the bug, please send them to wsl-gh-logs@microsoft.com with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.

  2. jsperry0807-rgb commented on Nov 21, 2026

    @jsperry0807-rgb
    Author
  3. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor
    Diagnostic information
    .wslconfig found
    Detected appx version: 3.0.5.0
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions