Files
fruix/docs/PROGRESS.md

3.3 KiB

Progress

2026-04-01 — Phase 1.1 started: Guile verified on FreeBSD amd64

Completed work:

  • installed/confirmed guile3-3.0.10
  • added a reusable verification harness:
    • tests/guile/run-phase1-verification.sh
    • tests/guile/verify-phase1.scm
    • tests/guile/modules/phase1/sample.scm
  • verified the following on FreeBSD 15.0-STABLE amd64:
    • module loading
    • deterministic output generation
    • file I/O
    • process handling with primitive-fork/waitpid
    • loopback TCP sockets
    • FFI calls into libc
    • execution of Guix bootstrap-related code from (guix build make-bootstrap)
  • wrote the results to docs/reports/phase1-guile-freebsd.md

Notable findings:

  • guile3 and guile-3.0 are present, but there is no unversioned guile binary
  • system* and open-pipe* currently segfault on this host (exit 139)
  • despite that crash, the lower-level process primitives needed for further investigation do work

Current assessment:

  • Phase 1.1 has a solid amd64 smoke-verification baseline
  • Phase 1.1 is not fully complete yet because i386 has not been checked and the subprocess crash needs investigation
  • verification harness committed as e380e88 (Add FreeBSD Guile verification harness)

2026-04-01 — Phase 1.1 follow-up: subprocess crash isolated

Completed work:

  • added a dedicated subprocess diagnostic harness:
    • tests/guile/run-subprocess-diagnostics.sh
    • tests/guile/posix-spawn-freebsd-diagnostics.c
  • reproduced crashes for:
    • system*
    • spawn
    • open-pipe*
  • confirmed all three fail with SIGSEGV / exit 139
  • confirmed native FreeBSD posix_spawn + posix_spawn_file_actions_addclosefrom_np works in a standalone C program
  • confirmed FreeBSD behavior that triggers gnulib replacement logic:
    • posix_spawn_file_actions_adddup2 accepts an invalid fd in the gnulib probe
    • posix_spawn_file_actions_addopen accepts an invalid fd in the gnulib probe
    • posix_spawnp accepts a shebang-less executable script in the gnulib security probe
  • wrote the analysis to docs/reports/phase1-guile-subprocess-crash.md

Conclusion:

  • this is most likely an upstream Guile/gnulib ABI bug on FreeBSD, not a Guix-specific problem
  • likely sequence:
    1. gnulib enables REPLACE_POSIX_SPAWN=1
    2. Guile still enables HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSEFROM_NP
    3. Guile passes a gnulib replacement posix_spawn_file_actions_t object to native posix_spawn_file_actions_addclosefrom_np
    4. libc interprets gnulib struct fields as a native pointer and crashes
  • evidence from the lldb core matches this hypothesis (*fa = 0x0000000600000008, consistent with gnulib _allocated=8, _used=6)

Current assessment:

  • Phase 1.1 amd64 investigation is now much stronger and has a concrete root-cause hypothesis
  • the next practical step is to validate a workaround or patch in Guile so subprocess helpers stop crashing
  • after that, continue with Phase 1.2 (minimal native build environment / GNU Hello)

Recent commits:

  • e380e88Add FreeBSD Guile verification harness
  • cd721b1Update progress after Guile verification

Next recommended step:

  1. patch or locally validate a fix for the addclosefrom_np / REPLACE_POSIX_SPAWN mismatch
  2. re-run both Guile test harnesses after the fix
  3. once subprocess behavior is stable, continue with Phase 1.2 (minimal native build environment / GNU Hello)