Skip to content

UCT/ROCM_IPC: Add peer failure error handling - v1.23.x (#11977) - #12117

Merged
edgargabriel merged 1 commit into
openucx:v1.23.xfrom
mshanthagit:pr/ipc_err_flag_cherrypick-v1.23.x
Oct 20, 2026
Merged

edgargabriel merged 1 commit into
openucx:v1.23.xfrom
mshanthagit:pr/ipc_err_flag_cherrypick-v1.23.x

Conversation

@mshanthagit

Copy link
Copy Markdown
Contributor
  • Advertise peer failure error handling capability
  • Return errors instead of aborting on IPC cache failures, add ep_check stub
  • Add memory invalidation MD flags

What?

Cherry-pick from master

- Advertise peer failure error handling capability
- Return errors instead of aborting on IPC cache failures, add ep_check stub
- Add memory invalidation MD flags
@svc-nvidia-pr-review

Copy link
Copy Markdown

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

@svc-ucx

svc-ucx commented Oct 19, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX PR (AddressSanitizer roce on worker 2) · commit 92f97dda

TL;DR: The ASAN/roce gtest run hung for ~11 minutes inside shm_ib/test_ucp_wireup_1sided.send_disconnect_onesided_nozcopy/0 <shm,ib/rma> — 100 outstanding ucp_put_nb operations never completed after the sender EP was closed, so the receiver spun in wait_for_value until the 900 s gtest watchdog fired SIGABRT; this is a hang in the shm/ib RMA bcopy-put path, not something the PR's ROCm-IPC-only change can reach.

Full analysis

Summary: gtest aborted via watchdog (Connection timed out - abort testing, signal 6) while running shm_ib/test_ucp_wireup_1sided.send_disconnect_onesided_nozcopy/0 <shm,ib/rma>; make test exited with "Aborted (core dumped)".

Root cause: Evidence of a hang, not slowness. The log is continuously active at ~200–900 ms per test until 16:00:22.0536 when send_disconnect_onesided_nozcopy/0 <shm,ib/rma> starts, then goes completely silent for 11 min 17 s (largest gap in the whole log, vs. sub-second gaps elsewhere). The silence ends with:

  • 16:11:39 ucp_test.cc:300 UCX ERROR request 0x62e000242718 did not complete on time — the per-request deadline in ucp_test::request_process expired, i.e. a PUT/flush request was stuck in UCS_INPROGRESS.
  • 16:15:21 the 900 s watchdog (test_helpers.cc:31, watchdog_timeout = 900.) fired pthread_kill → ADD_FAILURE() << "Connection timed out - abort testing" at test_helpers.cc:57, SIGABRT.
  • The backtrace confirms where it was stuck: frame 5 is __sched_yield, which is the wait function used by ucs::test_base::wait_for_value (test/gtest/common/test.h:121). That is exactly the RMA receive path recv_b() → wait_for_value(&m_recv_data[length], recv_data) at test/gtest/ucp/test_ucp_wireup.cc:352.

So: the test (variant shm,ib/rma, with ZCOPY_THRESH=-1 forcing bcopy puts and RNDV_THRESH=inf) issued 100 ucp_put_nb + a flush (test_ucp_wireup.cc:287-302), closed the sender EP (disconnect()), and the control-word PUT never landed on the receiver — so both the send-side flush/requests and the receive-side spin never progressed. No rocm_ipc transport appears anywhere in this run (transports exercised are shm, ib, rc_x, dc_x, ud_x, tcp, self), so commit 92f97dd — which only touches src/uct/rocm/ipc/ (rocm_ipc_iface.c caps + .ep_outstanding_purge = unsupported, rocm_ipc_ep.c) — is not loaded or exercised by the failing test and cannot explain this hang.

Implicated commit: unknown — not the PR commit. 92f97dd (Manu Shantharam, "UCT/ROCM_IPC: Add peer failure error handling") is confined to src/uct/rocm/ipc/* and the failing test uses only shm/ib. The hang is in the generic UCP RMA put + EP-close path; the most plausible pre-existing candidates on this branch are the recent v1.23.x RMA/lane changes, e.g. 01be4718 "UCP/RMA: Make put/rndv and get/rndv a fallback of zcopy - v1.23.x (#12036)" and 579d935c "UCP/CORE: Support up to 255 TL resources - v1.23.x (#12083)".

File: test/gtest/ucp/test_ucp_wireup.cc:352 (hang point: wait_for_value in recv_b for the TEST_RMA variant); issuing side test/gtest/ucp/test_ucp_wireup.cc:287-308; watchdog kill at test/gtest/common/test_helpers.cc:57.

Suggested fix: Do not raise the watchdog/time limit — the process was hung, not slow. Re-run the AddressSanitizer roce job to confirm this is unrelated to PR #12117 (the ROCm IPC change is dead code on this worker). If it reproduces, debug the shm/ib bcopy-PUT-after-ep_close flow: instrument/verify that outstanding ucp_put_nb requests on the shm,ib lanes are completed or purged when ucp_ep_close_nbx runs with 100 outstanding bcopy puts and ZCOPY_THRESH=-1, and capture a core/gdb thread apply all bt plus UCX_LOG_LEVEL=debug for the stuck request 0x62e000242718. A useful interim CI improvement is to make the gtest watchdog dump all thread backtraces (not just the watched thread) before aborting, so a hang like this identifies the stuck lane directly instead of only showing the sched_yield spin.

Related: PR #12117 (this PR), PR #11977 (original ROCm IPC change being cherry-picked), PR #12048 "UCP/FT: Purge an unaware lane before rebuilding its address" (only search hit referencing send_disconnect_onesided_nozcopy — may describe the same outstanding-op/lane-purge hang), PR #12036 / #12083 (recent v1.23.x RMA and lane-count changes on this branch).

@edgargabriel
edgargabriel merged commit b4ab220 into openucx:v1.23.x Oct 20, 2026
162 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