Repository navigation
Diffusion DDP tests: destroy the gloo group in each rank and dump a stuck rank stack (all-reduce timeout) - #18908
Merged
Conversation
…tuck rank's stack
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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
studio/backend/tests/test_diffusion_ddp.py::test_all_reduce_averages_grads_and_loss_and_flagsstill times out now and then after #18885. It failed again on the Imagineer99 staging run for #18900, on baseda4430f, which includes #18885. That run settles what #18885 got wrong: both ranks print[Gloo] Rank N is connected to 1 peer ranksbefore the hang, so the rendezvous works and a port race was not the cause. (TheFileStorerendezvous from #18885 is still fine to keep.) The ranks stall after connecting, and pytest-timeout then kills the test with only the parent'sp.wait()stack in the log, so nothing says where.I could not reproduce it here: 24 runs, 12 at a time, all passed in about 10 s each.
Changes (test harness only)
dist.destroy_process_group()on the way out, as the real workers do inDistContext.close(). The children used to exit with a live gloo group, and that teardown at interpreter exit is the most likely place for an intermittent stall.faulthandler.dump_traceback_later(240, exit = True), below the 330 s pytest-timeout. If a rank is still running at 240 s it prints every thread's stack and exits non-zero,_spawn's exit-code assert fails, and the log says exactly where it was stuck. If this does not remove the flake, the next failure is self-diagnosing.Testing
studio/backend/tests/test_diffusion_ddp.py: 22 passed.assert [1, 1] == [0, 0]and both ranks' stacks, pointing at the line in_child_gradswhere each was waiting.