anthropics / anthropics/claude-code

SIGSEGV on startup in v2.1.242+ on Linux (glibc 2.44, x86-64)

未关闭
#89,421 5 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
area:core bug duplicate platform:linux regression
主要语言
Python
星标
145k
派生
23.1k
PR 合并指标
PR 指标待抓取

描述

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?

Running `claude` (including `claude --version`) immediately crashes with a segmentation fault (SIGSEGV) starting in v2.1.242. The crash happens right after loading the standard shared libraries (librt, libc, libpthread, libdl, libm) — before any application files are opened. Signal is `SEGV_MAPERR` at `si_addr=NULL` (null pointer dereference in the SEA binary).

### What Should Happen?

Claude Code should start successfully and print the version, as it did in v2.1.241 and earlier.

### Error Messages/Logs

```shell
$ claude --version
zsh: segmentation fault (core dumped) claude --version
$ echo $?
139

strace output (last lines before crash):
openat(AT_FDCWD, "/usr/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
mmap(NULL, 1270088, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9e2e4a0000
mmap(0x7f9e2e4b0000, 638976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f9e2e4b0000
mmap(0x7f9e2e54c000, 561152, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xac000) = 0x7f9e2e54c000
mmap(0x7f9e2e5d5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x134000) = 0x7f9e2e5d5000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9e2e49e000
mmap(NULL, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9e2e495000
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
+++ killed by SIGSEGV (core dumped) +++
```

### Steps to Reproduce

1. Install v2.1.242 or v2.1.243: `npm install -g @anthropic-ai/claude-code@2.1.242`
2. Run `claude --version`
3. Observe segmentation fault

Bisection results:
- v2.1.241: works correctly
- v2.1.242: SIGSEGV on startup
- v2.1.243: SIGSEGV on startup

### Claude Model

None

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

2.1.241

### Claude Code Version

2.1.243 (Claude Code)

### Platform

Anthropic API

### Operating System

Other Linux

### Terminal/Shell

Other

### Additional Information

Shell: zsh
Kernel: 6.12.104-1-MANJARO
glibc: 2.44
Node.js (via nvm): v24.19.0
Binary: ELF 64-bit LSB, dynamically linked (Node.js SEA), ~361 MB

Workaround: pin to v2.1.241 (`npm install -g @anthropic-ai/claude-code@2.1.241`)

贡献指南

这个仓库没有索引到贡献指南

调研方向

Reproduce the crash with `claude --version` using @anthropic-ai/claude-code v2.1.242 or v2.1.243 on Linux with glibc 2.44, and compare it with v2.1.241. Start with the reported strace boundary and the Node.js SEA binary; use the core dump if available. Done means the CLI starts and prints its version without SIGSEGV on the affected environment.

由索引模型根据 Issue 内容生成。

评估

技术栈
linux, node.js
领域
cli, operating-systems
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。