thedotmack/claude-mem · warning

failed to kill in-flight chroma-mcp prewarm tree (best-effor

Error message

failed to kill in-flight chroma-mcp prewarm tree (best-effort)

What it means

While cleaning up an in-flight uvx prewarm child, killProcessTree(pid) failed. A direct prewarmChild.kill('SIGKILL') is still attempted right after, so the child usually dies anyway; the residual risk is an orphaned uvx/python process from the prewarm.

Source

Thrown at src/services/sync/ChromaMcpManager.ts:957

    this.transport = null;
    this.connected = false;
  }

  private async disposeActivePrewarm(): Promise<void> {
    const prewarmChild = this.activePrewarmChild;
    if (!prewarmChild) {
      return;
    }
    if (this.activePrewarmChild === prewarmChild) {
      this.activePrewarmChild = null;
    }

    const pid = prewarmChild.pid;
    if (pid) {
      try {
        await ChromaMcpManager.killProcessTree(pid);
      } catch (error) {
        logger.warn('CHROMA_MCP', 'failed to kill in-flight chroma-mcp prewarm tree (best-effort)', {
          pid,
          error: error instanceof Error ? error.message : String(error)
        });
      }
    }

    try {
      prewarmChild.kill('SIGKILL');
    } catch {
      // Already dead.
    }

    await ChromaMcpManager.waitForChildClose(prewarmChild, CHROMA_PREWARM_REAP_TIMEOUT_MS);
  }

  private static async waitForChildClose(child: ChildProcess, timeoutMs: number): Promise<void> {
    if (child.exitCode !== null || child.signalCode !== null) {
      return;

View on GitHub (pinned to e2d1df569a)

Solutions

  1. Scan for stragglers with pgrep -af 'uvx|chroma-mcp' and kill them
  2. Normally self-healing via the SIGKILL fallback — act only if orphans persist
  3. Upgrade if this recurs, since newer builds add extra kill fallbacks
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: The prewarm child exited between pid capture and the tree-kill (ESRCH race), permission denied on the process, or an external reaper claiming it first.

Common situations: Shutdown racing prewarm startup; external process supervisors; PID-namespace restrictions in containers.

Related errors


AI-assisted analysis of thedotmack/claude-mem@e2d1df569a (2026-08-20). Data as JSON: /api/errors/25f5d6c205cf4d16. Report an issue: GitHub.