anthropics / anthropics/claude-code
[BUG] Native installer (2.1.243) segfaults in newlocale/free during startup on glibc 2.44 (CachyOS)
- Ngôn ngữ chính
- Python
- Star
- 145k
- Fork
- 23.1k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
### 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?
The native binary (Bun-based) crashes with SIGSEGV on every launch attempt, including during
the installer's own post-install step (`"$binary_path" install`). This reproduces 100% of the
time and matches the known Bun-runtime-on-new-glibc crash family (see #76241, #84293, #69980,
#62747), but glibc 2.44 is newer than any glibc version mentioned in those threads, so filing
this separately in case it needs a distinct fix/allowlist entry.
### Environment
- Claude Code version: 2.1.243
- Install method: native installer (`curl -fsSL https://claude.ai/install.sh | bash`)
- OS: CachyOS (Arch-based, rolling release)
- Kernel: 7.2.0-1-cachyos
- glibc version: 2.44
- CPU: x86_64, AVX/AVX2/AVX-VNNI all present (confirmed via `/proc/cpuinfo`, ruled out the
no-AVX crash class)
- Locale: LANG=en_US.UTF-8, LC_ALL=en_US.UTF-8 (confirmed valid/installed via `locale -a`,
ruled out broken-locale-env class)
- Also have `claude-desktop` installed from AUR (package `claude-desktop-1.34493.1-1`,
provides `/usr/bin/claude-desktop` and `/usr/lib/claude-desktop`). This is a separate
Electron-based app and does not appear related to the native CLI binary's install path
(`~/.local/share/claude`), but flagging it in case of any shared state, cache, or
binary-name collision worth ruling out.
The crash is inside `free()`, called from glibc's `__newlocale`, suggesting a bad free/double
free during locale initialization inside the bundled Bun runtime — possibly related to glibc's
own recent locale-path changes (glibc 2.44 changelog includes "locale: newlocale memory leak in
LOCPATH parsing and on error paths").
### What I've Already Ruled Out
- Not a missing-AVX issue: CPU reports `avx avx2 avx_vnni` in `/proc/cpuinfo`.
- Not a broken/missing locale: `LANG`/`LC_ALL` point to `en_US.UTF-8`, which is present in
`locale -a` output.
- Not a musl/glibc binary mismatch: confirmed system is glibc via `ldd --version`
(`ldd (GNU libc) 2.44`), and `ldd /bin/ls` resolves cleanly.
### Related Issues
- #76241
- #84293
- #69980
- #62747
### What Should Happen?
The binary should start (or at minimum print a diagnosable error) instead of segfaulting
during runtime/locale initialization.
### Error Messages/Logs
```shell
Stack trace of thread 3186:
#0 0x0000000001d10458 free (2.1.243 + 0x1b10458)
#1 0x00007f589663a1ab __newlocale (libc.so.6 + 0x3a1ab)
#2 0x0000000001abd282 n/a (2.1.243 + 0x18bd282)
#3 0x00007f58966b2584 n/a (libc.so.6 + 0xb2584)
#4 0x00007f58966b26a9 pthread_once (libc.so.6 + 0xb26a9)
#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 0x00007f58966b2584 n/a (libc.so.6 + 0xb2584)
#10 0x00007f58966b26a9 pthread_once (libc.so.6 + 0xb26a9)
#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 0x00007f5896627e23 __libc_start_main (libc.so.6 + 0x27e23)
#17 0x0000000001953a2e n/a (2.1.243 + 0x1753a2e)
ELF object binary architecture: AMD x86-64
```
### Steps to Reproduce
1. `curl -fsSL https://claude.ai/install.sh | bash`
2. Installer downloads the binary, then fails during its own install step:
Setting up Claude Code...
bash: line 226: 3740 Segmentation fault (core dumped) "binary_path" install ${TARGET:+" TARGET"}
Installation was killed before it could finish (exit code 139).
3. Running the resulting binary directly at `~/.local/share/claude/versions/2.1.243` also
segfaults immediately, with no arguments needed.
4. `claude uninstall` on a previously-installed copy of this same version also segfaults
(same crash signature), rather than failing gracefully.
### Claude Model
None
### Is this a regression?
Yes, this worked in a previous version
### Last Working Version
2.1.205
### Claude Code Version
2.1.243
### Platform
Anthropic API
### Operating System
Other Linux
### Terminal/Shell
Other
### Additional Information
_No response_
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start with the native installer flow in install.sh and reproduce the crash during its post-install "$binary_path" install step, then compare it with running the downloaded version directly. Review related issues #76241, #84293, #69980, and #62747 and the provided __newlocale/free stack trace. Done means the native binary starts on glibc 2.44 or reports a diagnosable error instead of segfaulting.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- linux, shell
- Lĩnh vực
- cli, operating-systems
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100