Skip to content

New sessions fail with Wsl/Service/WSAENOBUFS after Modern Standby resume — guest VMBus offer/rescind deadlock (hvs_probe stuck in vmbus_open, ~1,950 offers queued) #41777

Open

Description

@derekrprice

Windows Version

10.0.26300.9457

WSL Version

3.0.1.0

Are you using WSL 1 or WSL 2?

WSL 2

Kernel Version

6.18.40.1-1

Distro Version

Ubuntu 24.04 (plus Docker Desktop's docker-desktop distro)

Other Software

Docker Desktop (WSL 2 backend). .wslconfig only sets [experimental] autoMemoryReclaim=gradual. The host supports Standby (S0 Low Power Idle) Network Connected.

Repro Steps

No deterministic repro. It has happened four times in roughly two weeks (2026-09-17, 09-22, 09-29, 10-02), each time after the host has been through Modern Standby cycles with the WSL VM running.

  1. Leave WSL 2 running (Ubuntu terminals + Docker Desktop) and let the laptop enter and exit Modern Standby normally.
  2. At some point, try to open a new session: wsl -d Ubuntu-24.04 -- echo alive.

Expected Behavior

A new session starts.

Actual Behavior

Every new session fails immediately, for every distro including docker-desktop:

An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
Error code: Wsl/Service/WSAENOBUFS
  • \\wsl.localhost\Ubuntu-24.04 is unreachable.
  • Already-open sessions keep working, and so does Docker's already-open channel (docker ps answers).
  • The host is healthy: there's no socket/port exhaustion and no pool exhaustion events.
  • Only wsl --shutdown recovers it. (wsl --terminate fails with the same error.)

Diagnostic Logs

While the VM was wedged, I ran a privileged container through the still-working Docker daemon (it shares the utility VM kernel), streamed /dev/kmsg, and triggered sysrq w + sysrq t.

Two VMBus workqueues are stuck behind each other. hv_pri_chan has one vmbus_add_channel_work in flight, blocked in hvs_probe → vmbus_open → __vmbus_open → wait_for_completion, which is waiting for the host's open-channel response. 1,956 channel offers are queued behind it. hv_vmbus_rescind has one vmbus_onoffer_rescind in flight, msleep-looping (presumably waiting for that probe to finish), with 1,962 rescinds queued:

Showing busy workqueues and worker pools:
workqueue hv_vmbus_rescind: flags=0x40108
  pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=1964
    in-flight: 24186:vmbus_onmessage_work
    inactive: 1962*vmbus_onmessage_work
workqueue hv_pri_chan: flags=0x40108
  pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=1958
    in-flight: 17333:vmbus_add_channel_work
    inactive: 1956*vmbus_add_channel_work

task:kworker/0:0     state:D stack:0     pid:17333 tgid:17333 ppid:2
Workqueue: hv_pri_chan vmbus_add_channel_work
Call Trace:
 __schedule+0x4e1/0xb80
 schedule+0x2b/0xb0
 schedule_timeout+0xea/0x100
 __wait_for_common+0x98/0x1a0
 wait_for_completion+0x28/0x30
 __vmbus_open+0x392/0x550
 ? __pfx_hvs_channel_cb+0x10/0x10
 vmbus_open+0x53/0x80
 ? vsock_assign_transport+0x1ed/0x270
 hvs_probe+0x1f4/0x4c0
 vmbus_probe+0x42/0xa0
 really_probe+0xdf/0x3b0
 __driver_probe_device+0x89/0x190
 driver_probe_device+0x24/0xa0
 __device_attach_driver+0x98/0x120
 bus_for_each_drv+0x8a/0xe0
 __device_attach+0xb5/0x1c0
 device_initial_probe+0x17/0x20
 bus_probe_device+0x9d/0xa0
 device_add+0x679/0x8a0
 device_register+0x1e/0x30
 vmbus_device_register+0x87/0x130
 vmbus_add_channel_work+0x150/0x1e0
 process_one_work+0x1a2/0x3d0
 worker_thread+0x1ae/0x330
 kthread+0x111/0x260

task:kworker/0:2     state:D stack:0     pid:24186 tgid:24186 ppid:2
Workqueue: hv_vmbus_rescind vmbus_onmessage_work
Call Trace:
 __schedule+0x4e1/0xb80
 schedule+0x2b/0xb0
 schedule_timeout+0x78/0x100
 msleep+0x38/0x60
 vmbus_onoffer_rescind+0xef/0x240
 vmbus_onmessage+0x29/0x80
 vmbus_onmessage_work+0x29/0x40
 process_one_work+0x1a2/0x3d0
 worker_thread+0x1ae/0x330
 kthread+0x111/0x260

My reading: every new hvsocket connection is a new VMBus channel offer, and hv_pri_chan processes offers one at a time. The host appears to have rescinded the channel the guest was opening, so the open response never arrives. Meanwhile the rescind handler waits for that probe to finish. Nothing behind either one can run, the host's offer backlog fills, and new sessions fail with WSAENOBUFS. WSL init itself is idle: mini_init, init and the SessionLeaders are all in ordinary S-state poll/recv waits.

/sys/bus/vmbus/devices at the time: 75 devices, 63 bound to hv_sock.

Timeline (guest kmsg vs. host Kernel-Power events; guest wall-clock times are approximate across the suspend):

  • Host Modern Standby exit 5:37–5:41 PM ET (Kernel-Power 506/507).
  • Guest hv_utils: TimeSync IC version 4.0 (re-offer on resume) at 21:42:31 UTC = 5:42 PM ET.
  • First WSL (92559 - SessionLeader) ERROR: UtilAcceptVsock:281: accept4 failed 110 32 s later, then on every new-session attempt until now.

Memory wasn't under pressure (MemAvailable 13.5 GB of 16 GB, PSI ~0), and there are no vmbus_alloc_ring / page-allocation failures in the log. I think that makes this a different root cause from #40795 / PR #41690.

Possibly related: #41286 (accept4 110 after Modern Standby resume; no guest stacks there), #14005, #12969, #8763.

Host-side event logs (Hyper-V-VmSwitch/Compute, System, Application) show nothing unusual around the onset.

Full guest logs: https://gist.github.com/derekrprice/a02cf85d9cb76f9cc751d71c66303f46. It has the /dev/kmsg stream covering sysrq w + sysrq t (all task stacks plus the busy-workqueue dump), the dmesg captured before the sysrq, and the VMBus sysfs summary.

I also ran collect-wsl-logs.ps1 -LogProfile hvsocket while it was wedged, reproducing the WSAENOBUFS failure three times during the trace (0.5 MB archive, 11 MB ETL). Separately, I took full-memory dumps of wslservice, wslhost, wslrelay and wsl.exe while it was wedged (~450 MB compressed).

The script's -Dump path fails under PowerShell 7 with You cannot call a method on a null-valued expression, because System.Management.Automation.WindowsErrorReporting only exists in Windows PowerShell 5.1. I reran the dump step under powershell.exe.

I haven't attached either archive here. I can email the trace to [email protected] and share the dumps via a file link on request.

The wedge has recurred every 5–7 days, so I expect to see it again soon. Next time, I'll capture whatever else you'd find most useful before restarting. If there's a specific VMBus/hv_sock tracepoint or host trace you'd want enabled before it happens, I can leave that running.

Workaround / capture recipe for others who hit this: if Docker Desktop is running, its daemon keeps working while WSL is wedged, and this pulls the same stacks:

docker run --rm --privileged --pid=host debian sh -c 'cat /dev/kmsg > /tmp/k & P=$!; sleep 1; echo w > /proc/sysrq-trigger; sleep 3; echo t > /proc/sysrq-trigger; sleep 8; kill $P; cat /tmp/k' > kmsg.txt

Then wsl --shutdown (expect it to take ~50–90 s). After that, Docker Desktop must be restarted manually.

Activity

  1. github-actions commented on Oct 2, 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 [email protected] 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. derekrprice commented on Oct 8, 2026

    @derekrprice
    Author

    Recurred 2026-10-08. Same signature as the original report:

    • Wsl/Service/WSAENOBUFS on every new session, for both distros (Ubuntu-24.04 and docker-desktop); \wsl.localhost unreachable
    • the guest sysrq t capture again shows hvs_probe → vmbus_open stuck in wait_for_completion
    • hv_utils: TimeSync IC re-offered (the host has just resumed from Modern Standby), then SessionLeader UtilAcceptVsock: accept4 failed 110 about 30 s later

    This is the fifth occurrence since 2026-09-17 (09-17, 09-22, 09-29, 10-02, 10-08), roughly one every 5–7 days.

    Logs: the collect-wsl-logs.ps1 trace I took today while the machine was still wedged (WslLogs-2026-10-08_09-50-04.tar.gz), the 10-02 trace and today's kmsg/sysrq stream are being emailed to [email protected] with this issue's link. The process dumps from 10-02 (wsl/wslhost/wslservice, 453 MB) are too large to email; I'll send them however you prefer.

  3. derekrprice commented on Oct 13, 2026

    @derekrprice
    Author

    Recurred 2026-10-13 in a new form: new sessions now hang indefinitely instead of failing with WSAENOBUFS. \wsl.localhost and the Docker Desktop channel hang too, and hcsdiag list reports the WSL VM in state Unknown.

    This one started after a resume from hibernate (Windows auto-hibernated the machine out of Modern Standby). The earlier occurrences followed plain Modern Standby exits, so both resume paths trigger it.

    The guest was unreachable, so I couldn't capture kernel stacks this time. I'm emailing the collect-wsl-logs trace to [email protected]. I also have host process dumps (wslservice, wslhost and the hung wsl.exe launchers) that I took while it was hung, available on request.

  4. derekrprice commented on Oct 14, 2026

    @derekrprice
    Author

    Recurred 2026-10-14 on WSL 3.0.3.0, with a third error code: new sessions now fail after a ~30 s wait with Wsl/Service/WSAETIMEDOUT, for both Ubuntu-24.04 and docker-desktop. Existing sessions and \\wsl.localhost kept working.

    It started after a Modern Standby exit (Kernel-Power 507 at 08:02 local). The guest hv_utils: TimeSync IC re-offer came about 62 minutes before I captured the stacks, then the SessionLeader UtilAcceptVsock: accept4 failed 110 errors began 30 s later.

    The guest stacks are the same as before: a hv_pri_chan vmbus_add_channel_work worker in D state at hvs_probe → vmbus_open → __vmbus_open → wait_for_completion, with vmbus_onoffer_rescind waiting behind it on hv_vmbus_rescind. I captured them through a privileged container over the Docker channel, which was still working.

    I've emailed the full kmsg dump and the collect-wsl-logs trace to [email protected]. The trace includes a repro taken while WSL was wedged. wsl --shutdown recovered it in 38 s.

  5. mgrobaker commented on Nov 1, 2026

    @mgrobaker

    Adding a second machine with the same signature, in case it helps with triage. This one doesn't have Docker Desktop installed, so Docker isn't required to hit it.

    Environment:

    • Lenovo ThinkPad T14s Gen 4, Modern Standby (powercfg /a reports S0 Low Power Idle, Network Connected)
    • Debian 13 with systemd on, default NAT networking, no .wslconfig
    • WSL 3.0.3.0, kernel 6.18.54.1-1, Windows 10.0.26300.9711

    What I've seen:

    • It happened on 2026-11-01. The guest journal resumed at 13:21:47 after a gap of about 10 hours, and accept4 failed 110 began 21 seconds later. I take that gap to be standby, but I didn't pull the Kernel-Power events for this one.
    • The errors ran every 30 seconds until 13:38 and returned at 15:29, after another gap, and I restarted Windows at about 15:31. I have no stacks from the second window, so I can't say for certain that it stayed wedged throughout.
    • A capture from 2026-10-27 on the same kernel shows the same call chains. An earlier occurrence on 2026-10-26, on kernel 6.18.33.1, began 29 seconds after a lid-open wake, which I did match against the Kernel-Power log.

    The stacks below came from sysrq w about a minute after the first error. I removed the unreliable ? frames. I don't have a collect-wsl-logs trace from this occurrence, because the restart came first, but I can capture one and email it the next time this happens if that would be useful.

    task:kworker/0:1     state:D stack:0     pid:10266 tgid:10266 ppid:2      task_flags:0x4208060 flags:0x00080000
    Workqueue: hv_pri_chan vmbus_add_channel_work
    Call Trace:
     <TASK>
     __schedule+0x4c8/0xb50
     schedule+0x2b/0xb0
     schedule_timeout+0xea/0x100
     __wait_for_common+0x98/0x1a0
     wait_for_completion+0x28/0x30
     __vmbus_open+0x392/0x550
     vmbus_open+0x53/0x80
     hvs_probe+0x1f6/0x4c0
     vmbus_probe+0x42/0xa0
     really_probe+0xdf/0x3b0
     __driver_probe_device+0x8a/0x190
     driver_probe_device+0x24/0x90
     __device_attach_driver+0x98/0x120
     bus_for_each_drv+0x8a/0xe0
     __device_attach+0xb5/0x1c0
     device_initial_probe+0x17/0x20
     bus_probe_device+0x9d/0xa0
     device_add+0x679/0x8b0
     device_register+0x1e/0x30
     vmbus_device_register+0x87/0x130
     vmbus_add_channel_work+0x150/0x1e0
     process_one_work+0x1a2/0x3d0
     worker_thread+0x1ae/0x330
     kthread+0x111/0x260
     ret_from_fork+0x137/0x190
     ret_from_fork_asm+0x1a/0x30
     </TASK>
    task:kworker/0:3     state:D stack:0     pid:10721 tgid:10721 ppid:2      task_flags:0x4208060 flags:0x00080000
    Workqueue: hv_vmbus_rescind vmbus_onmessage_work
    Call Trace:
     <TASK>
     __schedule+0x4c8/0xb50
     schedule+0x2b/0xb0
     schedule_timeout+0x78/0x100
     msleep+0x38/0x60
     vmbus_onoffer_rescind+0xef/0x240
     vmbus_onmessage+0x29/0x80
     vmbus_onmessage_work+0x29/0x40
     process_one_work+0x1a2/0x3d0
     worker_thread+0x1ae/0x330
     kthread+0x111/0x260
     ret_from_fork+0x137/0x190
     ret_from_fork_asm+0x1a/0x30
     </TASK>
    
    workqueue hv_vmbus_rescind: flags=0x40108
        in-flight: 10721:vmbus_onmessage_work
        inactive: 32*vmbus_onmessage_work
    workqueue hv_pri_chan: flags=0x40108
        in-flight: 10266:vmbus_add_channel_work
        inactive: 18*vmbus_add_channel_work
    
  6. puerari commented on Nov 2, 2026

    @puerari

    Same signature, different trigger: no sleep or resume involved

    I have been chasing this exact failure since Oct 21 and only found this issue
    today. I believe it is the same bug, reached by a different path, so I am adding
    data rather than opening a duplicate.

    Environment

    Identical to the second reporter in this thread, down to the UBR:

    • Windows 11 Pro 26H2, build 26300.9711
    • WSL 3.0.3.0, kernel 6.18.54.1-1
    • Docker running inside the distro under systemd (not Docker Desktop), 14 containers
    • .wslconfig: networkingMode=mirrored, nestedVirtualization=true, [experimental] autoMemoryReclaim=gradual

    Why I think it is the same bug

    Symptom by symptom against this thread:

    • Wsl/Service/WSAENOBUFS on every new session, for all distros.
    • The Wsl/Service/WSAETIMEDOUT variant after roughly 30 s, as you saw on 3.0.3.0.
    • Occurrences where new sessions just hang. Two of mine ended at 180 s, which is
      my client's own socket timeout rather than anything WSL reported.
    • Already-open sessions and the Docker channel keep working. The VM stays alive
      and keeps serving its published ports throughout, while \\wsl.localhost is
      unreachable.
    • wsl --shutdown is the only recovery, and it can wedge too (details below).

    What is different: the trigger

    No Modern Standby, no hibernate, no resume of any kind. Fast Startup has
    been off on this machine since Oct 21 (HiberbootEnabled=0, and Kernel-Boot
    event 27 reports BootType=0 on every boot since). Nine occurrences since
    Oct 21, every one of them on a cold-booted system, several within a few hours
    of boot.

    What drives it here is sustained, high-rate hvsocket channel churn. A
    third-party terminal application on this machine polls once per open project,
    and each poll spawns a separate wsl.exe rather than reusing a channel:
    shell detection, gh auth status, gh pr view, and a PATH probe. Measured with
    WMI process-creation events: about 4 wsl.exe per minute sustained, with a
    burst of roughly 30 concurrent at that application's own startup. Each
    invocation leaves a wslhost.exe behind, accumulating at 180-240 per hour.

    Given your reading that each new hvsocket connection is a new channel offer, and
    that the deadlock is a race between an offer being processed and a rescind
    arriving, high churn seems like a plausible second route into the same race: it
    produces a constant stream of rescinds concurrent with opens.

    Reproduction

    Not deterministic, but it hit 8 of 17 attempts here:

    1. Let that channel churn run for 2 to 3 hours on a cold-booted machine.
    2. Then have a client open 3 exec channels concurrently.

    In my case step 2 is a second application's startup, which fires exactly three
    concurrent exec channels. A single channel never fails outright, it only
    gets slow, so the failure is specific to concurrent channel creation. I was
    chasing this for days with a single-channel probe that never caught anything:
    132 probe cycles in one day, zero failures, while the real failure was sitting
    right there.

    Progressive degradation, not a step change

    Because my trigger is churn rather than a resume, I can watch it build. A probe
    every 5 minutes, each cycle timing one single channel and one burst of three:

    time single channel burst of 3 orphan wslhost
    13:41 256 ms 223 ms 120
    14:17 213 ms 231 ms 123
    15:02 262 ms 379 ms 194
    15:23 188 ms 309 ms 238
    15:28 329 ms 489 ms 266
    15:38 49,486 ms 270,100 ms, 3 of 3 failed 301
    16:04 681,378 ms, then failed 510,213 ms 301

    The burst latency roughly doubles about 35 minutes before the collapse, which
    makes this predictable here. Note the single channel does not stay healthy:
    at the moment of failure it took 49 s, and in the next cycle 11.4 minutes. So
    the whole channel-creation path degrades, and the concurrent case simply
    collapses first.

    Guest-side channel counts

    ls /sys/bus/vmbus/devices | wc -l climbs monotonically under this churn:

    17:04 - 730     17:15 - 814     17:25 - 912
    17:10 - 736     17:20 - 835     17:36 - 1032
    

    About +9 per minute, with roughly 99 percent bound to hv_sock. For
    contrast, your wedged capture showed 75 devices with 63 on hv_sock, so this
    machine sits an order of magnitude higher while still healthy.

    Host-side numbers at the moment of the wedge were unremarkable, which matches
    your finding that this is not memory pressure: nonpaged pool 1,576 MB, 227 of
    16,384 ephemeral ports in use, and vmwp handle and thread counts lower than
    a known-healthy baseline taken right after a restart.

    I captured sysrq w and t in a healthy state as a baseline: vmbus
    workqueues empty, 880 devices, 864 on hv_sock.

    A recovery datum that may help isolate what holds the deadlock

    On Nov 2, with the channel wedged:

    • wsl --shutdown did not return for more than 10 minutes (your reports:
      38 to 90 s). Throughout, vmmemWSL was alive with 7.5 GB resident, containers
      were serving, and wslservice had accumulated 0 s of CPU - blocked, not
      spinning.
    • Killing 290 orphaned wslhost.exe, which released 105,347 handles and
      took the system total from 328,555 to 223,208, did not unblock it. A
      single exec still hung past 30 s.
    • Killing the 24 stuck wsl.exe launcher processes, including the stuck
      --shutdown itself, did: a single exec returned in 11.9 s and the VM came
      back with a fresh uptime.

    So on this machine the thing holding it was the stuck launchers, not the volume
    of host-side handles. That also argues the channel count is a correlate rather
    than a sufficient trigger.

    Logs

    I have a collect-wsl-logs.ps1 -LogProfile hvsocket collection from a
    healthy state on this machine, which I can attach or email if a contrast
    baseline is useful - the failure is not in it. I will collect and send the
    wedged-state one when it next reproduces.

    I have a sentinel armed inside the guest for that: a
    pre-opened session, since wsl --exec cannot open a new one while wedged,
    which fires the same sysrq w / t capture through a privileged container the
    moment my probe detects the failure. I will post the stacks and the workqueue
    depths when it next reproduces.

    One note for anyone else trying that capture: kernel.sysrq is 176 on this
    kernel, and that mask does not include bit 8 (process dumps), so w and t
    are silently ignored. It has to be set to 1 first, which a privileged container
    can do.

  7. puerari commented on Nov 2, 2026

    @puerari

    Correction to my earlier comment: I cannot provide the workqueue depths

    Above I said I would post "the stacks and the workqueue depths" when this next
    reproduces. The stacks I can deliver. The workqueue depths I cannot, not on
    this kernel, and I would rather correct that now than go quiet on it later.

    Three measurements, all on 6.18.54.1-microsoft-standard-WSL2:

    1. There is no workqueue sysrq key here. Writing an unregistered key to
    /proc/sysrq-trigger makes the kernel print every registered handler:

    loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f)
    kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l)
    show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p)
    show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u)
    show-blocked-tasks(w) dump-ftrace-buffer(z) replay-kernel-logs(R)
    

    w is show-blocked-tasks, not "show busy workqueues". I had assumed otherwise
    and built my capture around that assumption.

    2. No CONFIG_WQ_WATCHDOG.
    /sys/module/workqueue/parameters/watchdog_thresh does not exist, neither in
    the distro nor in a privileged container. So the inactive: NNNN*vmbus_add_channel_work form cannot be produced on this build at all -
    that output comes from show_all_workqueues(), and on this kernel nothing is
    left that would call it.

    3. kworkers are not visible from inside the distro. The distro runs in its
    own PID namespace: /proc/2/comm is WSL's init-systemd shim rather than
    kthreadd, and /proc/self/ns/pid is a non-initial namespace. From the
    distro, /proc/[0-9]*/comm lists 852 processes and zero kworkers; a
    privileged container with --pid=host sees 872 and also zero. Reading
    /proc/<pid>/stack therefore can never show vmbus_add_channel_work here,
    although dmesg has 49 mentions of kworkers - the kernel sees them, only its
    own output exposes them.

    What that assumption cost me: a 71,684-line capture holding 1,716 call traces
    and zero occurrences of any vmbus symbol, which I first read as a defect in my
    own tooling rather than a property of the platform.

    What I can still deliver

    sysrq w and t written to /proc/sysrq-trigger and read back from
    /dev/kmsg, from inside a privileged container because kernel.sysrq is 176
    on this kernel and that mask excludes bit 8. That does give the blocked-task
    stacks, which is where a kworker stuck in hvs_probe -> vmbus_open should
    appear, and where vmbus_onoffer_rescind in msleep should appear beside it. My
    sentinel now does exactly that and prints a signature summary; I verified it
    end to end against a healthy state, where it correctly reports zero for every
    symbol.

    So when this reproduces I will post the blocked-task stacks and the channel
    counts, and not the queue depths.

    One question that might be worth folding into the issue body

    How was the NNNN*vmbus_add_channel_work output in this thread obtained? If it
    came from the workqueue watchdog, it needs a kernel built with
    CONFIG_WQ_WATCHDOG, which the shipping WSL kernel is not. Stating that in the
    issue would save other reporters the detour I just took, since the natural
    reading of "sysrq w" is that the depths come for free.

  8. derekrprice commented on Nov 3, 2026

    @derekrprice
    Author

    Recurred 2026-11-03 (WSL 3.0.3.0), as Wsl/Service/WSAENOBUFS again, for both distros. It followed this morning's Modern Standby resumes. Network connectivity in standby has been disabled on this machine since 2026-10-14 (powercfg F15576E8-… = 0 for AC and DC), so network-connected standby is not required to hit it.

    The stacks are the same: hvs_probe → vmbus_open → wait_for_completion and vmbus_onoffer_rescind in msleep. The guest had 87 vmbus devices, 81 of them on hv_sock.

    Leandro Puerari (@puerari), on the workqueue depths: they come from sysrq t, not w. On this kernel the Show State handler ends with show_all_workqueues() ("Showing busy workqueues and worker pools:"), which needs no CONFIG_WQ_WATCHDOG. The catch is that it prints after the full task dump, so a short /dev/kmsg read cuts it off. My first capture today used an 8 s read and missed it. A 40 s read got it:

    Showing busy workqueues and worker pools:
    workqueue hv_vmbus_rescind: flags=0x40108
      pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=1958
        in-flight: 10339:vmbus_onmessage_work
        inactive: 1956*vmbus_onmessage_work
    workqueue hv_pri_chan: flags=0x40108
      pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=1946
        in-flight: 11639:vmbus_add_channel_work
        inactive: 1944*vmbus_add_channel_work
    
    docker run --rm --privileged --pid=host python:3.12-slim sh -c \
      'cat /dev/kmsg > /tmp/k & P=$!; sleep 1; echo t > /proc/sysrq-trigger; sleep 40; kill $P; cat /tmp/k'

    Also, kernel.sysrq was 176 here too, and w/t still worked. That mask only gates the keyboard; writes to /proc/sysrq-trigger from root are always allowed. So you shouldn't need to change it.

  9. puerari commented on Nov 3, 2026

    @puerari

    Confirmed, and my earlier comment was wrong

    You are right on both counts, and I reproduced both here. Thank you - that
    saves me the detour I had already talked myself into.

    The depths do come from sysrq t. With kernel.sysrq left at 176, no
    mask change at all, echo t > /proc/sysrq-trigger and a 45 s /dev/kmsg read
    gave me 74,998 lines ending in Showing busy workqueues and worker pools:.
    Healthy state here, so the interesting line is just refcnt=2, against your
    refcnt=1958. So the baseline shape is confirmed too.

    Why my capture missed it, for anyone else repeating this: the task dump on
    this machine is about 75,000 lines, and an 8 s read ends roughly 70,000 lines
    short of the tail where show_all_workqueues() prints. The dump length scales
    with task count, and this guest was carrying ~850 tasks, so the required read
    is longer here than on a lightly loaded VM. Worth over-provisioning: I moved
    mine to 45 s. If someone reads for 8 s and sees a clean dump with no workqueue
    section, that is the symptom, not an absent feature.

    And on the mask: agreed, and it is visible in the source -
    write_sysrq_trigger() calls __handle_sysrq() with check_mask = false, so
    a root write to /proc/sysrq-trigger is never gated by kernel.sysrq. I had
    been setting it to 1 inside a privileged container for no reason; I have put it
    back to 176.

    So please disregard the "cannot be produced on this build" claim in my previous
    comment. It was produced on this build, with a longer read.

    One confirmation on your trigger datum, from the other direction: my
    occurrences have no standby or resume involved at all, and yours now has
    network connectivity in standby disabled since Oct 14. Between us that leaves
    concurrent channel creation during offer/rescind churn as the common factor,
    rather than anything specific to power transitions.

    I will post the wedged-state capture with the queue depths when this next
    reproduces here, now that I can actually read them.

  10. derekrprice commented on Nov 5, 2026

    @derekrprice
    Author

    8th recurrence, WSL 3.0.3.0. Trigger this time was a resume from auto-hibernate (Hibernate from Sleep - Standby Battery Budget Exceeded), not a plain Modern Standby exit. Identical hvs_probe → __vmbus_open / vmbus_onoffer_rescind stacks; existing channels (open terminals, 9P, docker) unaffected, only new sessions fail with Wsl/Service/WSAETIMEDOUT; first accept4 failed 110 ~48 s after resume. kmsg available on request.

  11. chessturo commented on Nov 5, 2026

    @chessturo
    Contributor

    Derek (@derekrprice) can you try 3.0.5? (You should be able to get it with wsl --update --pre-release.) This issue should be fixed in that release; if it recurs there, please let me know. Thanks!

  12. derekrprice commented on Nov 9, 2026

    @derekrprice
    Author

    Another recurrence today (2026-11-09, WSL 3.0.3.0), and this time there was no hibernate, so hibernate isn't required to trigger this.

    Today: the host was in plain Modern Standby from Friday 16:08 to Monday 08:46 local time, with no Kernel-Power 42 hibernate event in between. There was also an "Austerity Battery Drain Budget Exceeded" standby transition at 09:09. After that, new sessions fail with Wsl/Service/WSAETIMEDOUT in both distros and \\wsl.localhost hangs, while already-open channels (docker) keep working. sysrq w/t shows the same stacks as before: a hv_pri_chan vmbus_add_channel_work worker in D state in hvs_probe → vmbus_open → __vmbus_open → wait_for_completion, then SessionLeader UtilAcceptVsock: accept4 failed 110 right after the hv_utils: TimeSync IC re-offer on resume.

    Possibly useful: the same ring buffer has hung-task warnings for hv_pri_chan vmbus_add_channel_work in hvs_probe about 6 h after the last VM start (Friday ~14:45 local). That was right after a power-button wake from standby, and nothing visibly failed at that point. The worker may have been stuck for ~3 days before sessions started failing.

    Tally since 2026-10-07, rebuilt from the System log (Power-Troubleshooter 1 + Kernel-Power 42):

    Resume type Resumes Wedged
    Hibernate ("Standby Battery Budget Exceeded") 15 6 (10-08, 10-13, 10-14, 11-03, 11-05, 11-06)
    Plain Modern Standby, no hibernate many per day 2 (10-02, 11-09)

    So hibernate resumes wedge about 40% of the time. Plain standby resumes wedge much less often, but they can still do it. That fits the other reports here, including the one with no standby at all, where the trigger was high channel churn. The common factor looks like a VMBus channel open that never completes, and a host power transition is just the most common way for us to hit it.

    kmsg-sysrq.txt for today is available. I can email it to wsl-gh-logs along with a fresh collect-wsl-logs trace if that would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

emailed-logskernelneeds-author-feedback

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions