Skip to content

fix(supervisor): prune stale tombstones on TID collision and shutdown… - #16224

Merged
jmcphers merged 2 commits into
mainfrom
bugfix/16167-supervisor-tombstones
Sep 25, 2026
Merged

jmcphers merged 2 commits into
mainfrom
bugfix/16167-supervisor-tombstones

Conversation

@jmcphers

Copy link
Copy Markdown
Collaborator

Continuation of #16176.

… socket errors

On Linux, thread IDs share the PID number space, so kill(pid, 0) can
succeed for a worker thread that recycled a dead supervisor's PID,
while a crashed supervisor may never unlink its socket. Both facts
together blind the pruning logic and leave permanent tombstones.

- showRunningSupervisors now requires the socket to exist and, on
  Linux only, the PID holder to be the kcserver binary (/proc comm)
- handleShutdownAction drops the registry entry when shutdown fails
  with ENOENT/ECONNREFUSED instead of keeping the dead entry
- add supervisorLiveness unit tests (run under the existing harness)

Fixes #16167
@github-actions

Copy link
Copy Markdown
Contributor

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:sessions @:console @:interpreter

Why these tags?
Tag Source
@:critical Always runs (required)
@:sessions Changed files
@:console Changed files
@:interpreter Changed files

More on automatic tags from changed files.

readme  valid tags

@Liang-Psych

Copy link
Copy Markdown
Contributor

Thanks for picking this up, @jmcphers! Verified the triple-gate approach (socket existence + /proc comm + live handshake) on my self-hosted Server box — matches what I saw in container forensics. Happy to help test the TCP-side refinement if needed.

@jmcphers

Copy link
Copy Markdown
Collaborator Author

No sweat, I don't think any more TCP work is needed at this time. Appreciate the contribution!

@jmcphers
jmcphers merged commit c05aaf8 into main Sep 25, 2026
28 checks passed
@jmcphers
jmcphers deleted the bugfix/16167-supervisor-tombstones branch September 25, 2026 18:55
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants