Repository navigation
Description
Windows Version
Microsoft Windows [Version 10.0.26200.9974] (Windows 11 Pro 25H2, running as a VM guest; read from a sibling image built by the same weekly update)
WSL Version
3.0.5.0
Are you using WSL 1, WSL 2, or WSLC?
- WSL 2
Kernel Version
6.18.58.1-microsoft-standard-WSL2
Distro Version
Ubuntu 26.04.1
Other Software
Windows runs as a VM on a Linux KVM host (Intel Xeon E5-2697 v2), with Hyper-V, VBS and memory integrity (HVCI) on inside the guest, so hvix64 runs nested. Reproduced under QEMU 11.1.3 and under openvmm on the same host. Full data, traces and the openvmm side are in microsoft/openvmm#5306.
Repro Steps
Each run starts from the same clean snapshot of the guest:
- Boot. Run any command in the WSL2 distro, so the utility VM starts.
- Restart Windows from inside (
shutdown /r /t 0). - Run the WSL2 command again.
- Shut down from inside (
shutdown /s /t 0).
The control runs skip both WSL2 steps. A host-side ftrace recorder captured the restart and the shutdown of every run. Runs went one at a time on an otherwise idle host, with the configurations interleaved.
Expected Behavior
The guest restarts in step 2 and powers off in step 4.
Actual Behavior
In some runs one parked CPU triple-faults at the end of the restart or the shutdown. A fault at the restart looks like an ordinary reset from outside, and the guest boots normally. A fault at the final shutdown ends in a reset instead of a power-off, and occasionally in a hang. The System log shows an ordinary shutdown request and no crash dump.
Triple faults per phase, first series (final shutdown requested by the host):
with WSL2 without WSL2
runs restart final runs faults
openvmm, guest RAM on 4 KiB pages 19 0 3 20 0
openvmm, guest RAM on 2 MiB pages 39 5 4 20 0
QEMU 38 2 0 19 0
No run without WSL2 faulted. Over the first 20 runs of each arm the WSL2 effect is p = 0.11, 0.02 and 1.0 for the three rows (Fisher, run level); pooled, 9 of 57 against 0 of 59 (p = 0.001, a comparison I chose after the fact, so descriptive only).
Second, pre-registered series with the final shutdown requested inside the guest on both VMMs: openvmm 3 of 20, QEMU 2 of 20 (p = 1.0). So the shutdown fault doesn't need a host request, and both VMMs show it.
Every caught fault follows the same sequence:
- At termination the 15 APs park. Going by the public symbols this is
SkpTerminateCompleteSecondaryin securekernel.exe: it loads a copied GDT and an IDT with limit 0, then runsnop; hlt; jmp $-2. - A parked AP receives an interrupt with vector 0xEF. Under openvmm it comes from a direct-mode STIMER0 that hvix64 armed. Under QEMU, which doesn't offer direct-mode timers here, an interrupt with the same vector arrives from that AP's own vCPU thread; I couldn't trace where it originates.
- hvix64 re-enters the parked L2 AP at
hlt+1, in the active state, with no event to inject. - 7 to 21 us later (across the 45 faulting vCPUs I traced) the AP triple-faults at the
jmpafter thehlt. In the two runs I traced in full detail, the fault was an instruction-fetch page fault with CR2 equal to RIP, after the BSP had begun zeroing the VTL1 page tables. With a limit-0 IDT the page fault becomes a triple fault.
In one hang I read hvix64's state from guest memory: it had raised bugcheck 0x26 for the triple fault, and the rendezvous it starts for the crash dump crossed the power-off rendezvous that was already running, so neither completed.
The interrupt alone is not the problem. At the restart, 70 to 94% of the parked APs receive 0xEF after parking in every configuration, with and without WSL2. Without WSL2, hvix64 resumed none of them (none of roughly 700 such deliveries). With WSL2 it resumes some, most of those APs run jmp $-2 and halt again harmlessly, and the faults are among them. So the step that differs is hvix64 deciding to resume a parked VP, and that only happens once WSL2 has run.
Two guest-side changes would close the window: don't resume a VP parked this way unless an NMI, INIT or SIPI is pending, or keep the terminating APs from being resumed until power-off. I'd like to know what starting the WSL2 utility VM changes in hvix64's handling of the root's VPs, since I can't see that from outside.
I filed this here because WSL2 is the trigger and this repo's hypervisor-platform label reaches the people who own hvix64 and the secure kernel. I haven't tried it with Hyper-V as L0.
Diagnostic Logs
No WSL logs, since WSL itself works. I can share the host-side ftrace captures and the analysis scripts, or run a test build.
Activity
github-actions commentedon Nov 27, 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 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'.
bitranox commentedon Nov 27, 2026
vbs-shutdown-traces.zip
WslLogs-2026-11-27_12-39-50.tar.gz
Logs and traces are in the two files attached to this comment.
WslLogs-2026-11-27_12-39-50.tar.gz:collect-wsl-logs.ps1, run elevated inside the affected guest. That confirms the versions in the issue on the tested guest itself (Windows 10.0.26200.9974, WSL 3.0.5.0, kernel 6.18.58.1). The capture covers one ordinary WSL2 start and command, because WSL itself works. The fault happens at the very end of a restart or shutdown, and that ends the trace session, so these logs can't contain it. This time the guest powered off cleanly.vbs-shutdown-traces.zip: the host-side ftrace captures I mentioned, each cut to the 250 ms before the fault: two QEMU and three openvmm faults from the second series, plus the two earlier runs I traced in full detail.README.mdin the zip describes each file and how to find the sequence in it.tfrec.pyandtfana.pyare the recorder and the analyzer.The CR2 values in the two detailed runs came from a bpftrace probe whose output I didn't save, so they aren't in the files. I can re-run that probe and attach its output if that helps.
bitranox commentedon Nov 27, 2026
Update: a nested Windows Server VM doesn't trigger it, so it does look specific to WSL2
To find out whether any Hyper-V child partition triggers this or only WSL2's utility VM, I repeated the in-guest series with a different child: a Windows Server 2025 Core VM under the guest's own Hyper-V (Gen2, 2 vCPUs, 2 GB, no NIC, Secure Boot on). Each run starts the nested VM and waits for its heartbeat, restarts Windows from inside with the nested VM still running, starts it again, and then shuts down from inside (
shutdown /s /t 0) with it running. Apart from the nested load, the series is the same as the WSL2 one above: same recorder, same analysis, same validity rules, all written down before the first run.With WSL2, in-guest: openvmm 3 of 20, QEMU 2 of 20. Twenty clean runs don't prove the nested Server can never trigger it, but at WSL2's rates a clean 20 would come up about 4% of the time on openvmm and 12% on QEMU.
The traces show more than the counts do. Across all 80 restart and shutdown records in this series, hvix64 didn't resume a single parked AP. With WSL2 it resumed at least one in 30 of 80. Under openvmm at the restart, most runs still had an armed STIMER0 on every parked AP at the last park (median 15 of 15), as with WSL2, and hvix64 resumed none of them. I didn't pre-register this comparison, so it's descriptive.
So a running child partition alone isn't enough. Either something WSL2 does or the way its utility VM is set up changes whether hvix64 resumes a parked root VP. What does the WSL2 utility VM get that a plain Hyper-V VM doesn't? A partition property, a scheduler or timer setting, or something that stays registered with the hypervisor after the VM stops would all fit what I see from the host. If there's a setting I can flip to narrow it down, I'll run it.