Repository navigation
Description
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.
- Leave WSL 2 running (Ubuntu terminals + Docker Desktop) and let the laptop enter and exit Modern Standby normally.
- 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.04is unreachable.- Already-open sessions keep working, and so does Docker's already-open channel (
docker psanswers). - The host is healthy: there's no socket/port exhaustion and no pool exhaustion events.
- Only
wsl --shutdownrecovers it. (wsl --terminatefails 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 11032 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
github-actions commentedon Oct 2, 2026
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:
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 networkinginstead, following the instructions in Collect WSL logs for networking issuesOnce 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'.
derekrprice commentedon Oct 8, 2026
Recurred 2026-10-08. Same signature as the original report:
Wsl/Service/WSAENOBUFSon every new session, for both distros (Ubuntu-24.04 and docker-desktop);\wsl.localhostunreachablesysrq tcapture again showshvs_probe → vmbus_openstuck inwait_for_completionhv_utils: TimeSync ICre-offered (the host has just resumed from Modern Standby), thenSessionLeader UtilAcceptVsock: accept4 failed 110about 30 s laterThis 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.ps1trace 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.derekrprice commentedon Oct 13, 2026
Recurred 2026-10-13 in a new form: new sessions now hang indefinitely instead of failing with WSAENOBUFS.
\wsl.localhostand the Docker Desktop channel hang too, andhcsdiag listreports the WSL VM in stateUnknown.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.
derekrprice commentedon Oct 14, 2026
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.localhostkept working.It started after a Modern Standby exit (Kernel-Power 507 at 08:02 local). The guest
hv_utils: TimeSync ICre-offer came about 62 minutes before I captured the stacks, then theSessionLeader UtilAcceptVsock: accept4 failed 110errors began 30 s later.The guest stacks are the same as before: a
hv_pri_chanvmbus_add_channel_workworker in D state athvs_probe → vmbus_open → __vmbus_open → wait_for_completion, withvmbus_onoffer_rescindwaiting behind it onhv_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 --shutdownrecovered it in 38 s.mgrobaker commentedon Nov 1, 2026
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:
powercfg /areports S0 Low Power Idle, Network Connected).wslconfigWhat I've seen:
accept4 failed 110began 21 seconds later. I take that gap to be standby, but I didn't pull the Kernel-Power events for this one.The stacks below came from
sysrq wabout a minute after the first error. I removed the unreliable?frames. I don't have acollect-wsl-logstrace 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.puerari commentedon Nov 2, 2026
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:
.wslconfig:networkingMode=mirrored,nestedVirtualization=true,[experimental] autoMemoryReclaim=gradualWhy I think it is the same bug
Symptom by symptom against this thread:
Wsl/Service/WSAENOBUFSon every new session, for all distros.Wsl/Service/WSAETIMEDOUTvariant after roughly 30 s, as you saw on 3.0.3.0.my client's own socket timeout rather than anything WSL reported.
and keeps serving its published ports throughout, while
\\wsl.localhostisunreachable.
wsl --shutdownis 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, andKernel-Bootevent 27 reports
BootType=0on every boot since). Nine occurrences sinceOct 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.exerather than reusing a channel:shell detection,
gh auth status,gh pr view, and a PATH probe. Measured withWMI process-creation events: about 4
wsl.exeper minute sustained, with aburst of roughly 30 concurrent at that application's own startup. Each
invocation leaves a
wslhost.exebehind, 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:
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:
wslhostThe 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 -lclimbs monotonically under this churn:About +9 per minute, with roughly 99 percent bound to
hv_sock. Forcontrast, your wedged capture showed 75 devices with 63 on
hv_sock, so thismachine 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
vmwphandle and thread counts lower thana known-healthy baseline taken right after a restart.
I captured
sysrq wandtin a healthy state as a baseline: vmbusworkqueues 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 --shutdowndid not return for more than 10 minutes (your reports:38 to 90 s). Throughout,
vmmemWSLwas alive with 7.5 GB resident, containerswere serving, and
wslservicehad accumulated 0 s of CPU - blocked, notspinning.
wslhost.exe, which released 105,347 handles andtook the system total from 328,555 to 223,208, did not unblock it. A
single exec still hung past 30 s.
wsl.exelauncher processes, including the stuck--shutdownitself, did: a single exec returned in 11.9 s and the VM cameback 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 hvsocketcollection from ahealthy 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 --execcannot open a new one while wedged,which fires the same
sysrq w/tcapture through a privileged container themoment 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.sysrqis 176 on thiskernel, and that mask does not include bit 8 (process dumps), so
wandtare silently ignored. It has to be set to 1 first, which a privileged container
can do.
puerari commentedon Nov 2, 2026
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-triggermakes the kernel print every registered handler:wis show-blocked-tasks, not "show busy workqueues". I had assumed otherwiseand built my capture around that assumption.
2. No
CONFIG_WQ_WATCHDOG./sys/module/workqueue/parameters/watchdog_threshdoes not exist, neither inthe distro nor in a privileged container. So the
inactive: NNNN*vmbus_add_channel_workform cannot be produced on this build at all -that output comes from
show_all_workqueues(), and on this kernel nothing isleft that would call it.
3. kworkers are not visible from inside the distro. The distro runs in its
own PID namespace:
/proc/2/commis WSL'sinit-systemdshim rather thankthreadd, and/proc/self/ns/pidis a non-initial namespace. From thedistro,
/proc/[0-9]*/commlists 852 processes and zero kworkers; aprivileged container with
--pid=hostsees 872 and also zero. Reading/proc/<pid>/stacktherefore can never showvmbus_add_channel_workhere,although
dmesghas 49 mentions of kworkers - the kernel sees them, only itsown 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 wandtwritten to/proc/sysrq-triggerand read back from/dev/kmsg, from inside a privileged container becausekernel.sysrqis 176on 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_openshouldappear, and where
vmbus_onoffer_rescindin msleep should appear beside it. Mysentinel 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_workoutput in this thread obtained? If itcame from the workqueue watchdog, it needs a kernel built with
CONFIG_WQ_WATCHDOG, which the shipping WSL kernel is not. Stating that in theissue would save other reporters the detour I just took, since the natural
reading of "sysrq w" is that the depths come for free.
derekrprice commentedon Nov 3, 2026
Recurred 2026-11-03 (WSL 3.0.3.0), as
Wsl/Service/WSAENOBUFSagain, 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 (powercfgF15576E8-…= 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_completionandvmbus_onoffer_rescindin 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, notw. On this kernel the Show State handler ends withshow_all_workqueues()("Showing busy workqueues and worker pools:"), which needs noCONFIG_WQ_WATCHDOG. The catch is that it prints after the full task dump, so a short/dev/kmsgread cuts it off. My first capture today used an 8 s read and missed it. A 40 s read got it: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.sysrqwas 176 here too, andw/tstill worked. That mask only gates the keyboard; writes to/proc/sysrq-triggerfrom root are always allowed. So you shouldn't need to change it.puerari commentedon Nov 3, 2026
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. Withkernel.sysrqleft at 176, nomask change at all,
echo t > /proc/sysrq-triggerand a 45 s/dev/kmsgreadgave me 74,998 lines ending in
Showing busy workqueues and worker pools:.Healthy state here, so the interesting line is just
refcnt=2, against yourrefcnt=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 scaleswith 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()withcheck_mask = false, soa root write to
/proc/sysrq-triggeris never gated bykernel.sysrq. I hadbeen 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.
derekrprice commentedon Nov 5, 2026
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. Identicalhvs_probe → __vmbus_open/vmbus_onoffer_rescindstacks; existing channels (open terminals, 9P, docker) unaffected, only new sessions fail withWsl/Service/WSAETIMEDOUT; firstaccept4 failed 110~48 s after resume. kmsg available on request.chessturo commentedon Nov 5, 2026
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!derekrprice commentedon Nov 9, 2026
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 42hibernate event in between. There was also an "Austerity Battery Drain Budget Exceeded" standby transition at 09:09. After that, new sessions fail withWsl/Service/WSAETIMEDOUTin both distros and\\wsl.localhosthangs, while already-open channels (docker) keep working.sysrq w/tshows the same stacks as before: ahv_pri_chanvmbus_add_channel_workworker in D state inhvs_probe → vmbus_open → __vmbus_open → wait_for_completion, thenSessionLeader UtilAcceptVsock: accept4 failed 110right after thehv_utils: TimeSync ICre-offer on resume.Possibly useful: the same ring buffer has hung-task warnings for
hv_pri_chan vmbus_add_channel_workinhvs_probeabout 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):
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.txtfor today is available. I can email it to wsl-gh-logs along with a freshcollect-wsl-logstrace if that would help.