Claude Code binary spins at 100% CPU on KVM Linux guest (kernel 6.8, Ubuntu)
Preflight Checklist
- [x] I have searched existing issues 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?
Environment:
OS: Ubuntu, kernel 6.8.0-124-generic
VM: KVM guest
Node.js: v22.23.1
Claude Code versions tested: 2.1.195, 2.1.200, 2.1.201
Variants tested: native binary, npm install, linux-x64, linux-x64-musl
Symptom:
Every Claude Code binary immediately spins at 100% CPU on any invocation including --version. No output is ever produced. Worker threads spawn, receive SIGPWR signals, and exit with 0, but the main process loops indefinitely.
strace shows: Zero connect() calls — the hang occurs before any I/O. Pure CPU spin in the main thread.
Ruled out:
AppArmor, seccomp, network/proxy blocking, wrong binary architecture, credentials, resource limits, Node.js version.
What Should Happen?
Be able to execute commands with claude such as claude --version
Error Messages/Logs
my-vm:~$ strace -e trace=connect -f /home/username/.npm-global/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe --version 2>&1 | head -50
strace: Process 3930 attached
strace: Process 3931 attached
strace: Process 3932 attached
strace: Process 3933 attached
strace: Process 3934 attached
strace: Process 3935 attached
strace: Process 3936 attached
strace: Process 3937 attached
[pid 3937] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3937] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3936] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3936] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3935] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3935] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3934] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3934] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3933] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3933] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3932] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3932] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3931] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3931] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3937] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3937] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3936] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3936] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3935] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3935] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3934] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3934] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3933] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3933] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3932] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3932] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3931] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3931] --- SIGPWR {si_signo=SIGPWR, si_code=SI_TKILL, si_pid=3929, si_uid=1000} ---
[pid 3934] +++ exited with 0 +++
[pid 3936] +++ exited with 0 +++
[pid 3935] +++ exited with 0 +++
[pid 3932] +++ exited with 0 +++
[pid 3937] +++ exited with 0 +++
[pid 3933] +++ exited with 0 +++
[pid 3931] +++ exited with 0 +++
my-vm:~$ strace -e trace=connect -f node $(which claude) --version 2>&1 | head -50
strace: Process 3898 attached
strace: Process 3899 attached
strace: Process 3900 attached
strace: Process 3901 attached
strace: Process 3902 attached
strace: Process 3903 attached
node:internal/modules/esm/get_format:219
throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath);
^
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".exe" for /home/username/.npm-global/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:219:9)
at defaultGetFormat (node:internal/modules/esm/get_format:245:36)
at defaultLoadSync (node:internal/modules/esm/load:162:16)
at ModuleLoader.load (node:internal/modules/esm/loader:831:12)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:609:31)
at #createModuleJob (node:internal/modules/esm/loader:640:36)
at #getJobFromResolveResult (node:internal/modules/esm/loader:353:34)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:321:41)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:680:25) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
Node.js v22.23.1
[pid 3902] +++ exited with 0 +++
[pid 3901] +++ exited with 0 +++
[pid 3900] +++ exited with 0 +++
[pid 3899] +++ exited with 0 +++
[pid 3898] +++ exited with 0 +++
[pid 3903] +++ exited with 1 +++
+++ exited with 1 +++
Steps to Reproduce
``` bash
my-vm:~$ npm install -g @anthropic-ai/claude-code
my-vm:~$ claude --version
top - 14:19:45 up 36 min, 2 users, load average: 0.46, 0.22, 0.24
Tasks: 250 total, 2 running, 247 sleeping, 0 stopped, 1 zombie
%Cpu(s): 12.5 us, 0.1 sy, 0.0 ni, 87.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 32096.1 total, 29994.4 free, 612.7 used, 1489.1 buff/cache
MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 31081.2 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4048 username 20 0 69.6g 29592 24168 R 100.0 0.1 0:27.98 claude
### Claude Model
None
### Is this a regression?
I don't know
### Last Working Version
_No response_
### Claude Code Version
2.1.195, 2.1.200, 2.1.201
### Platform
Anthropic API
### Operating System
Ubuntu/Debian Linux
### Terminal/Shell
Xterm
### Additional Information
_No response_