You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
whp: a killed h9 process stays alive after its lock is released #376
Found by minipg's stress suite in a cross-platform test round on AWS against hyper9 22d395c (progrium/minipg#27). Windows, WHP backend.
What happens
minipg's crash tests kill minipg.exe (which embeds h9 and runs Postgres in a WHP machine) and then check that no processes remain. On Windows, the killed process releases its lock, but the process itself stays alive for a while afterwards. The crash tests then fail with "processes remain". There were 40 of these failures in the round.
The likely cause is the WHP machine teardown: something in tearing down the partition or its vCPU threads keeps the process from exiting after it's been told to die. This hasn't been confirmed by looking at the process (for example, which threads are still alive or what they're blocked on).
Expected
Once the process is killed, it's gone promptly, as on Linux (KVM, sud) and Mac (HVF), where these crash tests pass.
Evidence
The logs from this round are on the h9dev machine in ~/minipg-test/results4/. The "processes remain" failures are in windows/stress.log.
Next steps
Reproduce, and while the process is lingering, dump its threads' stacks (Process Explorer or procdump) to see what is blocking exit, for example a vCPU thread stuck in WHvRunVirtualProcessor or a wait during WHvDeletePartition.
This looks like a problem in minipg's test rather than in h9. The stress suite's waitStopped checked for leftover processes as soon as the .pgdb lock was free. On Windows the lock is released when the killed process's handles close, which happens before the process itself has exited. After TerminateProcess the process can still be tearing down its address space, which here includes the WHP machine's committed guest memory. That's gigabytes, so the process can linger a while.
progrium/minipg#28 (commit c384674) now gives the processes up to 15 s to exit after the lock is released, and logs how long they took. It still fails if a process is left after that. If the Windows round still shows "processes remain" with this change, the process really is stuck, and the thread-stack dump suggested above is the next step.
Activity
stress: give a killed server's processes time to exit after its lock …
progrium commentedon Nov 28, 2026
This looks like a problem in minipg's test rather than in h9. The stress suite's
waitStoppedchecked for leftover processes as soon as the.pgdblock was free. On Windows the lock is released when the killed process's handles close, which happens before the process itself has exited. AfterTerminateProcessthe process can still be tearing down its address space, which here includes the WHP machine's committed guest memory. That's gigabytes, so the process can linger a while.progrium/minipg#28 (commit c384674) now gives the processes up to 15 s to exit after the lock is released, and logs how long they took. It still fails if a process is left after that. If the Windows round still shows "processes remain" with this change, the process really is stuck, and the thread-stack dump suggested above is the next step.
Generated by Claude Code
Re-land #28 on main: linked root cache, Windows memory, status after …