Add CPU-side NCCL H1 missing-enter diagnostics - #1255
Open
lzy-edu wants to merge 1 commit into
Open
Conversation
lzy-edu
requested review from
aoyulong,
heavyrain-lzy and
zhaoyinglia
as code owners
July 30, 2026 09:17
lzy-edu
force-pushed
the
agent/add-nccl-probe-h1
branch
from
August 5, 2026 06:52
22e7887 to
0036763
Compare
Darryl233
reviewed
Aug 6, 2026
| if not comm_hash or comm_seq < 0 or comm_rank < 0 or comm_nranks <= 0: | ||
| return False | ||
|
|
||
| key = (self.run_id, comm_hash, comm_seq) |
Collaborator
There was a problem hiding this comment.
The key doesn't include "api". Is there any possibility of produce incorrect aggregation results?
lzy-edu
force-pushed
the
agent/add-nccl-probe-h1
branch
from
August 12, 2026 07:20
0036763 to
5a83e3f
Compare
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.
PR Category
Train
PR Types
New Features
Dependency
This is a stacked PR based on #1243.
PR Description
This PR adds a standalone CPU-side NCCL H1 probe for detecting distributed training ranks that do not enter an expected collective, or enter substantially later than their peers.
The main changes include:
LD_PRELOADlibrary.collective_missing_enterwhen only part of a communicator enters an expected collective.delayed_collective_enterwhen all ranks eventually enter but the arrival spread exceeds the configured threshold.The H1 diagnostics distinguish between:
Usage
First build the Linux NCCL preload probe in a compatible build environment:
By default, the shared library is written to:
The library must be readable at the configured path on every training node.
Enable
tracingunderexperiment.runner:After the probe has been built and tracing has been enabled, start the FlagScale training task with the existing launch command. No separate tracing command is required.
The runner automatically:
LD_PRELOAD.Results
Tracing results are written to:
The expected H1 behavior is:
collective_timeout_s, acollective_missing_enterfinding is recorded.delayed_enter_threshold_s, adelayed_collective_enterfinding is recorded.rank_alive_but_not_entered.rank_exit_or_crash_suspected.probe_event_loss_possiblewith reduced confidence.For example:
{ "hang_type": "collective_missing_enter", "run_id": "20260730_120000.000000", "comm_uid_hash": "0123456789abcdef", "comm_seq": 42, "detected_at_unix_ns": 1785400000000000000, "details": { "api": "ncclAllReduce", "expected_nranks": 4, "entered_comm_ranks": [0, 1, 2], "missing_comm_ranks": [3], "missing_rank_status": [ { "comm_rank": 3, "rank": 3, "heartbeat": "alive", "probe_dropped_events": 0 } ], "waited_s": 60.2, "reason": "rank_alive_but_not_entered", "confidence": "observed", "trace_event_loss_possible": false } }A missing-enter finding proves only that the analyzer did not observe the expected rank entering that collective before the timeout. It does not by itself identify whether the rank was blocked in data loading, computation, checkpointing, Python control flow, or another subsystem.