macOS: bundled oils shell intermittently fails fast external commands (getpgid ESRCH race)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- build-system, testing-qa
Direzione di ricerca
Leggi crates/fspy/build.rs e individua MACOS_BINARY_DOWNLOADS; prima conferma una release di Oils contenente l’upstream PR #2689, poi ricompila il binario macOS incluso. Esegui la riproduzione parallela di fast-command e lo script di smoke, verificando che non ci siano errori e che l’output di smoke sia identico byte per byte.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Symptom
A cached task on macOS intermittently reports exit 2 with empty stdout and oils I/O error (main): No such process on stderr. Seen in the wild running parallel test suites that spawn vp run (each task runs under the bundled osh, which fspy substitutes for /bin/sh).
Root cause
Not fspy's exec interposition — the bundled oils 0.37.0 itself. Process::RunProcess (core/process.py) calls getpgid(child_pid) right after fork() and before waitpid(). On macOS, getpgid() of a zombie child fails with ESRCH, so when the parent is descheduled past a fast command's exit (CPU contention), the OSError escapes to oils' main() → exit 2.
Reproduces with the raw oils binary, no fspy involved: ~5% under 6-8-way parallel loops of osh -c 'echo x > f; cat f'.
Fix
Upstream PR: https://github.com/oils-for-unix/oils/pull/2689 — gate the getpgid() on job control being enabled (MaybeGiveTerminal() no-ops otherwise, so batch shells never needed the pgid).
Once an oils release includes it: rebuild the bundled binary and bump MACOS_BINARY_DOWNLOADS in crates/fspy/build.rs.
Verification of the fix
Patched 0.37.0 tarball build (same one-liner in the generated C++): 2000 concurrent runs of the failing shapes, 0 failures (vs ~5% before); smoke script output byte-identical to the unpatched binary.
- Lingua principale
- Rust
- Stelle
- 466
- Fork
- 42
- Merge medio
- 1g 20h
- PR unite (30g)
- 21
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di voidzero-dev/vite-task
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
voidzero-dev/vite-task#738 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
voidzero-dev/vite-task#719 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
voidzero-dev/vite-task#717 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
voidzero-dev/vite-task#700 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
voidzero-dev/vite-task#699 ·
Tutte le issue di voidzero-dev/vite-task
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ontola/atomic-server#1625 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
VirusTotal/yara-x#777 ·
-
has_tail_capacity wraps and get_writable_raw_unchecked commits raw_len before the bounds check Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
stratum-mining/stratum#2404 ·
-
bug ci good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100