[BUG] TUI deadlocks after 1–2 prompts under FreeBSD Linuxulator since 2.1.282 (2.1.204 works)

Status Open
Reported on v2.1.204
Maintainer reply None cached
Activity 0 comments · opened Oct 14, 2026

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: FreeBSD 15.1-RELEASE-p4 amd64 (pkgbase), running the Linux binary via the Linuxulator
  • Install: FreeBSD port misc/claude-code (self-update disabled)
  • Linux userland: linux_base-rl9 9.7 (also reproduced with 9.8)
  • fdescfs mounted with linrdlnk (verified: /compat/linux/usr/bin/readlink /dev/fd/0 → /dev/pts/1)
  • Reproduced in a plain terminal, in vim and in nvim

Versions

  • Works: 2.1.204 (in daily use Jul–Oct on the same system and kernel)
  • Hangs: 2.1.282, 2.1.283, 2.1.296
  • Versions in between not tested

Symptoms

  • After 1–2 prompts, the TUI stops responding: cursor blinks, no output, keyboard ignored
  • 0% CPU; truss -p shows no syscalls; no child processes (pgrep -P is empty)
  • ~32–36 open file descriptors, so not fd exhaustion
  • The process ignores SIGHUP: closing the terminal leaves it running as an orphan (PPID 1), and only kill -9 ends it

Analysis

Every thread is asleep. The main thread (claude) waits on a futex with no timeout, and all worker/JIT/GC threads also wait on futexes. The only threads not in a futex are idle I/O waiters (ppoll, epoll, an inotify read). This looks like a lost wake-up/deadlock in the main thread.

Same machine, same kernel, same ~/.claude config:
2.1.204 runs fine, ≥2.1.282 hangs every time. This suggests a change between those versions (possibly a bundled Bun/JSC runtime update) that relies on futex behaviour the Linuxulator doesn't emulate exactly.

procstat -kk of a frozen 2.1.296 process (abridged)

(Thread names are partly scrambled by the Linuxulator; the process COMM shows as "ollector Thread".)

TDNAME KSTACK
claude … sleepq_wait_sig _sleep umtxq_sleep linux_sys_futex …
JSCWarmUp … sleepq_timedwait_sig _sleep umtxq_sleep linux_sys_futex …
JITWorker … sleepq_wait_sig _sleep umtxq_sleep linux_sys_futex …
Bun Pool 0–11 … linux_sys_futex … (Pool 2: linux_poll / ppoll)
Waitpid … kqueue_scan … linux_epoll_pwait2 …
HTTP Client … linux_sys_futex …
HeapHelper×7 … linux_sys_futex … (one mislabelled: inotify_read via sys_read)
fs.watch … linux_sys_futex …

Full output (for version 2.1.283) attached.

Workaround

Pin 2.1.204.

claude-frozen-2.1.283.txt

What Should Happen?

Claude should not freeze

Error Messages/Logs

Steps to Reproduce

Start claude in a terminal,

ask something simple e.g. "What is the git status", after 2 or 3 prompts, claude freezes

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.204 (claude-code)

Claude Code Version

2.1.282

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗