Repository navigation
UCP: Exclude device atomics from failover endpoints. - #12085
Conversation
NIC hardware atomics have no replay path, so failover lane selection leaves those transports out. Token failover is rejected when IB indirect atomics are enabled; auto selects software PSN recovery.
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 CI Triage Agent — TL;DR: The icx ( Full analysisSummary: Compilation of Root cause: Commit 60acc90 ("UCP: Exclude device atomics from failover endpoints") added: ucp_rsc_index_t rsc_index;
UCS_STATIC_BITMAP_FOR_EACH_BIT(rsc_index, tl_bitmap) { ... }
Implicated commit: [REDACTED:Hex High Entropy String] — Evgeny Leksikov, "UCP: Exclude device atomics from failover endpoints." (interacts with e57ea1c by Guy Ealey Morag) File: src/ucp/wireup/select.c:1342 (macro definitions: src/ucs/datastruct/bitmap.h:76, src/ucp/core/ucp_types.h:153) Suggested fix: In - UCS_STATIC_BITMAP_FOR_EACH_BIT(rsc_index, tl_bitmap) {
+ UCP_TL_BITMAP_FOR_EACH_BIT(rsc_index, tl_bitmap) {(Alternatively declare Related: PR #12085 (this change); PR #12054 "UCP/CORE: Support up to 255 TL resources" (introduced
|
IB_INDIRECT_ATOMIC is a memory-domain setting, so the fixture publishes UCX_IB_INDIRECT_ATOMIC. A plain modify_config aborts because the key is not a UCS global option, and token mode is rejected while the knob is on.
| char value[8]; | ||
|
|
||
| for (cmpt_index = 0; cmpt_index < context->num_cmpts; ++cmpt_index) { | ||
| if (strcmp(context->tl_cmpts[cmpt_index].attr.name, "ib") != 0) { |
There was a problem hiding this comment.
This only checks that the ib component is registered, not that any IB device/transport is actually used — uct_query_components() returns ib whenever the IB module is loaded, even with no IB devices or with UCX_TLS=tcp. So UCX_FAILOVER_MODE=token now fails ucp_init() on such hosts (that is also why the token gtest needs IB_INDIRECT_ATOMIC=n). Can we base the decision on the MDs/resources actually selected into context->tl_mds/tl_rscs instead?
| } | ||
|
|
||
| if (context->config.ext.failover_mode == UCP_FAILOVER_MODE_TOKEN) { | ||
| ucs_error("UCX_FAILOVER_MODE=token requires " |
There was a problem hiding this comment.
If device AMO lanes are excluded for every failover endpoint anyway (select.c), why does token mode still have to reject UCX_IB_INDIRECT_ATOMIC=y? Please explain what else indirect atomics affect on the token path.
| } | ||
| } | ||
|
|
||
| if (ep_init_flags & UCP_EP_INIT_ERR_MODE_FAILOVER) { |
There was a problem hiding this comment.
With device AMO lanes removed, a failover endpoint sends SW atomics, but the target worker still has device atomics selected in worker->atomic_tls, so ucp_atomic_req_handler() prints "got software atomic request while device atomics are selected" and the CPU atomic is not coherent with device atomics used by other endpoints of that worker. How is this handled?
| create_entity(false); | ||
| create_entity(true); | ||
| sender().connect(&receiver(), params); | ||
| EXPECT_FALSE(use_device_amo(sender().ep())); |
There was a problem hiding this comment.
The test only checks lane selection; please also run an actual AMO on the failover endpoint, so the SW atomic path this change forces is covered.
|
Submit as Residual coverage gap: no CI job appears to exercise |
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 CI Triage Agent — TL;DR: The Full analysisSummary: Compilation of Root cause: The new helper added by this PR: ucp_rsc_index_t rsc_index; /* uint8_t */
UCS_STATIC_BITMAP_FOR_EACH_BIT(rsc_index, tl_bitmap) { ... }expands (via This is exactly what commit Implicated commit: File: Suggested fix: Use the TL-bitmap iterator in - UCS_STATIC_BITMAP_FOR_EACH_BIT(rsc_index, tl_bitmap) {
+ UCP_TL_BITMAP_FOR_EACH_BIT(rsc_index, tl_bitmap) {( Related: PR #12085 (#12085); prerequisite PR #12054 ("UCP/CORE: Support up to 255 TL resources") which added the clamped iterator. |
Walk the excluded atomic lanes with the UCP transport bitmap iterator.
A failover endpoint sends software atomics while the same worker can still select device atomics for its other endpoints.
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 CI Triage Agent — TL;DR: The gtest process didn't fail a check — it hung for exactly 900 s (the gtest watchdog timeout) inside Full analysisSummary: Azure job "Tests roce on worker 0" failed with Root cause: Timestamp analysis shows continuous per-test output every ~0.2 s until So the failure happened in endpoint setup, before any iteration: /* Progress all workers in parallel to avoid deadlocks */
while (ctx.num_outstanding > 0) { ucp_worker_progress(...); }spins forever with no timeout and no diagnostics. The in-flight lane being polled is Implicated commit: unknown with certainty. The branch's own commits are File: Suggested fix:
Related: PR #12085 (this PR), #11994 ( |
Select the software atomic protocols under failover and post an atomic from the wireup test.
|
🤖 Starting review — findings will be posted here when done. |
What?
UCP: Exclude device atomics from failover endpoints.
Why?
NIC hardware atomics have no replay path, so failover lane selection leaves those transports out. Token failover is rejected when IB indirect atomics are enabled; auto selects software PSN recovery.