WSL2 VM gets paused for ~3-4s every ~32-35s (host side, no guest panic, survives every update)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
## Setup
- WSL 2.7.3.0, kernel 6.6.114.1-1, WSLg 1.0.73
- Windows 11 Pro, build 26200.8457
- HP laptop, Intel CPU, Modern Standby (S0 low power idle) is active even on AC power
- Distro: Ubuntu-24.04, login shell is fish, but it also happens under plain bash
## What happens
Every 32 to 35 seconds the whole WSL2 VM freezes for about 3 to 4 seconds. The guest loses monotonic time during the freeze, and when it comes back the clock jumps forward (looks like hv timesync correcting it afterwards). When a freeze runs long enough my `wsl.exe -e` session drops back to the PowerShell prompt, which is what originally looked like WSL dying silently.
The period is wall clock aligned: the offset of the first freeze changes from boot to boot, but the spacing is always around 32 to 35 seconds.
## How I narrowed it down
I ran a 1Hz loop inside the guest (`sleep 1` plus `date +%s.%N`) and logged every iteration where the gap was over 1.5s. Roughly every 32 to 35 seconds one iteration shows a ~3.9s gap.
This is a host side pause of the VM, not a guest crash and not CPU steal:
- boot_id stays the same across the freeze and across a full reboot. No kernel panic, oops or OOM. No crash dump either, even though the kernel cmdline has `WSL_ENABLE_CRASH_DUMP=1` and `panic=-1`, so a real guest panic would have left one.
- During a freeze the guest steal time delta is 0, and the idle tick counters only advance about 1 second worth over a ~3.9s wall interval. So the vCPUs are not executing at all, they are not just starved while runnable.
- A PowerShell sampler running on the host keeps sampling cleanly every ~1.2s straight through the guest freeze. So the host itself is fine. This is not host wide Modern Standby or frequency throttling.
## Things I ruled out (freeze stayed exactly the same after each)
- Updating WSL, the kernel, the HP firmware and Windows
- Power Mode set to Best Performance
- Windows Defender process and VHD exclusions
- Stopping the Intel DPTF / Innovation Platform Framework / Context Sensing services
- Stopping SysMain
- Stopping Citrix Device Posture and the NordVPN service
So it does not look like a third party agent or any of the usual power/AV suspects. It feels like something at the Hyper-V or platform layer is quiescing the VM on a timer.
## Logs
I have a collect-wsl-logs.ps1 bundle with an 80s WPR/WSL trace (logs.etl) that covers at least two of these freezes. I kept it out of the issue on purpose, since the etl trace carries the machine name, user name and the full running process list. Happy to share it if a maintainer needs it, ideally over a private channel.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the 1Hz guest loop, then inspect the 80s WPR/WSL trace in logs.etl and the collection steps in collect-wsl-logs.ps1. Done means identifying the host or Hyper-V/platform component responsible and defining a reproducible fix or targeted test that prevents the periodic VM pauses.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100