Bun v1.4.1 (392624bed) still segfaults intermittently on Linux x64
Environment
- Claude Code version: 2.1.251
- Bun version: 1.4.1 (392624bed)
- OS: Linux x64, Kernel 6.8.12 (Proxmox LXC)
- glibc: 2.41
- CPU features: sse42 popcnt avx avx2
- RAM: 8GB container, RSS at crash time: 0.23–0.31GB (not OOM)
- Usage: Running as an always-on agent backend (OpenClaw) serving Discord
Problem
After upgrading from Claude Code 2.1.239 (Bun 1.4.0 fdb5e06cc) to 2.1.251 (Bun 1.4.1 392624bed), the segfault crashes reduced from ~10/day to ~3/day but did not stop.
The crash signature is a Bun panic/segfault that kills the CLI process before it produces any output, causing silent failures (no response to users).
Crash data
Aug 30 — Bun 1.4.0 (fdb5e06cc): ~10 crashes
panic(main thread): Segmentation fault at address 0x1C
panic(main thread): Segmentation fault at address 0x20
Bun crash reports:
- https://bun.report/1.4.0/l_1fdb5e06kggggIugogC+2tjwE_gp7z7Dms8r7Dg0w34Ew4j24E6v3r+Ew+oihF435whC_2/j07Dms8r7Dsv4wuEkrio1Eu0uk7BixlngC+k8o+Cs3/+3Csq9o+C2wslxCA2A4B
- https://bun.report/1.4.0/l_1fdb5e06kggggIggggCsu0r6D0kki6D+qy4sE0423sE48kjtE6j6ptEyoj6sE6662sE4+zlgF6xxlgF6h923B6r3j5E6/5n5Ews7n5Eyzyu+E_gp7z7D2/j07Dms8r7Dsv4wuEA2AgC
Aug 31 — Bun 1.4.1 (392624bed): 3 crashes
15:27 UTC+7 — Timeout (180s, no output, no panic line)
error=FailoverError durationMs=180005
reason: "timeout"
errorPreview: "CLI produced no output for 180s and was terminated."
15:45 UTC+7 — Bun crash (466ms, instant death)
Bun v1.4.1 (392624bed) Linux x64
Linux Kernel v6.8.12 | glibc v2.41
durationMs=466 error=FailoverError
18:23 UTC+7 — Bun crash (855ms / 833ms elapsed)
Bun v1.4.1 (392624bed) Linux x64
Linux Kernel v6.8.12 | glibc v2.41
Elapsed: 833ms | User: 806ms | Sys: ...
durationMs=855 error=FailoverError
All three show fallbackConfigured: false and fallbackStepFinalOutcome: "chain_exhausted" — meaning the crash produces complete silence to the end user.
Key observations
- Not OOM: RSS was 0.23–0.31GB at crash time in an 8GB container
- Crash addresses 0x1C and 0x20: Consistent with null-pointer dereference (low address near zero), likely a use-after-free in JSC/GC
- Happens during both fresh starts and resumed sessions (
--resumeflag present) - Reduced but not fixed by upgrading from 1.4.0 → 1.4.1
Related issues
- #89437 — Bun
fdb5e06cccrash rate 71% - #88820 — Bun
fdb5e06ccsegfault - #77579 — JSC GC use-after-free (SlotVisitor::drain)
- #87868 — Crash after long session + subagents
- #75538 — Concurrent subagents crash
- #76241 — glibc 2.41 crash
- oven-sh/bun#26843 — Upstream root cause (subprocess stdin use-after-free)
Expected behavior
Claude Code CLI should not segfault. If a crash happens, it should be caught and retried gracefully.
Workaround
Configuring a fallback model in the wrapper (OpenClaw) so crashes degrade to a secondary model instead of silence.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗