[BUG] Native binary hangs indefinitely with 100% CPU futex spin loop on startup (VPS/virtualized environment)

Open 💬 4 comments Opened Jun 24, 2026 by jondaley

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?

Summary

The claude binary hangs indefinitely on every invocation — including claude --version,
the native installer's own install step, and after a fresh npm install -g — on one specific
server. The same OS and same binary version work fine on a separate laptop machine. The hang
is a tight CPU spin loop, not a network, disk, or I/O wait.

Environment

  • Claude Code version: 2.1.187
  • Install methods tried (both reproduce the bug identically):
  • Native installer (curl -fsSL https://claude.ai/install.sh | bash)
  • npm install -g @anthropic-ai/claude-code
  • OS: cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.5
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

  • Kernel: 6.1.0-35-amd64
  • Architecture: x86_64
  • CPU / hypervisor: Model name: QEMU Virtual CPU version 2.5+

Flags: fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm nopl cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm 3dnowprefetch vmmcall
Hypervisor vendor: KVM

  • RAM: 23GB total, 18GB available (not memory constrained)
  • Disk: 33GB free on root (not disk constrained)
  • Works correctly on: another machine running the same OS (laptop, non-virtualized)

Diagnostics

ps/pstree shows no child processes — just the main process and one extra thread:

What Should Happen?

Expected behavior

claude --version prints the version and exits.

Actual Behavior

Process hangs indefinitely (left running 5+ minutes with no progress).

Error Messages/Logs

None, just spin:
[pid 3292598] futex(0x7f65e62fa8c0, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 3292598] futex(0x7f65e62fa908, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1782290348, tv_nsec=919130112}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out)

Steps to Reproduce

  1. On this server, run curl -fsSL https://claude.ai/install.sh | bash
  2. Observe install hangs after printing Setting up Claude Code...
  3. Separately, npm install -g @anthropic-ai/claude-code completes successfully
  4. Run claude --version — hangs identically

Claude Model

_No response_

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.187

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

This appears to be different though similar to https://github.com/anthropics/claude-code/issues/62914 though I get a spin vs a hang.

this is the first time I've tried installing it, so I don't know if it worked on previous versions or not.

More information:

top -H -p <PID> shows the second thread pinned at ~100% CPU.

/proc/<PID>/status shows the main thread state as R (running), and
/proc/<PID>/task/<PID>/stack is empty — consistent with a pure userspace spin, not a
blocked kernel call.

strace -f -p <PID> shows the spinning thread repeatedly hitting a futex wait with a
~100ms timeout that immediately expires, in a tight loop, with no other syscalls (no
network connect() calls at all):
[pid <PID+1>] restart_syscall(<... resuming interrupted futex ...>) = -1 ETIMEDOUT (Connection timed out)

[pid <PID+1>] futex(0x7fa1a9c248c0, FUTEX_WAKE_PRIVATE, 1) = 0

[pid <PID+1>] futex(0x7fa1a9c24910, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=..., tv_nsec=...}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out)
(repeats indefinitely, ~10x/second)

/proc/<PID>/fd shows no open sockets — only /dev/urandom, timerfds, and an eventpoll.
Confirms this isn't waiting on any network connection.

ldd $(which claude) resolves all shared libraries with no missing dependencies:
linux-vdso.so.1

librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6

/lib64/ld-linux-x86-64.so.2

libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0

libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2

libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6

Network connectivity to all required hosts confirmed working (instant responses, no
timeouts): api.anthropic.com, claude.ai, platform.claude.com, raw.githubusercontent.com,
downloads.claude.ai.

Suspected Cause

Given the spin is a futex wait with FUTEX_CLOCK_REALTIME repeatedly timing out at ~100ms
intervals with zero progress, and this is a virtualized/VPS environment, this looks like it
could be related to clock/timer handling under this host's specific hypervisor — possibly a
busy-wait loop that never receives the wake condition it's polling for in this environment.

Additional Notes

Happy to run a gdb -p <PID> -ex "bt" backtrace or any other diagnostic the team needs —
the process is easy to reproduce on demand on this host.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗