[BUG] Native binary crashes with 'trap invalid opcode' on AVX-512 capable CPU inside KVM VM (v2.1.116–2.1.119)
Description
Claude Code native binary crashes mid-session with trap invalid opcode (SIGILL). The crashes are random with no apparent trigger pattern — not correlated with specific operations, context size, tmux, or the no-flicker setting.
Environment
| Field | Value |
|---|---|
| Claude Code version | 2.1.119 (also reproduced on 2.1.116) |
| OS | Ubuntu (Linux x86_64) |
| CPU | Intel Core i5-1135G7 @ 2.40GHz (11th Gen Tiger Lake) |
| Virtualization | KVM guest on Proxmox VE |
| Node.js | v20.20.2 |
CPU AVX-512 flags present in /proc/cpuinfo:
avx avx2 avx512f avx512dq avx512ifma avx512cd avx512bw avx512vl
avx512vbmi avx512_vbmi2 avx512_vnni avx512_bitalg avx512_vpopcntdq avx512_vp2intersect
Kernel journal entries
Apr 22 01:26:47 nadesico kernel: traps: claude[182549] trap invalid opcode ip:3292864 sp:7ffc9a00e840 error:0 in 2.1.116[2d22000+3b07000]
Apr 27 14:40:37 nadesico kernel: traps: claude[645587] trap invalid opcode ip:2d51212 sp:7ffec1f73100 error:0 in 2.1.119[2d2e000+3b91000]
Apr 27 14:41:52 nadesico kernel: traps: claude[648835] trap invalid opcode ip:2d51212 sp:7fffcd92cb00 error:0 in 2.1.119[2d2e000+3b91000]
Note: the two 2.1.119 crashes hit the exact same instruction offset (ip - base = 0x23212), suggesting a deterministic code path rather than random memory corruption.
Notes
- This is distinct from #37277 (which is about non-AVX CPUs); this machine has AVX-512 exposed by the hypervisor
- KVM may not perfectly emulate certain AVX-512 sub-extensions even when they appear in
/proc/cpuinfo - Workarounds attempted: disabling no-flicker, running outside tmux — no effect
- Both the self-updated binary (
~/.local/share/claude/versions/2.1.119) and the npm-installed binary (/usr/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe) report 2.1.119 but have different sizes (234 MB vs 245 MB) and different md5 hashes
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗