Skip to content

fix(rccl): critical stability fixes to the 2.30.7 release branch - #9381

Closed
JhaShweta1 wants to merge 5 commits into
developfrom
users/shwetjha/2.30.7_fixes
Closed

JhaShweta1 wants to merge 5 commits into
developfrom
users/shwetjha/2.30.7_fixes

Conversation

@JhaShweta1

Copy link
Copy Markdown
Contributor

Motivation

Backport critical stability fixes to the 2.30.7 release branch: resolve an illegal MPI_Cancel on Ibarrier during RCCL test teardown, and prevent CQ-size overflow in net_ib_cast by clamping to the device's max_cqe. Together these eliminate a test-teardown crash and a potential IB completion-queue allocation failure.

Technical Details

This backports two 2.30.7 fixes. PR #9322 (RCCL test harness): the MPIEnvironment::TearDown safety-net illegally called MPI_Cancel on a nonblocking collective (MPI_Ibarrier) request, which OpenMPI rejects with MPI_ERR_REQUEST under MPI_ERRORS_ARE_FATAL, aborting the job with a misleading error; it now calls MPI_Abort directly and raises the teardown-barrier timeout 3s→60s (overridable via RCCL_TEST_TEARDOWN_TIMEOUT_SEC) to stop false "out of sync" failures in heavy multi-phase tests. PR #9335 (net_ib_cast): the CAST connect path sized each CQ as 3 * NET_IB_MAX_REQUESTS * QpsPerConn, which exceeds the AMD AI NIC (ionic) max_cqe of 65435 for ~86+ QPs, failing ibv_create_cq and leaving NULL comms that later segfault; it now stores each device's max_cqe and clamps the requested CQ size to it in IbCastConnect/ibCastAccept. Together they recover Grow_MultiRankJump, NetIB_CtsDepthStress, and Cast_MaxQPCount128 from false failures/crashes, with no librccl runtime behavior change.

Issue Tracking

Test Plan

Test Result

  • Grow_MultiRankJump: PASS — no more false "ranks out of sync" abort in teardown.
  • NetIB_CtsDepthStress: PASS — teardown completes within the 60s tolerant timeout.
  • Cast_MaxQPCount128: PASS — ibv_create_cq no longer fails at high QP counts; no NULL-comm segfault.
  • No librccl runtime behavior change; PR [RCCL][test] Fix illegal MPI_Cancel on Ibarrier in MPIEnvironment tea… #9322 is test-harness only.

Submission Checklist

JhaShweta1 and others added 2 commits July 28, 2026 12:45
…rdown

The TearDown safety-net cancelled a nonblocking collective (MPI_Ibarrier)
request on timeout, which the MPI standard forbids. OpenMPI raises
MPI_ERR_REQUEST and, because MPI_COMM_WORLD uses MPI_ERRORS_ARE_FATAL,
that MPI_Cancel call itself aborts the job with a misleading error before
the intended MPI_Abort runs. Remove the MPI_Cancel/MPI_Request_free and
call MPI_Abort directly (it tears the job down anyway).

Also raise the teardown-barrier timeout 3s -> 60s (overridable via
RCCL_TEST_TEARDOWN_TIMEOUT_SEC) so benign rank skew in heavy multi-phase
MPI tests (GrowMPITest, NetIbMPITest CtsDepthStress) no longer trips a
false 'out of sync' abort.

Test-harness only; no librccl behavior change. Recovers Grow_MultiRankJump
and NetIB_CtsDepthStress (ib-cast) from false failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
The CAST connect path sizes each CQ as 3 * NET_IB_MAX_REQUESTS * QpsPerConn
(= 768 * nqps). On AMD AI NIC (ionic) max_cqe is 65435, so for nqps >= ~86
ibv_create_cq fails, tearing down the connection handshake and leaving NULL
send/recv comms that later segfault (e.g. Cast_MaxQPCount128). mlx5 reports a
huge max_cqe so is unaffected. Store max_cqe per device and clamp the requested
CQ size to it where the CQ size is computed (IbCastConnect / ibCastAccept).
@JhaShweta1
JhaShweta1 requested a review from a team as a code owner July 28, 2026 18:05
@therock-pr-bot

therock-pr-bot Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/rccl/src/transport/net_ib_cast/common_cast.h, projects/rccl/src/transport/net_ib_cast/connect.cc, projects/rccl/src/transport/net_ib_cast/init.cc, projects/rccl/test/common/MPIEnvironment.cpp; no test file found
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ Unit Test

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backports two stability fixes to the RCCL 2.30.7 branch: (1) make MPI test teardown more robust by avoiding an illegal MPI_Cancel on an MPI_Ibarrier request and by increasing/parameterizing the teardown timeout, and (2) prevent net_ib_cast completion queue (CQ) allocation failures by clamping requested CQ sizes to the device-reported max_cqe.

Changes:

  • RCCL MPI test harness: remove illegal cancel path by directly calling MPI_Abort on teardown-barrier timeout; raise default timeout to 60s and make it env-overridable.
  • net_ib_cast: record per-device max_cqe and clamp CQ sizes in CAST connect/accept paths to avoid ibv_create_cq failure at high QP counts.
  • Extend ncclIbDev to store maxCqe.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
projects/rccl/test/common/MPIEnvironment.cpp Makes teardown barrier timeout more tolerant/overridable and avoids illegal MPI request cancellation by aborting directly on timeout.
projects/rccl/src/transport/net_ib_cast/init.cc Stores the device-reported CQE limit (max_cqe) into the device table for later clamping.
projects/rccl/src/transport/net_ib_cast/connect.cc Clamps requested CQ size to the device maxCqe in both connect and accept paths before CQ creation.
projects/rccl/src/transport/net_ib_cast/common_cast.h Adds maxCqe field to ncclIbDev to carry the per-device CQE limit.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +250 to +254
int timeout_sec = 60;
if(const char* env = std::getenv("RCCL_TEST_TEARDOWN_TIMEOUT_SEC"))
{
int v = std::atoi(env);
if(v > 0) timeout_sec = v;
@JhaShweta1 JhaShweta1 changed the title Users/shwetjha/2.30.7 fixes fix(rccl): critical stability fixes to the 2.30.7 release branch Aug 7, 2026
@ddurnov

ddurnov commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@JhaShweta1 is it still relevant? I believe that we should get these changes via sync branch integration, right?

@nikitaxgusev

Copy link
Copy Markdown
Contributor

@ddurnov That PR was created while the SYNC PR was still open. At that time, we wanted to integrate these fixes to get the tests passing on origin/develop, because we didn't know when the SYNC branch would be aligned with origin/develop.

@atulkulk

atulkulk commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@JhaShweta1 Is this PR still relevant?

@atulkulk

atulkulk commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Per discussion w/ @JhaShweta1, this is not relevant anymore. Closing it out.

@atulkulk atulkulk closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants