FreeBSD 15.1 and lower have a linker bug that affects process

Offen
#386 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

@luite arbeitet bereits daran.

Seit 23.10.2026.

  • #387 von @luite — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
haskell

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Several people have reported GHC crashing after spawning a child process on FreeBSD:

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

Vorherrschende Sprache
Haskell
Sterne
91
Forks
93
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus haskell/process

Alle Issues in haskell/process

Ähnliche Issues

Weitere Issues zu Haskell

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.