code wiki / _hdl_build / nx_boundedprobe.nx
nx_boundedprobe.nx
buildroot/runtime/_hdl_build/nx_boundedprobe.nx
about
nx_boundedprobe -- DOES THE ESTATE'S BOUNDED RUNNER ACTUALLY BOUND A SUBJECT THAT FORKS?
gk_run_capture_ms exists because a hanging subject starved three estate sweeps (2026-08-07). Its
watchdog kills the direct child with nx_kill(pid, 9). But the child's stdout/stderr are dup3'd
onto a PIPE, and any grandchild it forks INHERITS those descriptors. Kill the child alone and the
grandchild still holds the write end, so the parent's blocking read never sees EOF -- the watchdog
fires, the child dies, and the sweep starves anyway.
That is a hypothesis. This organ is the experiment, and it is self-contained so there is no
/bin/sh on the path and no second organ to keep in sync:
--forkling : fork a 60s sleeper, then exit IMMEDIATELY (the direct child is gone in ~0ms)
(no args) : run MYSELF as that subject under a 2000ms bound, and report what came back
Wall time is measured by the caller. ~2s => the runner bounds a forking subject. ~60s => it does
not, and every gate in the fleet that runs a forking subject is exposed to the same starvation.
license_tier: ORIGINAL No hw writes (Rule 26). Read-only apart from its own child process.
dependencies 1 imports · 0 importers
imports: nx_gatekit_lib.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
| 17 | const BP_MAGIC_5000: i64 = 5000 |
| 19 | const BP_BOUND_MS: i64 = 2000 |
| 20 | const BP_SLEEP_MS: i64 = 60000 |
| 21 | const BP_CAP: i64 = 65536 |
| 24 | const BP_EMIT: i64 = 40000 |
functions
| 26 | func main(argc: i64, argv: *i64) -> i64 |