Skip to content

HTTP stale-session reaper may leave the session's proxy worker running (single observation) #502

Description

@debugmcpdev

Summary

Low confidence — single observation, filed for the trail. After the Streamable HTTP stale-session reaper (#337) tore down a debug session whose MCP connection had closed, that session's proxy worker process stayed alive (observed minutes later holding its DAP sockets; killed manually).

What was seen

  1. An MCP client connected over Streamable HTTP, created a js session, attached to a node --inspect target, then closed its HTTP connection (client exit without close_debug_session).
  2. A later client asked about the session: Session not found: 51779093-…, and list_debug_sessions returned [] — so the server did reap it.
  3. The session's proxy worker (node, pid 50872) was still running with three ESTABLISHED loopback connections (parent/child DAP sockets), and was still alive several minutes later.

The #337/#343 work made session teardown kill the proxy tree, and the proxy-orphan-reaper covers parentless workers — but this worker's parent (the server) was still alive, so the orphan reaper would not fire; only the reaper-initiated teardown path could have killed it, and apparently didn't.

Caveats

Suggested check

A targeted test: HTTP client creates session + attaches, drops the connection, wait past the reaper interval, assert the proxy worker pid is gone (the #431 process-hygiene suite has the harness pieces).

Scope

Local build @ fix/500-js-attach-unbound-breakpoints, Windows 11, Node 24. Found during the #500 dogfooding session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions