Never let the doctor judge the job it is running inside - #64
Merged
Conversation
The doctor's own job name necessarily matches PATTERN, because that is how it is scoped to a campaign, so it has always been inside its own task set. Before 2.9.0 that was harmless: `pgrep -x R` found no R processes for a bash-and-ssh job, so it never appeared in a probe. Widening the scan to every process carrying a SLURM_JOB_ID made its own `sleep` and `ssh` children visible, and a job whose processes sit at 0% CPU with nothing in D-state is precisely the `hung` signature the previous commit taught it to recognise. Caught on the first campaign to run 2.9.0, within three hours of launch: ten consecutive `CONFIRMED HUNG 0%` events, every one of them jobid 41750366, which was the doctor. It never acted only because `Restarts=3` already sat at MAX_RESTARTS. Without that it would have requeued itself once per sweep, which on a `--requeue` doctor means killing and restarting the only thing watching the campaign, indefinitely. Any probed task whose jobid equals SLURM_JOB_ID is now skipped before classification. Verified against the live campaign both ways: run by hand with no SLURM_JOB_ID the doctor's job still appears (spared only by the unrelated `nproc < MIN_PROC` rule), and run with SLURM_JOB_ID set to that job it does not appear at all. The 64 real tasks are judged identically in both.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The doctor's own job name necessarily matches
PATTERN, because that is how it is scoped to a campaign, so it has always been inside its own task set. Before 2.9.0 that was harmless:pgrep -x Rfound no R processes for a bash-and-ssh job, so it never appeared in a probe. Widening the scan to every process carrying aSLURM_JOB_ID(#63) made its ownsleepandsshchildren visible, and a job whose processes sit at 0% CPU with nothing in D-state is precisely thehungsignature #62 taught it to recognise.Caught on the first campaign to run 2.9.0, within three hours of launch:
Ten consecutive confirmations, every one of them jobid
41750366, which was the doctor itself. It never acted only becauseRestarts=3already sat atMAX_RESTARTS. Without that it would have requeued itself once per sweep, which on a--requeuedoctor means killing and restarting the only thing watching the campaign, indefinitely.Change
Any probed task whose
jobidequalsSLURM_JOB_IDis skipped before classification.Verification
Against the live 64-task campaign, both ways:
SLURM_JOB_ID, the doctor's job still appears in the sweep, spared only by the unrelatednproc < MIN_PROCrule.SLURM_JOB_IDset to that job, it does not appear at all.all tasks healthy.Version 2.9.1, with a NEWS entry. Already hot-patched into the running campaign's library so the live doctor is not exposed while this is in review.