anthropics / anthropics/claude-code

Claude Code 2.1.243 segfaults on startup — glibc 2.44 / Arch Linux (mimalloc/newlocale allocator conflict)

Abierto
#89,394 5 comentarios 14 reacciones 0 asignados Ver en GitHub
area:packaging duplicate has repro platform:linux regression
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

## Claude Code 2.1.243 segfaults on startup (glibc 2.44 / bleeding-edge Arch Linux)

### Summary
The `claude` CLI binary for version **2.1.243** segfaults immediately on every invocation (`claude --version`, `claude install`), including during fresh installs via `curl -fsSL https://claude.ai/install.sh | bash`. Reproduced 5 times across independently downloaded copies of the binary (different timestamps, different temp paths), so this isn't a corrupted/truncated download.

Versions **2.1.238** and **2.1.239** run fine on the same machine, so this is specific to the 2.1.243 build, not a general system incompatibility.

### Environment
- OS: Arch Linux (rolling release)
- Kernel: `7.1.9-arch1-2` (`#1 SMP PREEMPT_DYNAMIC Fri, 21 Aug 2026`)
- glibc: **2.44** (`ldd (GNU libc) 2.44`)
- Arch: x86_64, CPU supports avx2/sse4_2
- Node: v22.18.0 (unrelated — `claude` ships as a standalone bundled/native binary, not a node script)
- Install method: native (`curl -fsSL https://claude.ai/install.sh | bash`)

### Steps to reproduce
1. On the environment above, run:
```
curl -fsSL https://claude.ai/install.sh | bash
```
2. The installer downloads the 2.1.243 binary and runs `"$binary_path" install`, which segfaults immediately (exit 139).
3. Alternatively, if 2.1.243 is already installed, simply running `claude --version` segfaults.

### Crash backtrace (via `coredumpctl`)
```
Signal: 11 (SEGV) si_code: SEGV_MAPERR
Command Line: claude-2.1.243-linux-x64 install

Stack trace of thread:
#0 free (claude-2.1.243-linux-x64 + 0x1b10458)
#1 __newlocale (libc.so.6 + 0x3530a)
#2 n/a (claude-2.1.243-linux-x64 + 0x18bd282)
#3 n/a (libc.so.6 + 0x9d7fc)
#4 pthread_once (libc.so.6 + 0x9d879)
#5 n/a (claude-2.1.243-linux-x64 + 0x18bc2d2)
#6 n/a (claude-2.1.243-linux-x64 + 0x18ce6cf)
#7 n/a (claude-2.1.243-linux-x64 + 0x18bdc0a)
#8 n/a (claude-2.1.243-linux-x64 + 0x18be9c4)
#9 n/a (libc.so.6 + 0x9d7fc)
#10 pthread_once (libc.so.6 + 0x9d879)
#11 n/a (claude-2.1.243-linux-x64 + 0x18bea15)
#12 n/a (claude-2.1.243-linux-x64 + 0x18bead7)
#13 n/a (claude-2.1.243-linux-x64 + 0x18bb922)
#14 n/a (claude-2.1.243-linux-x64 + 0x18bb724)
#15 n/a (claude-2.1.243-linux-x64 + 0x18adadd)
#16 __libc_start_main (libc.so.6 + 0x27892)
#17 n/a (claude-2.1.243-linux-x64 + 0x1753a2e)
```

### Suspected cause
The crash is a `free()` call made *from inside glibc's `__newlocale()`* (locale initialization, reached via `pthread_once`), landing in a `free` symbol that resolves to an address inside the `claude` binary itself rather than glibc's own allocator. This is consistent with the binary bundling/statically linking its own allocator (Claude Code is built with Bun, which bundles mimalloc and exports global `malloc`/`free`/`calloc`/`realloc` symbols that override the dynamic linker's normal resolution).

If glibc's `__newlocale()` internals changed in 2.44 (very recent — this is a rolling-release Arch box, likely ahead of whatever glibc the 2.1.243 build was tested against), an allocation made through one allocator could end up being freed through the bundled one, which wouldn't recognize the pointer, causing SEGV_MAPERR.

This smells like a Bun/glibc allocator-interposition compatibility issue rather than anything specific to Claude Code's own logic, but filing here since it's the shipped binary that's affected.

### Impact / workaround
- Every install/launch of 2.1.243 crashes — full outage of the CLI on this system class (bleeding-edge glibc).
- Workaround: pinned back to the previously-installed 2.1.239 binary (`~/.local/share/claude/versions/2.1.239`, still present locally) and set `"autoUpdates": false` in `~/.claude/settings.json` to avoid the updater re-fetching the broken build.

### Ask
- Please check whether 2.1.243's build pipeline changed Bun/runtime version or allocator config relative to 2.1.239/2.1.238.
- A glibc-2.44 compatibility fix (or reverting whatever changed) would unblock rolling-release Linux users on this build.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start by reproducing on the stated Arch Linux/glibc 2.44 environment with `claude --version` or the install command, and compare against versions 2.1.238 and 2.1.239. Read the coredump backtrace, especially the `free()` and `__newlocale()` frames, and investigate the issue’s suspected Bun/mimalloc allocator interaction. Done means 2.1.243 launches and installs successfully in the reported environment.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
bun, linux
Área
cli, operating-systems
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.