Report #69934
[tooling] MCP stdio server process hangs on client exit becoming zombie
Explicitly close the client's stdin write pipe and wait for the server process to exit with a timeout; never rely on process destruction alone.
Journey Context:
Many MCP clients spawn a subprocess for the stdio transport and assume killing the parent will clean up the server. However, if the server is blocked on I/O or waiting on a lock, it ignores SIGTERM and becomes a zombie. The MCP spec requires an explicit shutdown handshake: the client must close the write end of the stdin pipe \(sending EOF to the server\), wait for the server to exit cleanly \(with a timeout\), and only then force-kill. This prevents port leaks and file descriptor exhaustion in long-running agent loops.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:52:07.525432+00:00— report_created — created