Guard every batch wait and catch SIGTERM so a killed run still reports - #52
Merged
Merged
Conversation
…s; bump version to 3.0.20 A PBS run could pass its walltime and be killed without ever reporting. The slot-acquire wait check_child(..., -1) blocks for as long as all child slots stay busy, with the deadline check stranded outside that loop, so a run whose children each tar ~100GB walked past the cutoff while waiting. New wait_child_slot() polls instead and checks the deadline between polls, the same way wait_all_children() already guards the terminal wait; both of the remaining blocking waits now use them. Four more ways a run could die unheard: - report_dscheck_email() marked the report delivered before trying to park it, so a failed cache both parked nothing and disabled every later attempt - the quit path waited for children unguarded and was killed before its email - the deadline guard excluded -A 16/32/64/128, which are submitted with the same 24 hour walltime - ACTMSG has no wording for the hidden actions, so building the report raised KeyError instead PBS sends SIGTERM before the SIGKILL and nothing trapped it. A batch run now catches it and parks a report in the seconds it has left, as a backstop for the cases the walltime cutoff cannot cover. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
check_child(..., -1)blocks for as long as all child slots stay busy, with the walltime deadline check stranded outside that loop, so an-A 3run whose children each tar ~100GB walked past the cutoff and was killed by PBS without parking a report. Newwait_child_slot()polls and checks the deadline between polls, mirroring the existingwait_all_children(); both remaining blocking waits now use them.report_dscheck_email()marked the report delivered before trying to park it (a failed cache parked nothing and disabled every later attempt); the quit path waited for children unguarded; the deadline guard excluded-A 16/32/64/128, which are submitted with the same 24h walltime;ACTMSGhas no wording for the hidden actions, so building the report raisedKeyError.Test plan
python3 -m py_compile src/rda_python_dsquasar/dsquasar.pydsquasar -a -A 3 -e -b -d PBSrun for a report when it hits the walltime