FreeBSD 15.1 and lower have a linker bug that affects process
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- haskell
- Lĩnh vực
- backend, operating-systems
Hướng nghiên cứu
Read the process code that selects between posix_spawn and fork, then check how it detects FreeBSD versions and review the linked FreeBSD linker bug. The issue proposes falling back to fork on versions older than 15.2; done means affected versions use that fallback while newer versions retain the posix_spawn path.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Several people have reported GHC crashing after spawning a child process on FreeBSD:
- https://github.com/haskell/process/pull/363#issuecomment-5948486364
- https://gitlab.haskell.org/ghc/ghc/-/work_items/27953
The reason is that process is affected by a bug in the FreeBSD linker: https://github.com/freebsd/freebsd-src/commit/1e370f038778e16c4b31f8992dda339d429e5cb8 / https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295991 . I think that means that the fix will be in 15.2
The bug is a stack overflow in the dynamic linker which corrupts the memory of the parent process. Workaround is setting env vars to disable lazy binding/filtering: LD_BIND_NOW=1 LD_LOADFLTR=1, or patching process to make FreeBSD fall back to using fork instead of posix_spawn on FreeBSD older than 15.2
I'll open PR shortly, that disables the posix_spawn path on affected FreeBSD versions, falling back to fork
- Ngôn ngữ chính
- Haskell
- Star
- 91
- Fork
- 93
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 haskell/process
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
HAVE_PIPE2 at compile time but not at runtime causes segfault on macOSCó thể đã có người làm @alt-romes đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
posix_spawn falls back to fork() when create_group = True due to HAVE_DECL_ macro mismatchCó thể đã có người làm @lei-jia-xing đã nhận 11 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của haskell/process
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
haskell/bytestring#730 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
seal-harness/seal-harness#399 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
add previously overlooked rulesĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
fmidue/codeworld-tasks#124 ·
-
allow haskell-src-exts-1.24Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
reflex-frp/reflex#563 ·