Bun v1.4.1 (392624bed) still segfaults intermittently on Linux x64

Status Fixed / completed
Reported on v2.1.251
Maintainer reply None cached
Activity 1 comment · opened Aug 31, 2026 · closed Aug 31, 2026

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:

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 (--resume flag present)
  • Reduced but not fixed by upgrading from 1.4.0 → 1.4.1

Related issues

  • #89437 — Bun fdb5e06cc crash rate 71%
  • #88820 — Bun fdb5e06cc segfault
  • #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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗