anthropics / anthropics/claude-code

2.1.243 native build segfaults at startup on Arch Linux (glibc 2.44) — even `--version` and `claude update`

未关闭
#89,564 0 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
area:packaging bug has repro platform:linux
主要语言
Python
星标
145k
派生
23.1k
PR 合并指标
PR 指标待抓取

描述

## Summary

The **2.1.243** native build segfaults immediately on startup on Arch Linux — every invocation, including `claude --version` and `claude update`. 2.1.240, 2.1.241 and 2.1.245 all run fine on the same machine, so this looks specific to 2.1.243 (2.1.242 not tested).

Filing for the record because 2.1.243 was completely unusable *and* self-recovery was impossible: `claude update` / `claude upgrade` segfault too, so the only way out was manually re-pointing the launcher symlink at a retained older version.

## Environment

- Arch Linux, kernel 6.18.44-1-lts, x86_64
- glibc 2.44+r24+g16be1518495f-1 (upgraded 2026-08-16)
- Install method: `native` (`~/.local/share/claude/versions/`)
- Reproduced from both fish and bash

## Reproduction

```
$ ~/.local/share/claude/versions/2.1.243 --version
Segmentation fault (core dumped)
$ echo $?
139
```

Crashes identically for: bare `claude`, `claude --version`, `claude update`, `claude upgrade`, `claude --resume `, and headless `claude -p ...`. Setting `LC_ALL=C LANG=C` makes no difference. Reproduced across two boots and ~26 separate invocations.

## Stack trace

```
Signal: 11 (SEGV)

#0 0x0000000001d10458 free (2.1.243 + 0x1b10458)
#1 0x00007f78b363530a __newlocale (libc.so.6 + 0x3530a)
#2 0x0000000001abd282 n/a (2.1.243 + 0x18bd282)
#3 0x00007f78b369d7fc n/a (libc.so.6 + 0x9d7fc)
#4 0x00007f78b369d879 pthread_once (libc.so.6 + 0x9d879)
#5 0x0000000001abc2d2 n/a (2.1.243 + 0x18bc2d2)
#6 0x0000000001ace6cf n/a (2.1.243 + 0x18ce6cf)
#7 0x0000000001abdc0a n/a (2.1.243 + 0x18bdc0a)
#8 0x0000000001abe9c4 n/a (2.1.243 + 0x18be9c4)
#9 0x00007f78b369d7fc n/a (libc.so.6 + 0x9d7fc)
#10 0x00007f78b369d879 pthread_once (libc.so.6 + 0x9d879)
#11 0x0000000001abea15 n/a (2.1.243 + 0x18bea15)
#12 0x0000000001abead7 n/a (2.1.243 + 0x18bead7)
#13 0x0000000001abb922 n/a (2.1.243 + 0x18bb922)
#14 0x0000000001abb724 n/a (2.1.243 + 0x18bb724)
#15 0x0000000001aadadd n/a (2.1.243 + 0x18adadd)
#16 0x00007f78b3627892 __libc_start_main (libc.so.6 + 0x27892)
#17 0x0000000001953a2e n/a (2.1.243 + 0x1753a2e)
```

## Notes

- The crash sits in startup locale initialization (`__newlocale` under `pthread_once`), before argument parsing — which explains why even `--version` dies and why the in-band updater can't be used to escape.
- The `free` frame is attributed to the binary, but `nm -D --defined-only` shows neither 2.1.241 nor 2.1.243 exports `free`, so that is most likely nearest-symbol attribution rather than an allocator interposition against glibc.
- Each crash wrote a 70.7 MB core dump; 26 of them accumulated before it was noticed.

## Versions tested on this machine

| Version | Result |
|---|---|
| 2.1.240 | OK |
| 2.1.241 | OK |
| 2.1.242 | not tested |
| 2.1.243 | SIGSEGV, every invocation |
| 2.1.245 | OK |

## Workaround

Re-point the launcher at a retained older build:

```
ln -sf ~/.local/share/claude/versions/2.1.241 ~/.local/bin/claude
```

Installing 2.1.245 (`claude install 2.1.245`) also resolves it — whatever this was appears already fixed there.

贡献指南

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

调研方向

Start by reproducing the crash from ~/.local/share/claude/versions/2.1.243 with --version on Arch Linux and compare it with 2.1.241 and 2.1.245. Use the supplied startup stack trace and locale details to investigate the native build; done means startup commands, including the updater, no longer segfault on the reported environment.

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

评估

技术栈
bash, fish, linux
领域
cli, operating-systems
Issue 类型
缺陷
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

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