FreeBSD 15.1 and lower have a linker bug that affects process
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- haskell
- Ambito
- backend, operating-systems
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Haskell
- Stelle
- 91
- Fork
- 93
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 haskell/process
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
HAVE_PIPE2 at compile time but not at runtime causes segfault on macOSForse già presa @alt-romes l’ha presa 3 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
posix_spawn falls back to fork() when create_group = True due to HAVE_DECL_ macro mismatchForse già presa @lei-jia-xing l’ha presa 11 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 57/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Tutte le issue di haskell/process
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
haskell/bytestring#730 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
seal-harness/seal-harness#399 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
fmidue/codeworld-tasks#124 ·
-
allow haskell-src-exts-1.24Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
reflex-frp/reflex#563 ·