fix: handle stale runner processes with deleted binaries#1322
fix: handle stale runner processes with deleted binaries#1322sbryngelson merged 1 commit intoMFlowCode:masterfrom
Conversation
find_pids strips the ' (deleted)' suffix that Linux appends to /proc/PID/exe when the binary has been replaced on disk. Without this, runners running old binaries are invisible to find_node and restart-all, appearing offline even though the process is alive. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude Code ReviewHead SHA: Files changed: 1
Summary:
Findings: No blocking issues. The analogous |
There was a problem hiding this comment.
Pull request overview
This PR improves GitHub Actions runner process discovery on login nodes by handling the Linux /proc/<pid>/exe symlink behavior when the underlying runner binary has been deleted.
Changes:
- Strip the trailing
(deleted)suffix from resolved executable paths infind_pids()before comparing against the expectedRunner.Listenerpath.
|
Claude Code Review Head SHA: 2d0335a Files changed:
Findings:
The fix strips exe=$(readlink -f /proc/$p/exe 2>/dev/null || true)
[ -z "$exe" ] && continue
dir=$(dirname "$(dirname "$exe")")If the runner binary has been updated while the process is running, The same one-line fix should be applied to exe=${exe% (deleted)} |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe 📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can suggest fixes for GitHub Check annotations.Configure the |
Summary
find_pidsnow strips the(deleted)suffix that Linux appends to/proc/PID/exewhen a runner binary is replaced on diskfind_nodeandrestart-all, appearing offline even though the process is aliverestart-allreports runners as OFFLINE and skips them instead of restarting themTest plan
restart-alldetects and restarts runners whose binaries have been updated on diskfind_nodecorrectly locates runners with deleted binariesstop_runnercorrectly kills stale processes before starting fresh ones🤖 Generated with Claude Code