Skip to content

v6.2.2

Choose a tag to compare

@zoharbabin zoharbabin released this 29 Apr 01:55
· 14 commits to main since this release

Fix: Orphan Process CPU Spin

Problem: 12+ orphaned server instances consuming 80-100% CPU each (~1000% total), running for hours. Root cause: Claude Code uses unix domain sockets for stdin/stdout. When the parent dies, Node.js does NOT emit end/close on broken unix sockets — so the existing health check never triggered.

Fixes:

  • Parent PID detection — captures process.ppid at startup; when parent dies, OS reparents to PID 1, detected every 2 seconds
  • Stdout EPIPE probe — writes empty string to stdout each cycle; broken socket triggers EPIPE → shutdown
  • pgrep-based multi-instance cleanup — on startup, kills ALL stale server processes (not just one PID from lock file)

Added:

  • Orphan Prevention E2E test suite (npm run test:e2e:orphan) — 4 tests run in CI on every push:
    1. Server exits when parent disconnects
    2. New instance kills previous instances
    3. No CPU spin on idle server
    4. No orphan processes remain

Full Changelog: v6.2.1...v6.2.2

📦 Installation

npm install google-researcher-mcp@6.2.2

🔗 Links