fix(fspy): bundle osh with the RunProcess getpgid ESRCH fix - #703
fix(fspy): bundle osh with the RunProcess getpgid ESRCH fix#703lifeiscontent wants to merge 1 commit into
Conversation
8a4880c to
87afe03
Compare
|
Upstream landed the fix: oils-for-unix/oils@f5bd5d9 It's the same change this PR bundles. The That doesn't unblock anything on its own, though. No oils release carries it yet, and Andy's note was "No guarantees on when the next release is ... but we are overdue for one." So this still needs the patched 0.37.0 build as it stands. Once a release ships, the cleanup is two URLs and two hashes in He also offered a tarball straight from oils CI. I'd rather not use that one. It's a job artifact built from One other thing. CI, Security Analysis and fspy benchmark are all sitting in |
Stock oils 0.37.0 calls getpgid(child) after fork even with job control disabled, and on macOS getpgid of an already-exited child fails with ESRCH, so a fast external command intermittently killed the substituted shell with "oils I/O error (main): No such process" and exit 2 — a few percent of runs under CPU contention. Bundle a build of 0.37.0 plus the upstream fix (oils-for-unix/oils#2689, gate the getpgid on job control being enabled) until an oils release carries it. crates/fspy/tests/oils_esrch.rs pins the fix: it fails against a stock binary and passes against the patched one. Fixes voidzero-dev#702.
87afe03 to
71ca9e5
Compare
Motivation
Fixes #702.
Cached tasks on macOS run under the bundled osh (fspy substitutes it for
/bin/sh, which as a platform binary can't loadDYLD_INSERT_LIBRARIES). Stock oils 0.37.0 resolves the child's pgid withgetpgid()right after fork, before waiting on it — and on macOSgetpgid()of an already-exited child fails with ESRCH. The shell dies withoils I/O error (main): No such process, exit 2, empty stdout. Under CPU contention (parallel test runs) a few percent of spawns die this way.Upstream fix: oils-for-unix/oils#2689 — the pgid feeds
MaybeGiveTerminal(), which already no-ops when job control is disabled, so the `getpgid()) is gated on job control being enabled and batch shells never pay the race.Changes
crates/fspy/build.rsdownloads a 0.37.0 + patch build from https://github.com/lifeiscontent/oils-for-unix-build/releases/tag/oils-for-unix-0.37.0-fspy.1 (built by that repo's release workflow from the stock tarball pluspatches/0001-run-process-esrch.patch, with build provenance attestations) until an upstream oils release carries the fix. If voidzero wants the binary under its own hosting, rebuilding from that repo's workflow and swapping the two URLs and hashes is the whole change.crates/fspy/tests/oils_esrch.rsruns 200 tracked shells through fast external commands under contention; it fails against the stock binary and passes against the patched one.