code wiki / _hdl_build / nx_acceptq.nx

nx_acceptq.nx

buildroot/runtime/_hdl_build/nx_acceptq.nx

6711 B156 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_acceptq.nx -- DETECTOR for the ACCEPT-LOOP WEDGE: a daemon that holds its listen socket but has stopped calling accept(). WHY THIS EXISTS (2026-07-31, measured). The mgmt API blocked in wait4 for the entire life of a forked build. Connections completed the TCP handshake -- the KERNEL accepts them into the backlog -- so every port-probe health check reported UP, for six minutes at a time, while no request was served. Three separate lanes filed it as "MGMT :18098 DOWN, ALL SEATS". :18098 was never down. It was blocked. ★★★ THE INSIGHT THIS ORGAN ENCODES: A SUCCESSFUL CONNECT PROVES THE KERNEL ACCEPTED, NOT THE PROCESS. The two are indistinguishable from outside -- unless you read the one number the kernel already keeps: on a LISTEN socket, /proc/net/tcp's rx_queue IS THE COUNT OF COMPLETED-BUT-UNACCEPTED CONNECTIONS. Non-zero means the app is behind. Sustained non-zero means the app is not accepting at all. Measured on the live wedge: rx_queue climbed 8 -> 34 while wedged, and returned to 0 once fixed. This is a pure READER: it opens /proc/net/tcp and nothing else. It cannot perturb the thing it measures, which matters because the failure it hunts is caused by blocking. nx_acceptq -> report every LISTEN socket with a non-zero accept backlog nx_acceptq <port> -> report just that port; exit 1 if it looks wedged expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_acceptq.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main aq_puts sys_write aq_scan sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close aq_puts ↻ aq_next aq_is_sp aq_hex aq_hexv aq_putn sys_mmap ↻ sys_write ↻ aq_putn ↻

structs

none

consts

23const AQ_CAP: i64 = 1048576

functions

25func aq_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: aq_scanmain calls 1: sys_write
27func aq_putn(v: i64) -> i64
called by 2: aq_scanmain calls 2: sys_mmapsys_write
41func aq_hexv(c: u8) -> i64
called by 1: aq_hex
49func aq_hex(b: *u8, off: i64, count: i64) -> i64
called by 1: aq_scan calls 1: aq_hexv
61func aq_is_sp(c: u8) -> i64 { if c == (32 as u8) { return 1 } if c == (9 as u8) { return 1 } return 0 }
called by 1: aq_next
64func aq_next(b: *u8, off: i64, n: i64) -> i64
called by 1: aq_scan calls 1: aq_is_sp
76func aq_scan(want_port: i64) -> i64
132func main(argc: i64, argv: *i64) -> i64