macOS: bundled oils shell intermittently fails fast external commands (getpgid ESRCH race)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- build-system, testing-qa
Hướng nghiên cứu
Đọc crates/fspy/build.rs và tìm MACOS_BINARY_DOWNLOADS; trước tiên xác nhận một bản phát hành Oils có chứa upstream PR #2689, sau đó build lại binary macOS được đóng gói. Chạy bản tái hiện fast-command song song và smoke script, kiểm tra để không có lỗi và đầu ra smoke giống hệt từng byte.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 466
- Fork
- 42
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 21
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của voidzero-dev/vite-task
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
voidzero-dev/vite-task#738 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
voidzero-dev/vite-task#719 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
voidzero-dev/vite-task#717 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
voidzero-dev/vite-task#700 · 2 bình luận ·
-
fspy_preload_unix: execl with 32+ arguments aborts on an out-of-bounds NULL terminator write Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
voidzero-dev/vite-task#699 ·
Tất cả issue của voidzero-dev/vite-task
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
Axis areas are always keyboard-focusable (Sense::drag), even with allow_axis_zoom_drag(false) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
bug team:backend track:services-maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
cowprotocol/services#4950 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
gitbutlerapp/gitbutler#15998 · 1 bình luận ·