Skip to content

FT/TF: wireup recovery bugfixes - #12129

Closed
evgeny-leksikov wants to merge 27 commits into
openucx:masterfrom
evgeny-leksikov:ucp_ft_tf_bugfixes
Closed

evgeny-leksikov wants to merge 27 commits into
openucx:masterfrom
evgeny-leksikov:ucp_ft_tf_bugfixes

Conversation

@evgeny-leksikov

Copy link
Copy Markdown
Contributor

What?

Describe what this PR is doing.

Why?

Justification for the PR. If there is an existing issue/bug, please reference it. For
bug fixes, the 'Why?' and 'What?' can be merged into a single item.

How?

It is optional, but for complex PRs, please provide information about the design,
architecture, approach, etc.

@svc-nvidia-pr-review

Copy link
Copy Markdown

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

@evgeny-leksikov evgeny-leksikov changed the title Ucp ft tf bugfixes FT: wireup recovery bugfixes Oct 21, 2026
@evgeny-leksikov evgeny-leksikov changed the title FT: wireup recovery bugfixes FT/TF: wireup recovery bugfixes Oct 21, 2026
Comment thread src/uct/ib/mlx5/rc/rc_mlx5_ep.c Outdated
* usable. */
uct_rc_mlx5_ep_save_ft_ci(ep);
}
/* Sometimes the NOP posted before the QP moves to ERR produces no

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blocker: pls remove the #if 0 block. Disabled assertion left in the code with a comment admitting the mechanism does not work — dead code plus an unenforced contract. The comment says the NOP sometimes produces no completion, so err_handler_inprogress is not actually guaranteed here — that needs to be resolved rather than commented out.

ucs_error("rc mlx5: rx token is NULL");
return UCS_ERR_INVALID_PARAM;
}
if (start_pi == end_pi) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blocker: an idle queue previously returned UCS_OK here; now any range that is not all-NOP (or with a non-empty outstanding queue) aborts the process, and ucs_assertv_always(start_pi != end_pi) is unconditionally false at this point (also in release builds). pls return a status instead of a fatal assert.

Comment thread src/uct/api/v2/uct_v2.h Outdated
* @brief Parameters for invalidating a UCT endpoint by @ref uct_ep_invalidate.
*/
typedef struct {
typedef struct {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blocker: stray leading space introduced in a public header.

Suggested change
typedef struct {
typedef struct {

}
}

/* Replay the rc_x/PUT order 4, 0, 2, 1, 3, then 5. The last lane stays

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

test coverage: this replaces lane shuffling with a single hardcoded order {4,0,2,1,3,5} and skips the test (UCS_TEST_SKIP_R) for any other lane count/set, so PUT coverage drops to one configuration. Looks like reproduction scaffolding — pls keep shuffle_lanes() here. (Same for the block around lines 282-287.)

Comment thread src/ucp/wireup/wireup.c Outdated
}

/* 0 is unseen. A wrapped id stays newer until half the counter space. */
static int ucp_wireup_tf_req_is_newer(uint32_t seen, uint32_t request_id)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

duplication: ucp_ep_tf_peer_req_is_newer() in ucp_ep.c is the same function, including the comment. pls keep one shared helper; src/AGENTS.md asks not to duplicate implementation patterns.

Comment thread src/ucp/core/ucp_worker.c

ucs_debug("worker %p: error handler called for UCT EP %p: %s",
worker, uct_ep, ucs_status_string(status));
ucs_diag("worker %p: error handler called for UCT EP %p: %s",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

logging: pls keep these as ucs_debug (also line 594 and the other ucs_debug→ucs_diag conversions in ucp_ep.c / wireup.c). They are per-lane/per-message flow traces (error handler entry, lane lookup, token store/release, hold/detach), not diagnostics of a silent adjustment; docs/LoggingStyle.md reserves diag for silent adjustments and internal error handling.

Comment thread src/ucp/core/ucp_ep.c Outdated
/* A peer request moves the queue pair to error and waits for that
* completion before this lane is failed. Recovery stays idle until
* the completion holds it. */
if ((ep->ext->recovery_arg == NULL) ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

readability: the nested form is confusing — when recovery_arg == NULL the assert is a tautology, so the whole block only means "recovery_arg is NULL or tf_reply is not NULL".

Suggested change
if ((ep->ext->recovery_arg == NULL) ||
ucs_assert((ep->ext->recovery_arg == NULL) ||
(ep->ext->recovery_arg->tf_reply != NULL));

Comment thread src/ucp/core/ucp_ep.c
@@ -2717,7 +2863,8 @@ uint8_t ucp_ep_tf_tx_len(ucp_ep_h ep, ucp_lane_index_t lane,

ucs_status_t
ucp_ep_tf_derive_rx(ucp_ep_h ep, ucp_lane_index_t lane, const void *tx_token,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

API shape: require_open exists only to decide whether ucp_ep_tf_derive_rx performs its derive at all. Per root AGENTS.md: "Do not add a parameter whose sole purpose is to decide whether a function performs its core operation; make that decision in the caller." pls move the ucp_ep_tf_exchange_open() check to the caller instead of passing require_open down. (See also src/ucp/core/ucp_ep.h:1205-1214.)

Comment thread src/uct/ib/mlx5/rc/rc_mlx5_ep.c Outdated
{
UCT_RC_MLX5_BASE_EP_DECL(tl_ep, iface, ep);

/* An idle queue pair produces no completion after the transition to ERR.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

question: uct_ep_invalidate is public API, and the NOP is now posted for every caller, consuming a WQE and a CQ credit. There is also no UCT_RC_EP_FLAG_CONNECTED check, so this can post on a QP that was never moved out of RESET/INIT. Should this NOP be gated on the ep being connected, and on the failover path only?

@svc-nvidia-pr-review

Copy link
Copy Markdown

This PR is well over the 500-added-line limit in REVIEW.md and mixes at least four independent changes: (1) a revert of the "outstanding purge before the error handler" feature (NEWS entry, uct_v2.h doc note, uct_rc_mlx5_ep_save_ft_ci export, test_purge_before_error/put_zcopy_before_error), (2) the new deferred LANES_ADDR reply machinery in wireup, (3) the recovery resend/sent_lanes scheduling change, and (4) a large block of debug instrumentation (ucs_debug→ucs_diag, new per-lane traces, hardcoded lane order in gtest). pls split these. The #if 0 assertion and the "Temporarily disabled" comment also suggest the mlx5 part is not finished yet.

Restore outstanding purge to the contract that it runs only after the
error handler returns UCS_INPROGRESS. Post a signaled NOP when
invalidating an idle queue pair, and accept a NOP-only purge when that
NOP completes without an error completion.
Post the invalidate NOP only when the outstanding queue is empty.
Walk unreleased credits inside the endpoint NOP check, and return
UCS_ERR_INVALID_PARAM when that range is unexpectedly empty.
@evgeny-leksikov evgeny-leksikov added the WIP-DNM Work in progress / Do not review label Oct 21, 2026
@evgeny-leksikov
evgeny-leksikov marked this pull request as ready for review October 21, 2026 12:39
@svc-ucx

svc-ucx commented Oct 21, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX PR (Codestyle commit title) · commit 57ee9621

TL;DR: The "commit title" codestyle job failed because PR #12129 contains a revert commit titled Revert "UCT/IB/MLX5: Save the transmit range inside outstanding purge (#12033)", which doesn't match the required MODULE: Description title pattern — rewrite that commit's title (e.g. UCT/IB/MLX5: Revert "Save the transmit range inside outstanding purge" (#12033)).

Full analysis

Summary: Codestyle stage, job commit title (Azure build 140147) exited with code 1 — one commit in the PR has a non-conforming title.

Root cause: codestyle_check_commit_title() validates every non-merge commit title against the regex ^[0-9A-Z/_-]+:\ [[:alnum:]_], i.e. an uppercase module prefix followed by : and an alphanumeric character. All 10 other commits in the PR passed; the 11th, Revert "UCT/IB/MLX5: Save the transmit range inside outstanding purge (#12033)", starts with Revert " (lowercase letters plus a quote, no leading module prefix) so it fails the match and sets err=1. The log shows exactly this:

  • Bad commit title: 'Revert "UCT/IB/MLX5: Save the transmit range inside outstanding purge (#12033)"'
  • ##[error]Bash exited with code '1'.

Secondary CI bug: the step runs with set -eE, so the script aborts at the codestyle_check_commit_title call itself and the if [[ $? -ne 0 ]] block (which prints the friendly "Bad commit title(s), see " logissue) is never reached — hence the bare exit-1 with no guidance message. Note this is a real content failure, not infrastructure flakiness; no timeouts or hangs in the log (checkout and the check both completed in seconds).

Implicated commit: The offending commit is the auto-generated revert in branch ucp_ft_tf_bugfixes (PR #12129, head [REDACTED:Hex High Entropy String], merge commit [REDACTED:Hex High Entropy String]); the checking logic is in buildlib/tools/codestyle.sh (no recent changes found).

File: buildlib/tools/codestyle.sh:14 (title regex); job definition buildlib/pr/codestyle.yml:17-30

Suggested fix:

  1. Primary (PR author): rebase/reword the revert commit to satisfy the prefix rule, e.g. git rebase -i 72895c48 and change its subject to UCT/IB/MLX5: Revert "Save the transmit range inside outstanding purge" (#12033). Also double-check UCP: lane lookup + err dbg msgs and GTEST: put repro — they pass the regex but look like WIP/scratch titles that reviewers will likely ask to be rewritten anyway.
  2. Optional CI hardening (separate PR): either accept reverts in the regex, e.g.
    if [[ $title =~ ^(Revert \")?[0-9A-Z/_-]+:\ [[:alnum:]_] ]],
    and/or fix buildlib/pr/codestyle.yml:18 so the helpful error message actually prints — change set -eE handling to codestyle_check_commit_title "$base..$head" || { ...logissue...; } instead of relying on $? after a command that set -e already aborts on.

Related: Guidance referenced by the job: https://github.com/openucx/ucx/wiki/Guidance-for-contributors#general-guidelines ; reverted PR: #12033 ; this PR: #12129

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id 5ad0e3e1-ca5f-4535-9443-711ca4d9b267 in the triage console for the audit trail.

Move the queue pair to ERR before posting the NOP, so the NOP cannot
complete successfully. ERR flushes whatever is still posted, but a queue
that is not full can have nothing left to complete. Post the signaled
NOP in that case. The delivered-flush purge test invalidates before the
sentinel is observed and purges only after the error callback.
@svc-nvidia-pr-review

Copy link
Copy Markdown

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

Comment thread src/ucp/core/ucp_ep.c
return lane;
}

if ((ucp_ep_config(ucp_ep)->key.lanes[lane].lane_types &

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blocker — lane-type bit test is missing UCS_BIT().

UCP_LANE_TYPE_FAILED is an enum index (value 10 in src/ucp/proto/lane_type.h), not a mask. lane_types & 10 tests UCS_BIT(1) | UCS_BIT(3), i.e. AM_BW | RMA_BW. Every other site in the tree uses UCS_BIT(UCP_LANE_TYPE_FAILED) (ucp_ep.c:1707,1714,1743,1812,5563). The new lookup therefore matches healthy BW lanes and skips actual failed lanes, so tf[lane].uct_ep can be compared for the wrong lane index.

Suggested change
if ((ucp_ep_config(ucp_ep)->key.lanes[lane].lane_types &
if ((ucp_ep_config(ucp_ep)->key.lanes[lane].lane_types &
UCS_BIT(UCP_LANE_TYPE_FAILED)) &&

Comment thread src/uct/ib/mlx5/rc/rc_mlx5_ep.c Outdated
return UCS_OK;
}

ucs_assertv_always(start_pi != end_pi,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blocker — assertion inside if (start_pi == end_pi) always fires. ucs_assertv_always is unconditional in all builds (src/ucs/debug/assert.h), so reaching this line aborts the process. Any purge on an idle QP whose posted range is not all-NOP, or with a non-empty outstanding queue, now crashes instead of returning UCS_OK as before.

This is inside if (start_pi == end_pi), so the condition is always false and ucs_assertv_always aborts in release builds too. The old code returned UCS_OK for an idle queue — pls restore a non-fatal path here.

Comment thread src/ucp/wireup/wireup.c
(uint64_t)accepted);
}

if (accepted == 0) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

seen_peer_id survives a peer request_id restart, so the second failure episode is dropped.

ucp_ep_recovery_arg_free() is called once all lanes recover (ucp_ep.c:2460) and ucp_ep_recovery_arm() re-allocates the arg with ucs_calloc (ucp_ep.c:2356), so the initiator's request_id restarts at 1. seen_peer_id lives in ep->ext and is never reset, so ucp_ep_tf_peer_req_is_newer(seen=N>1, request_id=1) is false for every lane, accepted == 0, and the request returns here silently. Recovery then stalls until retries are exhausted and the endpoint is failed.

pls reset seen_peer_id together with the recovery state, or use a generation that is not reset on one side only.

Comment thread src/uct/api/v2/uct_v2.h Outdated
* @brief Parameters for invalidating a UCT endpoint by @ref uct_ep_invalidate.
*/
typedef struct {
typedef struct {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor — stray leading space in a public header.

Suggested change
typedef struct {
typedef struct {

minor: unintended whitespace change.

Comment thread src/ucp/wireup/wireup.c
uint8_t scheduled;
ucp_wireup_lane_token_t rx_tokens[UCP_MAX_LANES];
void *address;
size_t address_length;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

address_length is stored but never read. ucp_wireup_tf_reply_finish() calls ucp_address_unpack(ep->worker, reply->address, ...) without the length, so the field is dead state. REVIEW.md asks to avoid redundant state.

Suggested change
size_t address_length;
void *address;

address_length is never read back — pls drop it.

Comment thread src/ucp/core/ucp_ep.c Outdated
/* A peer request moves the queue pair to error and waits for that
* completion before this lane is failed. Recovery stays idle until
* the completion holds it. */
if ((ep->ext->recovery_arg == NULL) ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The guarded assert can be written directly.

Suggested change
if ((ep->ext->recovery_arg == NULL) ||
ucs_assert((ep->ext->recovery_arg == NULL) ||
(ep->ext->recovery_arg->tf_reply != NULL));

Same condition, without the if wrapper that only exists to reach a trivially-true assert.

Comment thread src/ucp/core/ucp_worker.c
(ucp_ep_tf_hold(ucp_ep, lane, uct_ep) == UCS_OK)) {
return UCS_INPROGRESS;
if (wireup_ep == NULL) {
ucs_status_t hold_status = ucp_ep_tf_hold(ucp_ep, lane, uct_ep);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor — declaration in the middle of a block. docs/CodeStyle.md ("Variable definition") wants definitions at the top of the function. Same issue for uint16_t outstanding_bb / uint16_t posted_pi at src/uct/ib/mlx5/rc/rc_mlx5_ep.c:1924.

minor: pls declare hold_status at the top of the function.

const size_t size = ucs_max(attr.cap.get.min_zcopy,
ucs_min((size_t)4096,
attr.cap.get.max_zcopy));
ucs_min((size_t)4096, attr.cap.get.max_zcopy));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor — reverted line wrap exceeds 80 columns.

Suggested change
ucs_min((size_t)4096, attr.cap.get.max_zcopy));
const size_t size = ucs_max(attr.cap.get.min_zcopy,
ucs_min((size_t)4096,
attr.cap.get.max_zcopy));

minor: this line is 89 columns; the 80-column limit is in docs/CodeStyle.md.


ucs_free(callback_data.dm_data);
uct_rc_mlx5_ep_purge_finish_tx(ep);
uct_rc_mlx5_ep_update_tx_qp_res(ep, txwq->prev_sw_pi);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Credit release is no longer guarded by err_handler_inprogress. uct_rc_mlx5_iface_handle_failure() already releases the TX credits at out_update_tx_res when err_handler_inprogress is 0, and the removed uct_rc_mlx5_ep_purge_finish_tx() guarded this call for exactly that reason. With the err_handler_inprogress assertion above disabled by #if 0, a purge can reach this line with err_handler_inprogress == 0.

With the assertion above disabled, can this run while err_handler_inprogress is 0? In that case uct_rc_mlx5_iface_handle_failure already released the credits at out_update_tx_res, and uct_rc_mlx5_ep_purge_finish_tx used to guard this call for that reason.

@svc-nvidia-pr-review

Copy link
Copy Markdown

Residual coverage gaps: no test exercises the deferred LANES_ADDR reply path (tf_reply, waiting/armed arming, restart-on-newer-request) or a second failure episode on the same endpoint, which is exactly where finding 3 bites.

Residual coverage gap: test_purge_before_error / put_zcopy_before_error are deleted, so the UCT purge-ordering behavior has no replacement coverage.

Residual coverage gap: the PUT fault-tolerance test now hard-codes a 6-lane order and skips otherwise, so the lane-recovery ordering path is effectively unexercised outside one hardware configuration.

@svc-ucx

svc-ucx commented Oct 22, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX PR (Tests gpu prebuild) · commit 18eb2831

TL;DR: The gpu prebuild job's "Build for tests" step died because Open MPI's mpirun could not find its default launch agent (plm_rsh_agent: ssh : rsh) inside the DOCA‑3.1/GPUNetIO Ubuntu 24.04 container — the image has no ssh/rsh binary. Fix by installing openssh-client in the container image or forcing the local launcher (-mca plm isolated) in the CI MPIRUN command.

Full analysis

Summary: mpirun -np 2 ... ucx_perftest aborted immediately in run_ucx_perftest 1, with ORTE FORCE-TERMINATE AT Not found:-13 - error plm_rsh_component.c(335), making the Bash step exit 243 and failing the "Build for tests" stage.

Root cause: Environment/container issue, not a code regression. The build and make install / make installcheck all succeeded (examples compiled and linked cleanly at 19:56:47.37). The very next command, $MPIRUN -np 2 -x UCX_NET_DEVICES=all -x UCX_TLS=shm .../ucx_perftest ..., failed 0.04 s after launch with:

The value of the MCA parameter "plm_rsh_agent" was set to a path that could not be found:
  plm_rsh_agent: ssh : rsh
[swx-rdmz-ucx-gpu-01:39118] [[INVALID],INVALID] FORCE-TERMINATE AT Not found:-13 - error plm_rsh_component.c(335)

which mpirun resolved fine (HPC‑X 2.24 under /hpc/local/benchmarks/custom_by_michael/...), so MPI itself is installed. What is missing is a remote-launch agent: Open MPI's rsh/ssh PLM component resolves the default plm_rsh_agent value "ssh : rsh" at startup and aborts when neither executable exists in PATH. The container used for this job ([REDACTED:Base64 High Entropy String]...) evidently ships without openssh-client. Note the failure is reproducible-by-construction: the MPI run is single-node (-np 2 on localhost) and does not actually need ssh, but the rsh PLM is still selected and errors out before falling back to local launch.

There is no hang: timestamps are continuous and the whole mpirun attempt takes under 50 ms. Nothing from the PR's UCX code (ucp_ft_tf_bugfixes, commit 18eb283) ever executed, so the failure is unrelated to the PR content.

Implicated commit: unknown — no UCX source commit is implicated; this is the CI container image / agent environment (the recently introduced DOCA 3.1.0 GPUNetIO Ubuntu 24.04 builder image). Closest related CI work: 9af60a87 (Alexey Rivkin, "CI: Add Fedora 44, Ubuntu 26.10, …") and [REDACTED:Hex High Entropy String] (william-gallagher-nv, "CI/FT: Adds fault tolerance CI test").

File: contrib/test_jenkins.sh:668 (and :672) — the $MPIRUN -np 2 ... / $MPIRUN -np 1 ... invocations in run_ucx_perftest(); the MPIRUN/MPIRUN_COMMON variables are assigned in the pipeline's "Build for tests" step script.

Suggested fix: Two complementary options, preferably both:

  1. Infra (primary): add openssh-client to the DOCA 3.1 GPUNetIO Ubuntu 24.04 builder image so ssh exists in PATH, matching the other CI images where this job passes.
  2. Hardening (robust regardless of image): since these runs are always single-node, make the MPI launcher independent of ssh by adding -mca plm isolated (or exporting OMPI_MCA_plm=isolated) to MPIRUN_COMMON/MPIRUN in the "Build for tests" step, e.g.
    MPIRUN_COMMON="mpirun --allow-run-as-root --bind-to none -mca plm isolated \
                   -x UCX_ERROR_SIGNALS -x UCX_HANDLE_ERRORS"
    
    Alternatively guard the MPI path in run_ucx_perftest() with a command -v ssh >/dev/null || log_warning "ssh missing, skipping MPI perftest" so a missing launch agent degrades to a skip instead of a hard red build.

Re-run the PR once the image is fixed; no change to the PR's branch is needed.

Related: PR #12129 (this build); no existing issue found matching plm_rsh_agent / missing-ssh in the ucx tracker.

🛡️ This comment had 2 potential secret(s) redacted (Base64 High Entropy String, Hex High Entropy String). See request_id b4b646e5-dc46-4079-b5a1-a51ae6263cae in the triage console for the audit trail.

The keepalive test zeros cq_available before invalidate. That post needs
one credit for the signaled NOP, so lend the credit for the injection
and restore the drained count.
Return UCS_ERR_NO_RESOURCE when the send queue or CQ has no credit, and leave the QP unchanged. Post the flush NOP only after the QP is in ERR.
An empty transmit window has no packets, so purge returns before the RX-token check. The opcode scan only relaxed an error-handler assert.
rc_mlx5 invalidate posts a signaled NOP and returns no resources when the send queue or CQ is full. Stop filling one credit short so the peer-failure test can invalidate.
@svc-nvidia-pr-review

Copy link
Copy Markdown

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

Comment thread src/uct/ib/mlx5/rc/rc_mlx5_ep.c Outdated
* usable. */
uct_rc_mlx5_ep_save_ft_ci(ep);
}
ucs_assertv_always(ep->err_handler_inprogress,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blocker: ucp_ep_tf_purge_live_ep() (via ucp_ep_tf_retire_unaware_lanes() on the LANES_ADDR_REPLY path) still purges a lane whose error handler was never invoked, so this assert aborts in release as well. The PR reverts "outstanding purge before the error handler" in UCT, but UCP still has a caller that purges a lane with a live QP: ucp_ep_tf_retire_unaware_lanes() selects lanes with state == INVALIDATED, tf->uct_ep == NULL and a live ucp_ep_get_lane() and calls ucp_ep_tf_purge_live_ep() -> uct_ep_outstanding_purge(), so err_handler_inprogress == 0 and ucs_assertv_always aborts. The new request path was converted to ucp_ep_tf_invalidate_transport(), but the reply path was not. Should that path also go through uct_ep_invalidate(), or does the check need to stay a returned error?

Comment thread src/uct/ib/mlx5/rc/rc_mlx5_ep.c Outdated

return uct_ib_mlx5_modify_qp_state(&iface->super.super, &ep->tx.wq.super,
IBV_QPS_ERR);
ucs_assertv(uct_rc_iface_have_tx_cqe_avail(&iface->super),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CQ credit for the invalidate NOP is only asserted: pls check uct_rc_iface_have_tx_cqe_avail() and skip the NOP (or return an error) instead of asserting; ucs_assertv is compiled out in release, so without a CQ credit we post a WQE that will produce an error CQE and can overrun the CQ. The new test_rc_keepalive::inject_error() has to bump tx.cq_available to get past it, which shows the condition does occur.

Comment thread src/ucp/core/ucp_ep.c
}

/* A bare id can share a pointer's alignment, so the low bit marks it. */
ep->ext->recovery_arg =

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tagged pointer in the close_req/recovery_arg union slot: why not keep the last accepted peer id in a plain ucp_ep_ext field next to the new tf_request_id? That drops the tag/shift encoding, the (uintptr_t)peer_id << 1 32-bit truncation, and the aliasing with close_req.

Comment thread src/ucp/core/ucp_ep.c
return UCS_OK;
}

if (!ucp_ep_tf_peer_req_is_newer(ucp_ep_tf_seen_peer_id(ep), request_id)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ucp_ep_tf_accept_peer_req() writes the ext union slot without the failover/CM-lane check that ucp_ep_tf_get() does (UCP_ERR_HANDLING_MODE_FAILOVER / cm_lane == UCP_NULL_LANE); on a CM endpoint the slot is close_req, so ucp_ep_tf_seen_peer_id_set() would read and then write seen_peer_id inside a live ucp_request_t.

Comment thread src/ucp/core/ucp_ep.c
/* A peer request moves the queue pair to error and waits for that
* completion before this lane is failed. Recovery stays idle until
* the completion holds it. */
if ((ucp_ep_recovery_arg(ep) == NULL) ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor: convoluted assertion (if (A || B) assert(A)). Suggested:

Suggested change
if ((ucp_ep_recovery_arg(ep) == NULL) ||
ucs_assert((ucp_ep_recovery_arg(ep) == NULL) ||
(ucp_ep_recovery_arg(ep)->tf_reply != NULL));

Same condition, but easier to read.

Comment thread src/ucp/core/ucp_ep.c
ucp_wireup_ep_is_owner(ucp_ep_get_lane(ucp_ep, lane), uct_ep)) {
return lane;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor: ucp_ep_lookup_lane() open-codes recovery_arg->tf[lane] instead of using the new ucp_ep_tf_is_held(), bypassing the failover/CM checks.

Suggested change
if ((ucp_ep_config(ucp_ep)->key.lanes[lane].lane_types &
UCP_LANE_TYPE_FAILED) &&
ucp_ep_tf_is_held(ucp_ep, lane, uct_ep)) {

Comment thread src/ucp/core/ucp_ep.c

ucp_ep_tf_seen_peer_id_set(ep, request_id);
*accepted = lanes;
return UCS_OK;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor: ucp_ep_tf_accept_peer_req() always returns UCS_OK, so the caller's status != UCS_OK branch is dead code. Maybe return the accepted lane map directly?

Comment thread src/uct/api/v2/uct_v2.h Outdated
* @brief Parameters for invalidating a UCT endpoint by @ref uct_ep_invalidate.
*/
typedef struct {
typedef struct {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor: stray leading space added before typedef struct {.

Suggested change
typedef struct {
typedef struct {

Comment thread src/ucp/core/ucp_worker.c
(ucp_ep_tf_hold(ucp_ep, lane, uct_ep) == UCS_OK)) {
return UCS_INPROGRESS;
if (wireup_ep == NULL) {
ucs_status_t hold_status = ucp_ep_tf_hold(ucp_ep, lane, uct_ep);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor: hold_status is declared mid-block; pls define it at the top of the function (docs/CodeStyle.md, "Variable definition").

Comment thread src/ucp/core/ucp_ep.c
* IDLE round re-enters address exchange so rebuild can connect. */
ep->ext->recovery_arg->state = UCP_EP_RECOVERY_STATE_IDLE;
ret = 1;
ucp_ep_recovery_arg(ep)->state = UCP_EP_RECOVERY_STATE_IDLE;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor: repeated ucp_ep_recovery_arg(ep) calls break the assignment alignment rule in docs/CodeStyle.md; pls take a local arg = ucp_ep_recovery_arg(ep) in this function.

@svc-nvidia-pr-review

Copy link
Copy Markdown

Residual coverage gap: finding 1 is a UCP+UCT interaction (asymmetric failure reported by LANES_ADDR_REPLY on a lane that is still live locally); nothing in test_ucp_fault_tolerance or the UCT purge tests exercises it after put_zcopy_before_error was deleted, so CI may stay green while the abort is reachable at runtime.

@svc-ucx

svc-ucx commented Oct 23, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX PR (Tests gpu prebuild) · commit 84f995a6

TL;DR: The gpu prebuild job died (exit 250) in the MPI stage at test_ucp_rkey_destroy, where ucp_rkey_ptr() returned UCS_ERR_UNREACHABLE because the two ranks land on two GPUs that have no CUDA IPC/P2P peer access on swx-rdmz-ucx-gpu-01; this is an environment/test-robustness issue (not PR #12129), fixed by skipping the test when peer access is unavailable (or pinning both ranks to one GPU) — PR #12146 already proposes not running it.

Full analysis

Summary: mpirun -np 2 ./test/mpi/test_ucp_rkey_destroy aborted with ucp_rkey_ptr(rkey.rkey, rkey.remote_address, &ptr) failed: -6 (Destination is unreachable), exit code 250, failing the "Build for tests" step.

Root cause: The whole MPI/CUDA section of this run shows the test node's GPUs cannot do CUDA IPC between each other:

  • cuda_ipc_cache.c:292 cuIpcOpenMemHandle() failed: peer access is not supported between these two devices
  • cuda_ipc_cache.c:345 cuMemSetAccess(...) failed: invalid device ordinal

and the preceding test_mpi_cuda cross-GPU case (TEST[5]: Memory is allocated with the primary context of one GPU, communication is done with ... another GPU) reports FAIL for every ≥4MB transfer for exactly that reason (those FAILs are only printed, the binary still exits 0, so the script continued).

test_ucp_rkey_destroy binds each rank to a different device (cuDeviceGet(&cu_dev, rank % cu_dev_count), test/mpi/test_ucp_rkey_destroy.c:87) and then rank 1 unconditionally calls ucp_rkey_ptr() on rank 0's device memory (line 57). With no peer access, cuda_ipc cannot expose a mapped pointer, so UCP has no rkey-ptr-capable lane and returns UCS_ERR_UNREACHABLE; UCX_CHECK (test/mpi/test_ucx_check_def.h:14) turns that into a hard abort → MPI exit code 250 → ##[error]Bash exited with code '250'. The test has no capability guard (no cuDeviceCanAccessPeer/skip path), so it fails deterministically on any multi-GPU node without P2P. Nothing in the failure path touches the fault-tolerance/perftest code this PR (ucp_ft_tf_bugfixes) changes.

Implicated commit: 2f18f39 — Raul Akhmetshin, "UCT/CUDA/CUDA_IPC: Unmap memhandle mapped at rkey unpack & rkey ptr. (#11288)" — which added both the test and its unconditional invocation in CI.

File: test/mpi/test_ucp_rkey_destroy.c:57 (and the launcher at contrib/test_jenkins.sh:1007-1018)

Suggested fix: Make the test topology-aware instead of asserting success:

  1. Short term: land PR AZP/TESTS: Do not run test_rma_cuda and test_ucp_rkey_destroy #12146 (stop running test_rma_cuda / test_ucp_rkey_destroy in AZP), or guard the invocation in contrib/test_jenkins.sh on peer access being available.
  2. Better: in main(), after cuDeviceGet, call cuDeviceCanAccessPeer() for the two ranks' devices and MPI_Abort-free skip (print SKIP, return EXIT_SUCCESS) when it is 0 — mirroring the SKIP (not supported) behavior test_mpi_cuda already uses; alternatively treat UCS_ERR_UNREACHABLE from ucp_rkey_ptr() as a skip rather than a fatal UCX_CHECK.
  3. Or force both ranks onto the same GPU (e.g. CUDA_VISIBLE_DEVICES / rank % 1) so the rkey-ptr path is exercised without requiring P2P.

Re-running this PR after the test is gated should be green; no code change is needed in #12129.

Related: #12146 (AZP/TESTS: Do not run test_rma_cuda and test_ucp_rkey_destroy), #11288 (commit that introduced the test)

evgeny-leksikov and others added 4 commits October 24, 2026 00:19
Co-authored-by: svc-nvidia-pr-review <svc-nvidia-pr-review@nvidia.com>
The address request rebuilt the lane before the error completion, so
outstanding purge ran after the error handler had finished. Hold the
queue pair from that completion, then rebuild and reply.
The two-lane case recovered. Three lanes is the case that still leaves
a failed lane behind.
The reply omitted a lane while its aux probe was still running, so the
peer never learned the new queue pair. Include a wireup that already
holds next, and leave that lane off the data path.
A new failure was sending every lane that was still failed, so an older
request invalidated a queue pair a newer exchange had already replaced.
The three-lane limit was only for the missing-address case. The original
order is 4, 0, 2, 1, 3, then 5, with lane 5 left healthy.
A delayed LANES_ADDR request must not invalidate a replacement queue pair, and a newer request restarts a reply that is still waiting for an error that will not arrive. Purge succeeds when every posted WQE is a NOP, because that NOP sometimes completes without an error CQE.
The pinned injection order was only needed to reproduce one failure. The token PUT case now passes with the same random lane order as the other operations.
A reply derives the receive position even after the local exchange was
released. An ACK hole for a lane that is still held means the peer queue
pair is gone, so outstanding sends are purged as undelivered and the hold
is released. PUT injection replays lanes 4, 0, 2, 1, 3, 5.
recovery_arg shares storage with the close request. A sockaddr endpoint
does not support failover, so that pointer is the close request and
reading it as recovery state walks off the allocation.
The endpoint and wireup each had the same newer-id test. Wireup now
calls ucp_ep_tf_peer_req_is_newer.
Log the operation when a repost request is restarted or submitted. Paths
that return before a request exists stay silent.
The per-lane seen-id array is larger than the check needs: one send
sequence covers every lane in a request. Keep that counter in the
padding after cm_idx so a later recovery does not restart at 1, and
stash the last accepted peer id in the recovery slot when the object
is freed.
They are not on the fast path. Export only the recovery and close
lookups; the peer-id packing stays local to ucp_ep.c.
The slot shares storage with the close request. A CM endpoint does
not support failover, so reading that pointer as recovery state walks
off the allocation.
The shared slot is a close request while a CM lane exists, and failover
state otherwise. A peer-id read is valid only when that lane is absent.
@svc-nvidia-pr-review

Copy link
Copy Markdown

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

Comment thread src/ucp/core/ucp_worker.c
}

ucp_ep_set_lanes_failed(ucp_ep, UCS_BIT(lane), status);
ucp_wireup_tf_lane_errored(ucp_ep, lane);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blocker: ucp_ep may already be freed here - ucp_ep_set_lanes_failed() can reach ucp_ep_set_failed(), which completes the close request (ucp_ep_local_disconnect_progress()) or calls ucp_ep_disconnected() and destroys the ep. That is why the old code returned immediately after it. The call only clears a waiting bit and schedules a oneshot, so pls do it before:

Suggested change
ucp_wireup_tf_lane_errored(ucp_ep, lane);
ucp_wireup_tf_lane_errored(ucp_ep, lane);
}
ucp_ep_set_lanes_failed(ucp_ep, UCS_BIT(lane), status);
return UCS_OK;

(the suggestion block needs to be anchored on lines 493–500 when posting; the point is to move ucp_wireup_tf_lane_errored() ahead of ucp_ep_set_lanes_failed())

Comment thread src/ucp/core/ucp_ep.c
return UCS_OK;
}

if (!ucp_ep_tf_peer_req_is_newer(ucp_ep_tf_seen_peer_id(ep), request_id)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ucp_ep_tf_accept_peer_req: this is driven straight from the LANES_ADDR_REQUEST handler, and ucp_ep_tf_seen_peer_id_set read/write ep->ext->recovery_arg unconditionally. On a CM ep that slot is close_req, so a stray request would overwrite a live close request - only the ucs_assert() catches it in debug. pls bail out here for a CM/non-failover ep, like ucp_ep_tf_get() does.

Comment thread src/ucp/core/ucp_ep.c
if (tf->purged) {
ucs_diag("ep %p: lane %d already purged uct_ep %p", ep, lane,
tf->uct_ep);
} else if (tf->rx_token == NULL) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ucp_ep_tf_lanes_purge_outstanding, new rx_token == NULL branch: purging without UCT_EP_OUTSTANDING_FIELD_RX_TOKEN reports every outstanding op as undelivered, and ucp_ep_tf_outstanding_purge_cb() reposts them. If the peer QP is gone but some of those sends were already received and consumed (AM, atomics), the repost duplicates them. why is replay safe here instead of failing the lane/ep?

UCT_RC_MLX5_BASE_EP_DECL(tl_ep, iface, ep);
ucs_status_t status;

UCT_RC_CHECK_TX_CQ_RES(&iface->super, &ep->super);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

uct_ep_invalidate() can now return UCS_ERR_NO_RESOURCE (and posts a NOP), which is a user-visible contract change - the test had to reserve a credit for it. pls document it in the uct_ep_invalidate() doc in uct_v2.h; existing callers treat it as always succeeding.

Comment thread src/ucp/core/ucp_ep.c
/* A peer request moves the queue pair to error and waits for that
* completion before this lane is failed. Recovery stays idle until
* the completion holds it. */
if ((ucp_ep_recovery_arg(ep) == NULL) ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this reads as "assert(arg == NULL) unless a reply is parked"; pls write it directly:

Suggested change
if ((ucp_ep_recovery_arg(ep) == NULL) ||
ucs_assert((ucp_ep_recovery_arg(ep) == NULL) ||
(ucp_ep_recovery_arg(ep)->tf_reply != NULL));

Comment thread src/ucp/core/ucp_ep.c
}

if (ep->ext->recovery_arg == NULL) {
if (ucp_ep_recovery_arg(ep) == NULL) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

pls keep arg = ucp_ep_recovery_arg(ep) in a local var as before - this function now calls it ~15 times, and each call does a cm-lane check plus a tag test on a keepalive/progress path.

@svc-nvidia-pr-review

Copy link
Copy Markdown

+1 on the existing thread: PR size/scope - the UCT purge revert, the deferred-reply machinery, the resend/sent_lanes scheduling change, and the ucs_debug→ucs_diag instrumentation are still mixed in one PR.

+1 on the existing thread: ucp_ep_tf_purge_live_ep() still calls uct_ep_outstanding_purge() on a lane whose error handler never ran, while the UCT side that supported that case is removed in this PR (asymmetric-failure path from LANES_ADDR_REPLY).

Residual coverage gap: ucp_wireup_tf_reply_t (defer, arm/disarm, restart-on-newer-request, discard-on-ep-destroy) has no test; all of it is exercised only by chance on real RC hardware.

Residual coverage gap: uct_rc_mlx5_base_ep_invalidate() now has a resource-failure path (UCS_ERR_NO_RESOURCE) with no test, and ucp_ep_tf_invalidate_transport() just drops such lanes from the round.

Residual coverage gap: ucp_ep_tf_lanes_purge_outstanding()'s new "ACK without rx token" branch is untested.

@svc-ucx

svc-ucx commented Oct 27, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX PR (Coverity coverity release on coverity_rh7) · commit 0296db84

TL;DR: The Coverity release job failed with one new defect — NULL_RETURNS at src/ucp/core/ucp_ep.c:2975, where ucp_ep_tf_save_rx() dereferences tf without a NULL check because it relies on the helper ucp_ep_tf_exchange_open() for validation. Add an explicit (tf == NULL) test to the early-return condition at line 2971.

Full analysis

Summary: cov-analyze reported 1 issue (nerrors=1), causing the pipeline step to fail at ##[error]Coverity found 1 issues: /__w/1/s/src/ucp/core/ucp_ep.c:2975 — Dereference null return value (NULL_RETURNS). The build and compilation itself were clean (559 units, 100% emitted).

Root cause: ucp_ep_tf_get() (ucp_ep.c:2668-2677) explicitly returns NULL when the endpoint is not in failover mode, has a CM lane, has no recovery arg, or the lane index is out of range. In ucp_ep_tf_save_rx():

2966:  ucp_ep_lane_tf_t *tf = ucp_ep_tf_get(ep, lane);
...
2971:  if (!ucp_ep_tf_exchange_open(ep, lane) || (token == NULL) || (len == 0)) {
2972:      return;
2973:  }
2975:  expect = from_ack ? tf->peer_id : tf->request_id;   /* <-- deref */

The NULL guard is indirect: ucp_ep_tf_exchange_open() (line 2702) internally calls ucp_ep_tf_get() a second time and checks tf != NULL. Coverity cannot correlate the two independent calls, so it treats the local tf as possibly-NULL at line 2975 and flags the deref. Every other caller of ucp_ep_tf_get() (lines 2693, 2841, 2824, 2897, 3311, 3363) checks tf == NULL explicitly — which is exactly the "checked 15 out of 16 times" supporting evidence Coverity cites. So this is a real code-hygiene outlier, and also a latent correctness risk if the two ucp_ep_tf_get() calls ever diverge.

Implicated commit: Most likely 73d6ccf2 (Evgeny Leksikov, "UCP: Do not treat a CM endpoint slot as recovery state"), which added the ucp_ep_get_cm_lane(ep) != UCP_NULL_LANE NULL-return path in ucp_ep_tf_get() and thereby made the unchecked deref reachable in Coverity's model; the tested head is [REDACTED:Hex High Entropy String] (Evgeny Leksikov).

File: src/ucp/core/ucp_ep.c:2966-2975 (deref at 2975, missing guard at 2971)

Suggested fix: Make the NULL check explicit and local so it is both correct and visible to the analyzer:

    ucp_ep_lane_tf_t *tf = ucp_ep_tf_get(ep, lane);
    ...
    if ((tf == NULL) || !ucp_ep_tf_exchange_open(ep, lane) ||
        (token == NULL) || (len == 0)) {
        return;
    }

This matches the existing convention in ucp_ep_tf_tx_len() (line 2899) and ucp_ep_tf_lane_can_invalidate() (line 2844). As an optional follow-up cleanup, consider refactoring ucp_ep_tf_exchange_open() to take the already-fetched tf pointer (e.g. ucp_ep_tf_exchange_open(const ucp_ep_lane_tf_t *tf)) so the lookup happens exactly once per call site and this class of false positive cannot recur.

Related: PR #12129 (branch ucp_ft_tf_bugfixes); no existing issue found for this defect.

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id b94117be-546a-432c-869a-a102957d8154 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.

UCT_RC_MLX5_BASE_EP_DECL(tl_ep, iface, ep);
ucs_status_t status;

UCT_RC_CHECK_TX_CQ_RES(&iface->super, &ep->super);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

uct_ep_invalidate() can now return UCS_ERR_NO_RESOURCE and leave the QP operational, but uct_v2.h documents it as "invalidates the endpoint and moves it to the error state", and test_uct_peer_failure::inject_error() does ASSERT_UCS_OK() right after the TX window is filled (two_pairs_send, test_uct_peer_failure_multiple) — the new invalidate_credit_left() guard only covers fill_resources(). Can we reserve the credit for the NOP instead of failing, or at least document the new return code and handle it in all callers?

Comment thread src/ucp/core/ucp_ep.c
}

/* A bare id can share a pointer's alignment, so the low bit marks it. */
ep->ext->recovery_arg =

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Instead of tagging the close_req/recovery_arg slot, pls keep seen_peer_id as a plain uint32_t in ucp_ep_ext_t next to the new tf_request_id — it fits in the padding this PR already added (struct stays 224 bytes), drops UCP_EP_SLOT_PEER_ID_BIT / ucp_ep_ext_recovery_is_peer_id(), and removes the case where ucp_ep_tf_seen_peer_id_set() writes into ext->close_req, since ucp_ep_tf_accept_peer_req() has no CM-lane check.

Comment thread src/ucp/core/ucp_ep.c
ucp_worker_h worker = ep->worker;
int ret = 0;
ucp_lane_map_t failed, recovered;
int resend;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pls keep a local arg = ucp_ep_recovery_arg(ep) here, like ucp_ep_recovery_arm() and ucp_ep_recovery_on_reply_received() do; this function now calls ucp_ep_recovery_arg(ep) about 30 times on the keepalive path and it is much harder to read.

Comment thread src/ucp/core/ucp_ep.c
/* A peer request moves the queue pair to error and waits for that
* completion before this lane is failed. Recovery stays idle until
* the completion holds it. */
if ((ucp_ep_recovery_arg(ep) == NULL) ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion:

        ucs_assert((ucp_ep_recovery_arg(ep) == NULL) ||
                   (ucp_ep_recovery_arg(ep)->tf_reply != NULL));

The if only guards an assertion of its own negation, which is hard to read.

Comment thread src/ucp/core/ucp_worker.c
(ucp_ep_tf_hold(ucp_ep, lane, uct_ep) == UCS_OK)) {
return UCS_INPROGRESS;
if (wireup_ep == NULL) {
ucs_status_t hold_status = ucp_ep_tf_hold(ucp_ep, lane, uct_ep);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pls define hold_status at the top of the function with wireup_ep (docs/CodeStyle.md, variable definition).

Comment thread src/ucp/core/ucp_ep.c
}

ucs_status_t
ucp_ep_tf_accept_peer_req(ucp_ep_h ep, ucp_lane_map_t lanes,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ucp_ep_tf_accept_peer_req always returns UCS_OK, so the ucs_error() branch in ucp_wireup_process_lanes_addr_request() is dead code; can it just return the accepted lane map?

@svc-nvidia-pr-review

Copy link
Copy Markdown

Notes on already-reported issues: the UCT purge/uct_ep_invalidate resource-failure handling in ucp_ep_tf_invalidate_transport() (lanes dropped from the round) and ucp_ep_tf_purge_live_ep() purging without an error handler are already open threads — I would add a +1 there rather than new comments. Same for the PR size/scope split and the ucs_debug→ucs_diag instrumentation.

Residual coverage gap: no test covers uct_rc_mlx5_base_ep_invalidate() returning UCS_ERR_NO_RESOURCE, and the existing inject_error() callers that are not protected by invalidate_credit_left() may become flaky.

Residual coverage gap: nothing covers a second failure episode on the same endpoint, which is the only consumer of the persisted tf_request_id / seen_peer_id state.

@evgeny-leksikov

Copy link
Copy Markdown
Contributor Author

replaced with #12195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP-DNM Work in progress / Do not review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants