code wiki / _hdl_build / nx_boundedprobe.nx

nx_boundedprobe.nx

buildroot/runtime/_hdl_build/nx_boundedprobe.nx

6348 B134 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_gatekit_lib.nx nx_boundedprobe.nx

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

main gk_streq gk_cat gk_catn sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gk_say gk_write_all sys_write ↻ gk_run_capture_ms gk_run_cap3 sys_mmap ↻ sys_pipe2 sys_fork sys_close sys_setpgid sys_openat_rd sys_dup3 sys_execve sys_exit ↻ sys_sleep_ms sys_mmap ↻ sys_munmap nx_kill sys_now_realtime_ms sys_mmap ↻ sys_clock_gettime_real

structs

none

consts

17const BP_MAGIC_5000: i64 = 5000
19const BP_BOUND_MS: i64 = 2000
20const BP_SLEEP_MS: i64 = 60000
21const BP_CAP: i64 = 65536
24const BP_EMIT: i64 = 40000

functions

26func main(argc: i64, argv: *i64) -> i64