You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NOW_DAY_FILE read at save-session.sh:1013 has the same FIFO-hang vulnerability #634 fixed for NDC_GEN_FILE, with no type-check guard #642
filed-by-loopFiled by the maintainer loop, not by a human. Sets the author axis in dispatch_rank.lane-consolidationNDC daily fold and its locks — consolidate.py, staging lock, rotation. SERIAL: races live herepriority:lowReal, but neither blocking nor compounding fast
Found by PR #641's self-review (Explore + oss:auditor) while fixing #634, which added a regular-file type check to ndc_read_gen()'s read of NDC_GEN_FILE.
Symptom
A FIFO or character device placed at the path NOW_DAY_FILE names would hang save-session.sh indefinitely while it holds LOCK_DIR, exactly the same failure mode #634 fixed for the sibling marker.
Location
scripts/save-session.sh:1013 (pre-#634/#635-diff line numbering):
No -f/-L or regular-file check guards this cat, unlike the now-fixed ndc_read_gen() (#634) and the original ts_marker_read() (#625) it was modeled on.
Mechanism
cat on a FIFO with no writer present blocks forever -- no O_NONBLOCK, no timeout anywhere in this script, the same hazard #634's own comment already documents at the sibling function. A character device (e.g. /dev/zero) would instead stream unboundedly into the command substitution.
What would settle it
Reproduced directly, not just reasoned: mkfifo dayfifo; timeout 3 bash -c 'cat dayfifo 2>/dev/null | tr -d "[:space:]"' exits 124 (timeout), confirming the hang. Fix: add the same [ ! -f "$NOW_DAY_FILE" ]-shaped regular-file check ndc_read_gen() now uses (post-#634), ahead of this cat.
Severity: local-only (whatever can place a FIFO/device at this path can already do worse), same reasoning as #634's own non-blocking classification. Row: fails-to-preserve.
[AI-generated, filed by the maintainer loop from PR #641's own self-review]
filed-by-loopFiled by the maintainer loop, not by a human. Sets the author axis in dispatch_rank.lane-consolidationNDC daily fold and its locks — consolidate.py, staging lock, rotation. SERIAL: races live herepriority:lowReal, but neither blocking nor compounding fast
Activity
Fix NOW_DAY_FILE FIFO hang and five more stderr-order leaks in save-s…
Refuse a non-regular file at every marker WRITE site, and report a no…
fix(#932): bump NDC's generation marker so reconcile's rewrites of no…