Fix hang with --dist=loadgroup if a crashed worker is replaced and there is still work to be done - #1328
Merged
RonnyPfannschmidt merged 2 commits intoSep 4, 2026
Conversation
…there is still work to be done
radoering
force-pushed
the
fix-other-loadgroup-hang
branch
from
August 28, 2026 13:28
cc03fbc to
1b45495
Compare
RonnyPfannschmidt
approved these changes
Aug 28, 2026
RonnyPfannschmidt
left a comment
Member
There was a problem hiding this comment.
this workaround points to an need to rework sheduling a little better
2 tasks
|
I can confirm that this fixes the crashes from #1327 |
RonnyPfannschmidt
enabled auto-merge
September 4, 2026 03:30
davidheff
added a commit
to davidheff/pytest-xdist
that referenced
this pull request
Sep 4, 2026
…lers remove_node identifies the test the worker died on but leaves it flagged as pending, so it returns to the workqueue with the rest of its work unit and the replacement worker starts it again. A test that takes the interpreter down with it takes the replacement down too, and the one after that, until --max-worker-restart is spent and the run gives up, with the remainder of that work unit never executed. handle_crashitem has already reported the test as failed by then, so the retry establishes nothing. LoadScheduling pops the crashed item for the same reason. The two acceptance tests added in pytest-dev#1328 asserted the retry loop ("5 failed" for a two-test file) and now assert the single failure. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GouFrDLBKB77gcu8Pp88r4
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.
Resolves #1327