macOS: bundled oils shell intermittently fails fast external commands (getpgid ESRCH race)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
调研方向
阅读 crates/fspy/build.rs 并定位 MACOS_BINARY_DOWNLOADS;首先确认一个包含 upstream PR #2689 的 Oils release,然后重新构建随附的 macOS 二进制文件。运行并行的 fast-command reproduction 和 smoke script,检查没有失败,并确认 smoke 输出逐字节一致。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Rust
- 星标
- 468
- 派生
- 42
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 46
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
voidzero-dev/vite-task 的其他 Issue
-
vp run: output forwarding fails with EAGAIN when an inherited Node child sets stdout non-blocking未关闭
难度 4/5 3-5 天 新手友好度 48/100
voidzero-dev/vite-task#782 · 1 条评论 ·
维护者通常 1 天内回复
-
remote cache
难度 5/5 一周以上 新手友好度 35/100
voidzero-dev/vite-task#781 ·
维护者通常 1 天内回复
-
remote cache
难度 4/5 3-5 天 新手友好度 55/100
voidzero-dev/vite-task#779 ·
维护者通常 1 天内回复
-
remote cache
难度 5/5 一周以上 新手友好度 35/100
voidzero-dev/vite-task#778 ·
维护者通常 1 天内回复
-
fspy misses Bun file reads on Linux (glibc), so cached tasks replay stale output可能已有人在做 @wan9chi 于 2 天前认领。 未关闭fspy
voidzero-dev/vite-task#777 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 voidzero-dev/vite-task 的全部 Issue
相似的 Issue
-
Change output crossing a compactsize boundary leaves the fee slightly below the requested feerate未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
bitcoindevkit/bdk_wallet#578 ·
维护者通常 8 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
521xueweihan/HelloGitHub#3832 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 82/100
canonical/opentelemetry-collector-operator#409 ·
维护者通常 1 天内回复