anthropics / anthropics/claude-code
[BUG] Linux Desktop: backend NodeService utility process aborts (SIGABRT) — event-loop stalls compound into whole-app crash-loop
- 主要语言
- Python
- 星标
- 145k
- 派生
- 23.1k
- PR 合并指标
- PR 指标待抓取
描述
### Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
### What's Wrong?
On the native Linux build of Claude Desktop (`1.40609.1`, deb), the backend **Node utility process crashes with SIGABRT** and takes the whole app down. The in-app symptom is the "Claude Code crashed / Try sending your message again" error in Code/agent mode, and it recurs (crash-loop) under heavy session use. Same in-app error as #85867; this report adds the missing Linux evidence.
Key facts:
- **Crashing process:** `claude-desktop --type=utility --utility-sub-type=node.mojom.NodeService` — the Node.js utility process hosting the Agent SDK / local Claude Code engine (not a renderer, not the GPU process).
- **Signal:** `6 / SIGABRT` (apport core dump: `/var/crash/_usr_lib_claude-desktop_claude-desktop.1000.crash`).
- 32 GB system RAM with ~10 GB free at crash time — this is **not** host memory pressure.
**Pre-crash sequence** (identical in both observed crashes, from `~/.config/Claude/logs/main.log`):
1. `[event-loop-stall] main process blocked for 3.3–3.7s` (task `LocalSessions.getSession`)
2. `[linuxAvailableMemory] /proc/meminfo unreadable, timed out, or missing MemTotal/MemAvailable; reporting available memory as unknown` — main loop frozen so hard it can't read a file
3. `[CCD] refreshSdkMcpStatuses failed ...: Cannot write to terminated process`
4. `[heavy-work] worker exited (0)` → `Starting app` (full app relaunch)
**Regression evidence:** per-day `[event-loop-stall]` counts went from 10 @ ~500 ms (Aug 24) to 55 @ ~3.5 s (Sep 3), with cumulative blocked time reaching 32 s inside a single session. The escalation begins exactly when `1.40609.1` was installed (Sep 2).
### What Should Happen?
The backend Node process should not abort. Event-loop stalls of 3+ seconds should not compound until the process dies and the app relaunches.
### Error Messages/Logs
```shell
# main.log — crash #1 (19:44:53)
[warn] [event-loop-stall] main process blocked for 3678ms (task sdk:stream-delta-flush=0ms, total 40, cumulative 28508ms, rss 413MB)
[warn] [linuxAvailableMemory] /proc/meminfo unreadable, timed out, or missing MemTotal/MemAvailable; reporting available memory as unknown
[warn] [CCD] refreshSdkMcpStatuses failed for local_eb7c88d9-...: Cannot write to terminated process
[info] [heavy-work] worker exited (0); will refork on next request
[info] Starting app { appVersion: '1.40609.1', ... }
# crash #2 (20:02:01) — same four lines, task LocalSessions.getSession, blocked 3328ms
# apport dump fields
Signal: 6
SignalName: SIGABRT
ExecutablePath: /usr/lib/claude-desktop/claude-desktop
ProcCmdline: ... --type=utility --utility-sub-type=node.mojom.NodeService ...
```
Additional launch-time breadcrumb (every launch, matches #49579):
```
(node:313764) MaxListenersExceededWarning: Possible EventEmitter memory leak detected.
21 destroyed listeners added to [WebContents]. MaxListeners is 20.
```
### Steps to Reproduce
1. Native Linux desktop build `1.40609.1` (deb package).
2. Use Code/agent mode (local-agent / Claude Code in Desktop) with several MCP servers loaded — on this machine 15 servers are registered (incl. account-synced ClickUp, Figma, Slack, Supabase, Microsoft 365).
3. Switch between sessions/heavy queries. Crash recurs; observed twice within ~20 minutes.
### Claude Model
Not sure / Multiple models
### Is this a regression?
Yes — crash frequency and stall severity escalated immediately after the `1.40609.1` update (Sep 2). Earlier logs show stalls an order of magnitude shorter (~500 ms) and no app relaunches.
### Claude Code Version
Desktop `1.40609.1` (bundled Agent SDK / local Claude Code engine)
### Platform
Anthropic API
### Operating System
Pop!_OS 24.04 (Ubuntu 24.04), kernel 7.1.5-76070105-generic, x86_64
### Terminal/Shell
Other (Claude Desktop)
### Additional Information
**Linux-specific data gap (why this class of crash is unreported):** crashpad launches with `--url=https://f.a.k/e` (a placeholder) on Linux, so crash dumps are never uploaded to Anthropic. The only copy is the apport dump in `/var/crash`. If you want the full dump, I can attach it.
Related: #85867 (same in-app error on Linux, pre-evidence), #49579 (V8 OOM in Code-mode backend on macOS, same `MaxListenersExceededWarning`), #80710.
贡献指南
这个仓库没有索引到贡献指南
调研方向
Start by reproducing on native Linux Desktop 1.40609.1 with Code/agent mode and several MCP servers, then inspect ~/.config/Claude/logs/main.log for the event-loop-stall sequence. Compare the related /var/crash/_usr_lib_claude-desktop_claude-desktop.1000.crash apport dump with the utility-process details in this report. Done means the backend Node process no longer aborts or triggers an app crash-loop under the reported workload.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- linux, node.js
- 领域
- backend, desktop, operating-systems
- Issue 类型
- 缺陷
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 活跃
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100