Settings

Theme

Debugging a "weird SIGSEGV" core dump with Codex and GDB inside Docker

medium.com

1 points by Sep142324 2 months ago · 1 comment

Reader

Sep142324OP 2 months ago

I work on Proton/Timeplus (disclosure).

We hit a SIGSEGV where the backtrace was misleading: our fatal handler tried to print a stack trace and that trace capture sometimes crashed inside libunwind, so it looked like “unwinding is broken”.

What worked was building a deterministic postmortem harness (core dump + debug binary + symbols + matching source paths) inside Docker, then installing Codex in the same container so it could run GDB + rebuild/iterate in-place.

OpenAI Codex pivoted away from unstable backtraces and classified the crash via siginfo_t/ucontext_t. It turned out to be SEGV_PKUERR (Intel MPK/PKU) caused by a thread-local PKRU mismatch when some worker threads entered V8.

PR with the patch: https://github.com/timeplus-io/proton/pull/1091

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection