Fix #287: terminate scheduler on abort to prevent HALT hang#303
Draft
Koan-Bot wants to merge 3 commits intoTest-More:2.0from
Draft
Fix #287: terminate scheduler on abort to prevent HALT hang#303Koan-Bot wants to merge 3 commits intoTest-More:2.0from
Koan-Bot wants to merge 3 commits intoTest-More:2.0from
Conversation
When abort() kills child jobs, the scheduler itself was not being terminated. This left yath hanging after a BAIL_OUT event, requiring ctrl+c to exit. Adding $self->terminate(1) after the kill loop ensures the scheduler exits its main loop once abort completes. Safe with --no-abort-on-bail: that flag gates job_update() (which never calls abort()), not the abort() method itself. Also replaces the stub Scheduler.t with real unit tests (7 subtests) covering abort, kill, terminate, and selective run abort behavior. Adds integration test for BAIL_OUT termination. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
view failure from smoker while running |
Collaborator
|
@Koan-Bot rebase |
Collaborator
|
View the failure from smokers |
Collaborator
|
@Koan-Bot rebase |
Contributor
Author
Rebase: Fix #287: terminate scheduler on abort to prevent HALT hangBranch Actions
Automated by Kōan |
Collaborator
|
New error |
Contributor
Author
Rebase: Fix #287: terminate scheduler on abort to prevent HALT hangBranch Actions
Automated by Kōan |
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.
What
Calling
$self->terminate(1)inScheduler::abort()so the scheduler exits after killing child jobs.Why
When a BAIL_OUT event triggers an abort, the scheduler kills running jobs but never terminates itself — leaving yath hanging indefinitely (issue #287). Users had to ctrl+c to exit.
How
The fix is a single line:
$self->terminate(1)at the end ofabort(). This is the same approach as PR #289 by @troglodyne, reimplemented on current2.0with regression tests.--no-abort-on-bailinteraction: Safe. That flag gatesjob_update()(which sets halt on individual runs) — it never reachesabort(). Theabort()method is only called fromapi_abort()(explicit abort command) andkill(), which are intentional "stop everything" actions.Testing
t/unit/Test2/Harness/Scheduler.twith 7 real subtests covering abort→terminate, kill→abort delegation, terminate idempotency, run halt marking, job PID killing, and selective run abort.t/integration/bailout.twith test fixtures (bail.tx,pass.tx) that verify yath exits on BAIL_OUT, respects--no-abort-on-bail, and passes when BAIL_OUT is not triggered.Closes #287
Supersedes #289
🤖 Generated with Claude Code