Repository navigation
v3.5.1
forkrun v3.5.1
Overview
forkrun is a Linux shell engine for data parallelization: it splits a byte stream (stdin, pipes, or files) into batches and dispatches them to workers — external binaries, shell functions, or native C plugins — with zero-copy data delivery, per-node NUMA affinity, and worker-level fault recovery. This release is a bugfix and hardening release: no new features, no performance changes, no breaking changes. It ships the port-infrastructure preconditions that make the upcoming Python frontend possible — as unconditional bugfixes that stand on their own.
Release verification: 5,008 test executions across the full matrix — both test suites on x86_64 (baseline, TSan, and ASan/UBSan, on UMA and NUMA topologies), the full benchmark suite (396 output-exactness runs), the C-plugin suite, and both suites on QEMU-emulated aarch64. All green. QEMU aarch64 verification is new in this release: while aarch64 engine builds have shipped since earlier versions, this is the first time they have been tested beyond a load-and-version-check at compile time — this release exercises the full suite on emulated aarch64 across both UMA and NUMA topologies.
Correctness fixes
- NUMA worker-side chunk loss at end-of-stream — a scanner that over-claimed another node's queue at EOF could orphan chunks assigned to its own node, causing silent truncation or hangs in ordered output and
-L(exact-lines) mode. The over-claim path now re-checks its own queue instead of exiting. Verified by chunk-conservation assertions (assigned = processed, steals balance) across every NUMA configuration and by EOF-stress runs. - Segfault on oversized
--nodes=@N— requests above the topology ceiling (512 nodes) now fail with a clean error message instead of crashing the pipeline. - SLURM exit codes preserved — an indexer's expected shutdown no longer overwrites preemption exit codes (143/138) with a generic failure.
- Missing stderr on NUMA aborts — a redirection bug in the indexer-death handler could swallow all post-abort diagnostics (including the checkpoint-recovery instructions) while stdout stayed byte-exact.
- Duplicated output bytes in an exotic sendfile edge case — a partial
sendfile()followed by a hard error could re-emit the already-written prefix. The fallback now resumes after the delivered bytes. - Resume-checkpoint ordering on weakly-ordered architectures — the seqlock protecting the resume ledger now has a correct read-side memory fence, preventing torn checkpoints (silent data loss or duplication on resume) on ARM/POWER/RISC-V. Note: verified by static analysis and functional testing, including emulated aarch64; QEMU does not model weak-memory reordering, so empirical validation on real ARM hardware is pending.
Resilience improvement
- Kernel-observable indexer death detection (NUMA). A SIGKILLed or OOM-killed indexer previously hung the pipeline silently — the death ran no exit code, so no trap or error path could detect it. Each NUMA indexer now holds a kernel-level liveness pipe; violent death is detected by POLLHUP, the pipeline aborts with a checkpoint, and the run exits non-zero with a recovery message instead of hanging.
Security hardening
forkrun runs arbitrary code by design; its security model is informed consent on resume. This release closes the gaps that could break that contract:
- The resume consent gate is now truthful and non-bypassable. Previously, a crafted resume file could execute code without it ever appearing in a consent prompt, or forge data while the preview showed benign text. Now: frame tokens cannot be scraped from the sandbox's command line; variable emission goes only through a verified EXIT trap; the parent evaluates only a re-rendered (neutralized) form of extracted variables; and every consent prompt previews exactly what will run — post-parse extracted values, never raw file text.
- The sandbox PATH now points at a nonexistent directory (constructed via mktemp, then deleted). POSIX path search treats an empty PATH component as the current working directory — the previous
PATH=''construction was exploitable by a CWD-planted binary. The new construction cannot contain an executable and cannot be pre-created or guessed. - Resume files remain subject to ownership and permission gating (foreign-owned or group/world-writable files are rejected or require explicit confirmation;
FORKRUN_TRUST_RESUME=1bypasses for unattended use). Documented residuals are unchanged and accepted.
Compatibility
- No flag changes, no output-format changes, no exit-code changes — the taxonomy (130/143/138/3/42/200/254) is table-frozen and unchanged.
- Unattended resume with custom setup/functions/variables still uses
FORKRUN_TRUST_RESUME=1; interactive resumes now preview what will execute before prompting.
Verification basis
5,008 test executions: 2 test suites × {x86_64 UMA, x86_64 NUMA} × {baseline, TSan, ASan/UBSan}, plus the C-plugin suite and the 396-run benchmark matrix (output-exactness), plus QEMU aarch64 on both UMA and NUMA topologies (full suite, first release to do so). Sanitizer branches run instrumented engine builds. aarch64 results are user-mode emulation (functional correctness; fence ordering is statically verified, not emulated). Full leg logs and the verification gate record are in the repository (docs_port/).
Full Changelog: v3.5.0...v3.5.1