[BUG] Immediate segmentation fault upon starting - claude (Bun runtime) segfaults at startup on Linux 6.17 / glibc 2.39 — all builds since Node→Bun switch
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I am NOT using the latest version because anything after 2.1.139 immediately segfaults.
Start any version 2.1.140 or above and immediate segmentation fault. Can't event run --version as it crashes out before getting as far as printing anything.
What Should Happen?
Claude code should start normally.
Error Messages/Logs
Starting any version after 2.1.139 (this is 2.2.146) immediately seg faults.
$ strace claude
brk(NULL) = 0x1f52b000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7072abad8000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=93303, ...}) = 0
mmap(NULL, 93303, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7072abac1000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14624, ...}) = 0
mmap(NULL, 16400, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7072ababc000
mmap(0x7072ababd000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7072ababd000
mmap(0x7072ababe000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7072ababe000
mmap(0x7072ababf000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7072ababf000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\243\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
fstat(3, {st_mode=S_IFREG|0755, st_size=2125328, ...}) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 2170256, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7072ab800000
mmap(0x7072ab828000, 1605632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x28000) = 0x7072ab828000
mmap(0x7072ab9b0000, 323584, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b0000) = 0x7072ab9b0000
mmap(0x7072ab9ff000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1fe000) = 0x7072ab9ff000
mmap(0x7072aba05000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7072aba05000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14408, ...}) = 0
mmap(NULL, 16400, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7072abab7000
mmap(0x7072abab8000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7072abab8000
mmap(0x7072abab9000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7072abab9000
mmap(0x7072ababa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7072ababa000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14408, ...}) = 0
mmap(NULL, 16400, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7072abab2000
mmap(0x7072abab3000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7072abab3000
mmap(0x7072abab4000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7072abab4000
mmap(0x7072abab5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7072abab5000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=952616, ...}) = 0
mmap(NULL, 950296, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7072ab717000
mmap(0x7072ab727000, 520192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7072ab727000
mmap(0x7072ab7a6000, 360448, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8f000) = 0x7072ab7a6000
mmap(0x7072ab7fe000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe7000) = 0x7072ab7fe000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7072abab0000
mmap(NULL, 73728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7072aba9e000
arch_prctl(ARCH_SET_FS, 0x7072abaae580) = 0
set_tid_address(0x7072abaae850) = 31937
set_robust_list(0x7072abaae860, 24) = 0
rseq(0x7072abaaeea0, 0x20, 0, 0x53053053) = 0
mprotect(0x7072ab9ff000, 16384, PROT_READ) = 0
mprotect(0x7072ab7fe000, 4096, PROT_READ) = 0
mprotect(0x7072abab5000, 4096, PROT_READ) = 0
mprotect(0x7072ababa000, 4096, PROT_READ) = 0
mprotect(0x7072ababf000, 4096, PROT_READ) = 0
mprotect(0x7072abb18000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7072abac1000, 93303) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=NULL} ---
+++ killed by SIGSEGV (core dumped) +++
Steps to Reproduce
Install claude code 2.1.146
Execute "claude"
Segmentation fault
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.139
Claude Code Version
2.1.146
Platform
AWS Bedrock
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Xterm
Additional Information
$ /home/johnsargent/.local/share/claude/versions/2.1.146
Segmentation fault (core dumped)
✗ 139 ~ $ cat .claude/settings.json
{
"autoUpdaterStatus": "disabled",
"env": {
"DISABLE_AUTOUPDATER": "1",
"DISABLE_AUTOUPDATES": "1",
"CLAUDE_CODE_USE_BEDROCK": "1",
"ANTHROPIC_MODEL": "opus",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "global.anthropic.claude-opus-4-7",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "global.anthropic.claude-sonnet-4-5-20250929-v1:0",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "global.anthropic.claude-haiku-4-5-20251001-v1:0",
"DISABLE_PROMPT_CACHING": "0"
}
}
Tried removing the .claude directory so I get clean settings etc. - no difference, still segfault.
Tried with every version after 2.1.139 as it appeared but they all crash out in the same way, so I assume something was introduced in 2.1.140 that caused the issue and that persists
Would attach the core file, but it obviously contains API keys and the like, so I can't.
This is on Ubuntu 24.04 - this is NOT a duplicate of all the Windows segmentation fault issues for different versions or after running certain operations. This doesn't even get as far as fully loading.
8 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This is not a duplicate of any of those. Similar symptoms, but different environment. This is for ANY version after 2.1.139 not just 2.1.148 or 2.1.145 as in the other tickets
I asked claude 2.1.139 to diagnose why anything > 2.1.139 crashes out... this is what it came up with
● I've worked it out. Here's the conclusion.
Root cause
Every build newer than your 2.1.139 uses a rebuilt Node host that segfaults during V8 startup on this machine — before any Claude code runs. It's an incompatibility in the bundled runtime, not in Claude's JS, and not file corruption.
The evidence chain:
(exit 0). So the breakage was introduced when the Node host was rebuilt for the 2.1.14x line and has carried forward since.
independently-delivered files, same crash → it's the host build, not a bad download.
newer Node build sets up incorrectly in your environment (kernel 6.17 / glibc 2.39).
Bottom line
Your 2.1.139 works because it predates the Node-host rebuild. Everything after it ships the 2eabd56b host that can't initialize V8 here. That's exactly why you keep it pinned/immutable — and why "updating" always re-breaks you.
Digging a bit deeper with gdb, the crash is in the Bun runtime - you get SIGSEGV during Bun runtime init, before main/arg parsing. Faulting insn:
call *%raxat .text 0x3fa8a30, with rax loaded from data-segment global 0x629d110. That global is never initialized to a valid pointer — at crash it contains embedded-JS-payload bytes (0x7b2972572c72592c = ASCII ",Yr,Wr){"), identical on disk and stable across runs (not heap corruption / not ASLR). i.e. an uninitialized function-pointer global in the bundled Bun/JavaScriptCore host is called through during startup. Pre-Bun build 2.1.139 (BuildID b814cadd…) works; all post-switch builds (BuildID 2eabd56b…: 2.1.145/146/160) crash identically.## Summary
Every
claudebuild since the runtime switched from Node to Bun segfaultsimmediately on any invocation (e.g.
claude --version), exit code 139,before executing any JS. The last working build is 2.1.139 (pre-Bun). 2.1.145,
2.1.146, and the VS Code extension's bundled 2.1.160 — all sharing Bun-host
BuildID
2eabd56b93310e766961206f003fc2e163ec5f86— crash identically.## Environment
alwaysandmadvise(no difference)## Affected builds
b814cadd7d52598469a16ff588bb336ff6bcb37f(pre-Bun, Node host)2eabd56b93310e766961206f003fc2e163ec5f86(Bun host)c900a8c71aa966a1a8bf14c49139d87fac9ae881, BUILD_TIME2026-05-20T01:47:26ZSIGSEGV (
si_code=SI_KERNEL,si_addr=NULL) during Bun/JavaScriptCore runtimeinit, before
main/argument parsing — strace shows the crash right after thedynamic loader maps libc/libm and sets up TLS, before the program makes a single
syscall of its own.
Faulting instruction:
call *%raxat.textaddress0x3fa8a30.raxisloaded from data-segment global
0x629d110. That global is never initialized toa valid pointer — at the crash it contains embedded-JS-payload bytes
0x7b2972572c72592c(ASCII,Yr,Wr){). The value is identical on disk andstable across runs, so this is not heap corruption and not ASLR-related.
In effect, an uninitialized function-pointer global in the bundled Bun host is
called through during startup.
Program received signal SIGSEGV, Segmentation fault.
0x0000000003fa8a30 in ?? ()
=> 0x3fa8a30: ff d0 call *%rax # rax = 0x7b2972572c72592c (not a code address)
#0 0x0000000003fa8a30
#1 0x0000000000000000
The crash precedes option parsing, so no runtime flag can affect it.
This looks like a Bun-host init regression specific to recent Linux kernel / glibc combinations.
This seems to have been fixed in 2.1.197
Also hitting this on Arch Linux with an even newer glibc than the other reports here — wanted to add a data point since it's not fixed on the latest available glibc.
Environment:
ldd (GNU libc) 2.44)Reproduction: Segfaults on every invocation, including
claude doctor— not specific to any subcommand.Backtrace (via
coredumpctl gdb claude,bt):Things I've ruled out:
LANG=C.UTF-8andLC_ALL=C.UTF-8explicitly set, still segfaultsGiven
LANG/LC_ALLbeing correctly set didn't help and an older version also fails, this looks like a genuine ABI incompatibility between the bundled Bun runtime and newer glibc rather than a locale-config issue specifically. Happy to test any candidate fix/build.Confirming and narrowing this on a different environment — Arch Linux (rolling release), kernel 7.1.9-arch1-2, glibc 2.44, Intel i5-11260H (full AVX2/AVX-512 support, so this isn't the separate CPU-feature crash reported elsewhere in this thread).
I bisected the exact regression boundary by installing each version via npm and running
claude --version:claude --versionnever printsSo on this system specifically, the regression was introduced between 2.1.241 and 2.1.242, not at 2.1.140 as originally reported — the crash may have been intermittently "fixed" and reintroduced, or this could be a distinct regression with the same symptom (immediate SIGSEGV,
claude --versionnever completes). Happy to test any specific commit/build if that helps narrow further.Title: Segfault on startup persists in 2.1.246 (Bun runtime, SIGSEGV at si_addr=NULL) — regression of #62747
Body:
Same failure mode as #62747, recurring in a much newer build.
Claude Code version (broken): 2.1.246
Last known working version: 2.1.235
OS: Arch Linux
Kernel: 7.1.9-arch1-2
glibc: 2.44
Arch: x86_64
claude --version segfaults immediately, before any output.
dmesg:
claude[903906]: segfault at 0 ip 0000000001d10458 sp 00007ffe7cffc960 error 4 in claude.exe[1b0f458,1953000+3b33000] likely on CPU 5 (core 5, socket 0)
strace tail:
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
+++ killed by SIGSEGV (core dumped) +++
Ruled out: /tmp noexec, ASLR, vm.overcommit_memory, ulimits, environment variables, transparent hugepages (tried madvise). Binary itself is a valid, non-truncated x86_64 ELF (verified with file). Installing 2.1.235 instead resolves it completely — claude --version and normal startup both work.
Given kernel 7.1.9 is very recent, this looks like the same Bun-runtime/kernel-compatibility class of bug as #62747, #76241, and #27699, possibly reintroduced or never fully fixed for newer kernels.