Skip to content

UCT/IB/MLX5: Fix AR support prints in SL selection logging - #12089

Merged
evgeny-leksikov merged 3 commits into
openucx:masterfrom
william-gallagher-nv:SL-selection-debug-log
Oct 21, 2026
Merged

evgeny-leksikov merged 3 commits into
openucx:masterfrom
william-gallagher-nv:SL-selection-debug-log

Conversation

@william-gallagher-nv

Copy link
Copy Markdown
Contributor

With AR_ENABLE=auto selected SL was printed as not supporting Adaptive Routing due to incorrect AND operation.

What?

Converts selected SL to equivalent bit for comparison to SLs with AR mask. This prevents ANDing raw value and bitmask which results in misleading log prints.

Before fix:

UCX_LOG_LEVEL=debug  ucx_info -d

ib_mlx5.c:1240 UCX  DEBUG SL=0 (AR support - no) was selected on mlx5_0:1, SLs with AR support = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, SLs without AR support = { <none> }
UCX_LOG_LEVEL=debug UCX_IB_SL=4 ucx_info -d

ib_mlx5.c:1240 UCX  DEBUG SL=4 (AR support - no) was selected on mlx5_0:1, SLs with AR support = { 4 }, SLs without AR support = { <none> }

With fix:

 UCX_LOG_LEVEL=debug ucx_info -d 
 
 ib_mlx5.c:1240 UCX  DEBUG SL=0 (AR support - yes) was selected on mlx5_0:1, SLs with AR support = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, SLs without AR support = { <none> }
UCX_LOG_LEVEL=debug UCX_IB_SL=4 ucx_info -d

ib_mlx5.c:1240 UCX  DEBUG SL=4 (AR support - yes) was selected on mlx5_0:1, SLs with AR support = { 4 }, SLs without AR support = { <none> }

Why?

Fixes misleading debug logs.

With AR_ENABLE=auto selected SL was printed as not supporting Adaptive
Routing due to incorrect AND operation.
@william-gallagher-nv william-gallagher-nv changed the title UCT/IB/MLX5: Fix AR support status in SL selection log UCT/IB/MLX5: Fix AR support prints in SL selection log Oct 14, 2026
@william-gallagher-nv william-gallagher-nv changed the title UCT/IB/MLX5: Fix AR support prints in SL selection log UCT/IB/MLX5: Fix AR support prints in SL selection logging Oct 14, 2026
@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

Comment thread src/uct/ib/mlx5/ib_mlx5.c Resolved
@svc-nvidia-pr-review

Copy link
Copy Markdown

Coverage note: test_uct_ib_sl_utils.sl_selection covers the selected SL and status for every ar_enable/ooo_sl_mask combination, but the AR-support text only appears in a ucs_debug() message, which no test inspects (the existing wrap_errors_check_sl_masks_logger only filters UCS_LOG_LEVEL_ERROR). So this fix is not regression-tested; given it is log-only output, asking for a new test seems disproportionate, but worth confirming with the author if they want coverage.

Caveat: only read access to the repository checkout was available; gh could not be run to fetch the PR's existing inline comments, top-level comments, and reviews. Duplicate detection against prior discussion was therefore not completed — please re-check the conversation (including whether the UCS_BIT_GET idea was already raised) before submitting the comment above.

@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

Comment thread src/uct/ib/mlx5/ib_mlx5.c Resolved
@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Review complete — no issues found.

@svc-ucx

svc-ucx commented Oct 14, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX PR (AddressSanitizer roce on worker 3) · commit 6f6d0354

TL;DR: The ASAN shard-4 gtest run was killed by UCX's own 900-second gtest watchdog after shm_ib/test_ucp_tag_match_rndv.rts_unexp/3 <shm,ib/put_zcopy,proto_v1> hung with zero output for exactly 15 minutes; this is a hang in RoCE rendezvous put_zcopy (proto_v1), not a legitimate slowness, and it is unrelated to this PR's log-only change — retry the job and, if it reproduces, investigate the rndv put_zcopy completion path.

Full analysis

Summary: make -C test/gtest test aborted (SIGABRT, exit code 2) when the gtest watchdog fired on the very first test of shard 4 of 4, shm_ib/test_ucp_tag_match_rndv.rts_unexp/3 <shm,ib/put_zcopy,proto_v1>.

Root cause: A hang, not a timeout-too-short. The log shows [ RUN ] shm_ib/test_ucp_tag_match_rndv.rts_unexp/3 at 19:03:20.570, then a single 15m00s gap with no output at all until 19:18:20.470, where test_helpers.cc:57 reports Failed / Connection timed out - abort testing. That interval matches watchdog_timeout = 900. in test/gtest/common/test_helpers.cc:31 exactly: the watchdog thread hit ETIMEDOUT in pthread_cond_timedwait and sent its kill signal to the watched thread (pthread_kill, line 59), producing "Caught signal 6 (Aborted: tkill(2) or tgkill(2))". The backtrace confirms the test thread was spinning in __sched_yield — i.e. stuck in a progress/wait loop waiting for a rendezvous transfer that never completed, on the RoCE + ASAN configuration with put_zcopy under protocol v1. Nothing was making progress, so raising the time limit would not help.

The PR is almost certainly not the cause. Its two commits ([REDACTED:Hex High Entropy String] "Fix AR support status in SL selection log" and 6f6d0354 "Use UCS_BIT_GET to simplify AND operation") only affect sl_ar_support_str, a string used in a ucs_debug() message at src/uct/ib/mlx5/ib_mlx5.c:1216/1240. It does not change *sl_p. Moreover, on this RoCE job the code takes the early RoCE branch at ib_mlx5.c:1286, which calls uct_ib_mlx5_select_sl(..., UCS_NO, 0, 1, ...) — with hw_sl_mask == 0 and ar_enable == UCS_NO, the UCS_AUTO branch containing the changed UCS_BIT_GET line is never even reached. A debug-log string change cannot stall a data transfer.

Implicated commit: unknown for the hang itself. The PR HEAD commits are [REDACTED:Hex High Entropy String] and 6f6d0354 (William Gallagher), but both are log-message-only and ruled out by the RoCE code path above. No recent commit to the rndv/put_zcopy path was identified as the trigger.

File: test/gtest/common/test_helpers.cc:31 and :57 (watchdog that reported the failure); the hung test is shm_ib/test_ucp_tag_match_rndv.rts_unexp/3 <shm,ib/put_zcopy,proto_v1>. Changed-but-innocent code: src/uct/ib/mlx5/ib_mlx5.c:1216.

Suggested fix: Re-run the "AddressSanitizer roce on worker 3" job — this is a flaky/infrastructure hang, not a PR regression, and should not block PR #12089. If it reproduces on this branch or others, treat it as a genuine rendezvous hang rather than a timeout tuning issue: capture a stack dump of all threads at the hang (e.g. run the single test with --gtest_filter='shm_ib/test_ucp_tag_match_rndv.rts_unexp/3' plus UCX_LOG_LEVEL=debug and attach gdb at the 15-minute mark), and focus on the RoCE put_zcopy rendezvous completion path under proto_v1 with ASAN — specifically whether an RTS/ATP completion is being lost so the test's progress loop never satisfies its wait condition. Do not raise watchdog_timeout; the process produced no output for the entire 15 minutes, so it was stuck, not slow.

Related: PR #12089 (this PR, "UCT/IB/MLX5: Fix AR support prints in SL selection logging"). No existing issue found matching this hang signature; searches for test_ucp_tag_match_rndv rts_unexp hang and Connection timed out - abort testing returned no matches, so consider filing a new flaky-test issue.

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id 4dd8e6cd-1fb7-44f0-9b49-7d2943462176 in the triage console for the audit trail.

@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Review complete — no issues found.

@svc-ucx

svc-ucx commented Oct 20, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX PR (Tests roce on worker 2) · commit ef885e97

TL;DR: The roce on worker 2 gtest run hung — dcx/test_ucp_rma.put_nonblocking_iov_zcopy/2 <dc_x,cuda_copy,rocm_copy/user_memh> posted PUT zcopy requests on DC that never completed, so the 900s gtest watchdog fired SIGABRT and make test aborted. This is a DC/RMA-zcopy completion stall unrelated to this PR's logging-only change, most likely from the recently merged repost-on-selected-lane change in put_offload.c (or a sick HCA on swx-rain04).

Full analysis

Summary: gtest aborted (signal 6, core dumped, make: *** [Makefile:4925: test] Aborted) after dcx/test_ucp_rma.put_nonblocking_iov_zcopy/2 with the user_memh variant hung waiting for PUT zcopy completions.

Root cause: A hang, not a slow test. The log timestamps show the smoking gun:

  • 02:21:14 — test starts: [ RUN ] dcx/test_ucp_rma.put_nonblocking_iov_zcopy/2 <dc_x,cuda_copy,rocm_copy/user_memh>
  • 02:24:14, 02:27:15, 02:30:15, 02:33:16 — four ucp_test.cc:300 UCX ERROR request 0x... did not complete on time, each exactly 180 s apart (the ucs::get_deadline() interval). Four separate requests each burned a full deadline without ever completing.
  • 02:36:14 — exactly 900 s after test start, the gtest watchdog (watchdog_timeout = 900., test_helpers.cc:31) fires: Connection timed out - abort testing, then Caught signal 6.

The backtrace confirms the thread was spinning in the progress loop the entire time, never getting a completion:
ucp_test::progress() (ucp_test.cc:173) → check_events() (ucp_test.cc:250) → request_process() (ucp_test.cc:293) → test_ucp_memheap::test_xfer() (test_ucp_memheap.cc:106) → test_ucp_rma::test_message_sizes() (test_ucp_rma.cc:194).

So uct_ep_put_zcopy() on the dc_x lanes (src/ucp/rma/put_offload.c:280) accepted the descriptors but the completion never arrived. A corroborating earlier symptom in the same log: rc_mlx5/test_rc_srq.reorder_cyclic/1 "passed" but took 180505 ms — the same ~180 s stall signature on the mlx5 RC path, indicating completion delivery was already stalling on this node before the fatal test.

This PR (#12089, commits [REDACTED:Hex High Entropy String] and 6f6d0354 by William Gallagher) only changes the sl_ar_support_str debug string and swaps an AND for UCS_BIT_GET at src/uct/ib/mlx5/ib_mlx5.c:1216. That value is consumed solely by the ucs_debug()/ucs_error() calls at lines 1240 and 1256 and never feeds *sl_p, so it cannot change the selected SL or affect the data path. The failure is not attributable to this PR.

Implicated commit: Not this PR. Prime data-path suspect on the merge base: [REDACTED:Hex High Entropy String] "UCP/PROTO: Repost GET and zcopy on the selected lane. (#12091)" (Evgeny Leksikov, 2026-10-16) — the most recent change to the PUT zcopy path in put_offload.c, merged 4 days before this 2026-10-20 run. Secondary suspect for the user_memh variant specifically: [REDACTED:Hex High Entropy String] "UCP/DT: Register user-supplied SGL memory handles on all required MDs (#11888)" (Michal Shalev).

File: src/ucp/rma/put_offload.c:280 (uct_ep_put_zcopy in ucp_proto_put_offload_zcopy_send_func) / ucp_proto_put_offload_zcopy_progress at src/ucp/rma/put_offload.c:296; failure surfaced at test/gtest/ucp/ucp_test.cc:300 and aborted by test/gtest/common/test_helpers.cc:57.

Suggested fix:

  1. Do not raise watchdog_timeout — the 900 s kill is the symptom; the requests were hung, not progressing.
  2. Re-run the roce on worker 2 job to classify flaky vs. deterministic. The reorder_cyclic/1 180 s stall in the same run suggests checking swx-rain04's mlx5 HCA/RoCE health (link flaps, stuck CQ, firmware) before chasing code.
  3. If reproducible, reproduce standalone with
    GTEST_FILTER='dcx/test_ucp_rma.put_nonblocking_iov_zcopy*' UCX_LOG_LEVEL=debug and bisect against [REDACTED:Hex High Entropy String]; verify that a reposted/split zcopy chunk on the selected DC lane still has its req->send.state.uct_comp counter correctly incremented — a lost completion-counter increment on the repost path produces exactly this "request never completes while lanes stay healthy" signature.
  4. Since the SL-logging change in this PR is provably side-effect-free, the PR should not be blocked on this failure; request a CI re-run.

Related: PR #12089 (this PR, logging only); PR #12091 / commit [REDACTED:Hex High Entropy String] (zcopy repost on selected lane); PR #11888 / commit [REDACTED:Hex High Entropy String] (user-supplied SGL memh registration). No existing issue found for put_nonblocking_iov_zcopy hangs.

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id d026b336-25c2-469f-949f-a43d5d888a4b in the triage console for the audit trail.

@evgeny-leksikov
evgeny-leksikov merged commit cff6ffb into openucx:master Oct 21, 2026
165 checks passed
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.

4 participants