Skip to content

[release/2.15][c10d][nccl2] Abort timed-out groups on every rank in timeout tests (#200371) - #3854

Merged
pragupta merged 1 commit into
release/2.15from
albmalamd/cherry-pick/2.15/200371-abort-timed-out-groups-all-ranks
Oct 26, 2026
Merged

pragupta merged 1 commit into
release/2.15from
albmalamd/cherry-pick/2.15/200371-abort-timed-out-groups-all-ranks

Conversation

@albmalamd

Copy link
Copy Markdown

Fixes pytorch#200326

Root cause: in the nccl2 timeout tests rank 0's communicator times out and is aborted, while the other ranks call destroy_process_group(). NCCL 2.31+ runs bootstrapIntraNodeBarrier in commDestroySync unless the comm was aborted, so the survivors wait forever for rank 0 at the teardown barrier and the test hangs until the class timeout.

Fix: every rank aborts the timed-out group via _abort_process_group() instead of a graceful destroy, in the five tests that leave a timed-out subgroup behind.

Test plan:
PYTHONPATH=/tmp/flk/nccl232 python test/distributed/test_c10d_nccl2.py -k WatchdogNoTearDown -k BlockingWait -k DumpOnTimeout -k DumpTimeoutBound # NCCL 2.32.3, 15x pass; hung before
python test/distributed/test_c10d_nccl2.py -k WatchdogNoTearDown -k BlockingWait -k DumpOnTimeout -k DumpTimeoutBound # NCCL 2.30.7, 5x pass

Authored with an AI assistant (Claude).
Pull Request resolved: pytorch#200371 Approved by: https://github.com/fduwjj

(cherry picked from commit e63e88f)

…ytorch#200371)

Fixes pytorch#200326

Root cause: in the nccl2 timeout tests rank 0's communicator times out and is aborted, while the other ranks call destroy_process_group(). NCCL 2.31+ runs bootstrapIntraNodeBarrier in commDestroySync unless the comm was aborted, so the survivors wait forever for rank 0 at the teardown barrier and the test hangs until the class timeout.

Fix: every rank aborts the timed-out group via _abort_process_group() instead of a graceful destroy, in the five tests that leave a timed-out subgroup behind.

Test plan:
PYTHONPATH=/tmp/flk/nccl232 python test/distributed/test_c10d_nccl2.py -k WatchdogNoTearDown -k BlockingWait -k DumpOnTimeout -k DumpTimeoutBound   # NCCL 2.32.3, 15x pass; hung before
python test/distributed/test_c10d_nccl2.py -k WatchdogNoTearDown -k BlockingWait -k DumpOnTimeout -k DumpTimeoutBound   # NCCL 2.30.7, 5x pass

Authored with an AI assistant (Claude).
Pull Request resolved: pytorch#200371
Approved by: https://github.com/fduwjj

(cherry picked from commit e63e88f)
@albmalamd
albmalamd requested a review from pragupta October 21, 2026 11:56
@albmalamd albmalamd changed the title [c10d][nccl2] Abort timed-out groups on every rank in timeout tests (#200371) [release/2.15][c10d][nccl2] Abort timed-out groups on every rank in timeout tests (#200371) Oct 21, 2026
@pragupta
pragupta merged commit 4b03e30 into release/2.15 Oct 26, 2026
7 checks passed
@pragupta
pragupta deleted the albmalamd/cherry-pick/2.15/200371-abort-timed-out-groups-all-ranks branch October 26, 2026 16:34
jithunnair-amd pushed a commit that referenced this pull request Nov 4, 2026
…imeout tests (pytorch#200371) (#3854)

Fixes pytorch#200326

Root cause: in the nccl2 timeout tests rank 0's communicator times out
and is aborted, while the other ranks call destroy_process_group(). NCCL
2.31+ runs bootstrapIntraNodeBarrier in commDestroySync unless the comm
was aborted, so the survivors wait forever for rank 0 at the teardown
barrier and the test hangs until the class timeout.

Fix: every rank aborts the timed-out group via _abort_process_group()
instead of a graceful destroy, in the five tests that leave a timed-out
subgroup behind.

Test plan:
PYTHONPATH=/tmp/flk/nccl232 python test/distributed/test_c10d_nccl2.py
-k WatchdogNoTearDown -k BlockingWait -k DumpOnTimeout -k
DumpTimeoutBound # NCCL 2.32.3, 15x pass; hung before
python test/distributed/test_c10d_nccl2.py -k WatchdogNoTearDown -k
BlockingWait -k DumpOnTimeout -k DumpTimeoutBound # NCCL 2.30.7, 5x pass

Authored with an AI assistant (Claude).
Pull Request resolved: pytorch#200371
Approved by: https://github.com/fduwjj

(cherry picked from commit e63e88f)

Co-authored-by: Tristan Rice <rice@fn.lc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants