You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate macOS SIGSEGV while printing parser panic backtrace #926
During validation of #925 (fba862c132eb98f3d1b048e272d3faeba070f3eb), the Research Rust unit-test process reproducibly crashed on macOS ARM64 with the pinned Rust 1.94.1 toolchain. This was local test execution; production was not involved.
The existing pdf_extractor::tests::parser_panic_is_contained_and_a_later_job_still_runs deliberately panics to verify that Tokio catches the parser failure and a later job succeeds. With the Nix shell's RUST_BACKTRACE=1, the process instead receives SIGSEGV while printing the backtrace.
Reproduce from the monorepo root after normal native test setup:
On the same executable, setting only RUST_BACKTRACE=0 makes both PDF and Word panic-containment tests pass. The full unchanged commit hook then passed: 1,003 frontend tests and 417 Rust tests, with the same two existing ignored tests. Stack printing was disabled; panic handling and assertions remained active.
The tests, hook, and flake are unchanged by #925. Earlier validation with local SDK links passed normally, so changed binary layout may expose the issue; its underlying cause and broader runtime applicability are not established.
Investigate the generated unwind information, linked libraries, and macOS unwinder interaction. Resolve the crash while retaining both panic-containment tests, and verify the targeted tests plus the full native suite with backtraces enabled. Do not treat the diagnostic-only workaround as a permanent fix.
Closing as unreproducible on current source. Reopen if a new debug build starts dying this way again.
The synthetic panic! in parser_panic_is_contained_and_a_later_job_still_runs (and the Word twin) is expected: those tests prove Tokio turns a parser panic into an ordinary error and a later job still runs.
The unexpected part was macOS libunwind SIGSEGV-ing while the default panic hook printed that backtrace (RUST_BACKTRACE=1 from the Nix shell). Panic containment never got a chance.
On a fresh Maple-dev-env checkout this did not reproduce:
current origin/master (14889848): both panic tests pass with RUST_BACKTRACE=1 and RUST_BACKTRACE=full
the original commit fba862c after a clean maple rebuild: same, backtrace prints, tests pass
It does still crash on the original 2026-09-14 test binary (app_lib-54f4add83496dab2) with RUST_BACKTRACE=1, and that same executable passes with RUST_BACKTRACE=0. That matches a layout-specific DWARF / compact-unwind interaction, not a logic bug in the tests or in parser isolation.
RUST_BACKTRACE=0 remains a diagnostic workaround only, not a product change. CI Rust tests are Linux-only, so they would not have caught this. No source, hook, or flake change is included here.
If a later native debug/test binary on macOS ARM64 dies in parseFDEInstructions / _Unwind_Backtrace while these tests run, reopen and keep that exact app_lib-* artifact.
Activity
AnthonyRonning commentedon Sep 15, 2026
Closing as unreproducible on current source. Reopen if a new debug build starts dying this way again.
The synthetic
panic!inparser_panic_is_contained_and_a_later_job_still_runs(and the Word twin) is expected: those tests prove Tokio turns a parser panic into an ordinary error and a later job still runs.The unexpected part was macOS
libunwindSIGSEGV-ing while the default panic hook printed that backtrace (RUST_BACKTRACE=1from the Nix shell). Panic containment never got a chance.On a fresh Maple-dev-env checkout this did not reproduce:
origin/master(14889848): both panic tests pass withRUST_BACKTRACE=1andRUST_BACKTRACE=fullfba862cafter a cleanmaplerebuild: same, backtrace prints, tests passIt does still crash on the original 2026-09-14 test binary (
app_lib-54f4add83496dab2) withRUST_BACKTRACE=1, and that same executable passes withRUST_BACKTRACE=0. That matches a layout-specific DWARF / compact-unwind interaction, not a logic bug in the tests or in parser isolation.RUST_BACKTRACE=0remains a diagnostic workaround only, not a product change. CI Rust tests are Linux-only, so they would not have caught this. No source, hook, or flake change is included here.If a later native debug/test binary on macOS ARM64 dies in
parseFDEInstructions/_Unwind_Backtracewhile these tests run, reopen and keep that exactapp_lib-*artifact.