nx_hangprobe_gate.nx
buildroot/runtime/nx_hangprobe_gate.nx
about
nx_hangprobe_gate.nx -- a gate that DELIBERATELY HANGS, to prove /api/gate_run's deadline actually fires
AND reaps. license_tier: ORIGINAL
WHY THIS EXISTS: seq1425 said the deadline freed the CALLER but not the CHILDREN, turning a hang into a
leak. You cannot prove that fixed with a gate that exits on its own -- you need one that genuinely hangs.
SHAPE = the exact seq1383 incident: fork a GRANDCHILD that sleeps holding the inherited stdout write end,
then the gate itself sleeps past any sane deadline. That grandchild is the hard case: killing only the
direct child leaves the pipe open, so the parent's blocking read never sees EOF (tr_run_capture_to's own
header calls this out, which is why it closes wfd BEFORE forking its watchdog).
EXPECTED via POST /api/gate_run target=nx_hangprobe_gate&deadline_ms=3000:
verdict TIMEOUT, response returns in ~3s, and ZERO nx_hangprobe processes survive afterwards.
This gate NEVER passes -- it is a fixture, not a check. It is named *_gate only so gate_run will run it.
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_gate.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 15 | func main() -> i64 |