Repository navigation
Conversation
Token failover holds a failed lane until the peer returns its token. It
reposts the operations outstanding on the lane, and moves the requests
from the pending queue of the lane to the recovery queue. The recovery
queue is replayed only when the recovery of the endpoint ends, so a
request which waits there does not complete while the failed lane is
down, even though the live lanes could send it.
Add test_ucp_ft_tf_hold.parked_put_lane_down: a put waits in the pending
queue of a lane which fails, and whose probes keep failing. The put must
complete, and its data must arrive, while the lane is down. It fails
now.
Add test_ucp_ft_tf_hold.parked_{get_bcopy,get_zcopy,put_zcopy}: a
request of several fragments posts some of them on a lane which fails,
and then waits in its pending queue. The token purge reposts these
fragments, and the replay restarts the request. The request must
complete once, after all of its data arrived, and no fragment may
complete or write after it. The 2_rails variants send the request on two
lanes, and keep a fragment on the live lane in flight until after the
purge: the request must not complete before the test completes that
fragment. These tests pass now, since the reposts and the fragment
complete before the recovery ends.
The fixture finds the lanes of an RMA operation which token failover can
hold, and parks a request in the recovery queue.
Token failover moves the requests from the pending queue of a held lane to the recovery queue, and replayed the queue only when the recovery of the endpoint ended: when the failed lanes recovered, or when the retries ran out. With the default UCX_RECOVERY_RETRIES=inf, a lane which does not recover kept them forever, so a request issued before the failure stalled although the live lanes could send it. A closed endpoint canceled the queue when the recovery ended, although its requests were issued before the close. Replay the recovery queue as soon as no held lane has outstanding operations left to purge, so the requests follow the operations which the token purge reposted on the live lanes. The purge from a progress callback replays the queue at once. The purge of a LANES_ADDR message replays it from a progress callback, since the wireup message handler can run on the async thread. A closed endpoint replays the queue too, and a failed endpoint still cancels it. The replay restarts a request: its reset rewinds it, and sets the count of its completion to 1. A request of several fragments counts its operations in flight in that count, plus one reference until it sends all of its data. It can wait in the recovery queue while operations it posted did not complete: in flight on a live lane, or reposted by the purge. A restart would let their completions complete the restarted request before its data arrived. Such a request drops its reference with an error instead: when its last operation completes, the error restarts it, as after a failed operation. It restarts after the requests queued behind it. test_ucp_ft_tf_hold.parked_put_lane_down passes now, and the other parked tests still pass.
|
🤖 Starting review — findings will be posted here when done. |
| ucs_queue_head_init(&replay_q); | ||
| ucs_queue_for_each_extract(self, &arg->tf_pending_q, priv, 1) { | ||
| req = ucs_container_of(self, ucp_request_t, send.uct); | ||
| if (ucp_ep_tf_req_in_flight(req)) { |
There was a problem hiding this comment.
Can we keep subsequent flushes blocked until these deferred sends have restarted? Removing a partially sent request from the pending queue leaves its remaining data unposted until the last outstanding completion triggers a restart; a following flush can cover only the old fragments and complete before the restarted transfer finishes, breaking flush and graceful-close guarantees.
|
🤖 CI Triage Agent — TL;DR: The Coverity stage failed because Full analysisSummary: Root cause: From the stage log: the build and analysis completed ("The cov-build utility completed successfully", "Defect occurrences found : 1869 Total … 1 MISSING_MOVE_ASSIGNMENT"), then:
Implicated commit: 5905e19 — "GTEST/UCP/FT: Test requests which wait in the recovery queue", Dmitrii, 2026-11-23 (PR #12449, branch File: test/gtest/ucp/test_ucp_fault_tolerance.cc:1667 ( Suggested fix: Preferred — add a real move assignment (and move constructor) to handle(handle&& other) noexcept : m_initialized(false), m_value(NULL),
m_dtor(NULL), m_dtor_with_arg(NULL),
m_dtor_arg(NULL) {
*this = std::move(other);
}
handle& operator=(handle&& other) noexcept {
reset();
if (other.m_initialized) {
m_value = other.m_value;
m_dtor = other.m_dtor;
m_dtor_with_arg = other.m_dtor_with_arg;
m_dtor_arg = other.m_dtor_arg;
m_initialized = true;
other.revoke();
}
return *this;
}Minimal alternative in the test: avoid assigning the temporary, e.g. Related: PR #12449 (this change); prior Coverity-driven test cleanups: #12209 "Coverity: Uninitialized variable fixes for Coverity 2026.3.0 Upgrade" |
|
🤖 CI Triage Agent — TL;DR: The Coverity Full analysisSummary: Root cause: From the log:
m_rkey = m_rbuf->rkey(sender()); // rkey() returns ucs::handle<ucp_rkey_h> by valueCoverity flags that rvalue copy-assignment, the job script computes Implicated commit: File: Suggested fix: Preferred — give handle(handle&& other) : m_initialized(false), m_value(NULL), m_dtor(NULL),
m_dtor_with_arg(NULL), m_dtor_arg(NULL) {
*this = std::move(other);
}
handle& operator=(handle&& other) {
reset();
if (other.m_initialized) {
if (other.m_dtor) {
reset(other.m_value, other.m_dtor);
} else {
reset(other.m_value, other.m_dtor_with_arg, other.m_dtor_arg);
}
other.m_initialized = false;
}
return *this;
}Minimal alternative (keeps the header untouched): avoid assigning from a temporary in the new test, e.g. ucs::handle<ucp_rkey_h> rkey = m_rbuf->rkey(sender()); // direct-init, no assignment
m_rkey = rkey;or construct the rkey directly into Related: PR #12449 (this change); prior Coverity-cleanup precedent: |
What?
With token failover, send the requests from the pending queue of a held lane as
soon as the lane is purged, instead of when the recovery of the endpoint ends.
Depends on #12448
Why?
Token failover moved these requests to a recovery queue, and replayed it only
when the failed lanes recovered or the retries ran out. With the default
UCX_RECOVERY_RETRIES=inf, they waited as long as the NIC was down, althoughthe live lanes could send them. With NIXL on systems with two NICs per GPU,
transfers stalled while one NIC was down. A closed endpoint canceled them.
test_ucp_ft_tf_hold.parked_put_lane_down without the fix
NIXL e2e without the fix: vLLM 1P1D, one of the two NICs down for 120 s
The requests which started around the drop got their first token only after
the NIC came back.
How?
ucp_ep_tf_resume()replays the queue once no held lane is left unpurged:right after the purge, or from a progress callback when the purge comes from
the wireup message handler, which can run on the async thread. A failed
endpoint cancels the queue; a closed one now replays it.
flight, and a restart would reset its completion count under them. It drops
its sending reference with an error instead, so its last completion restarts
it, as after a failed operation.
UCX_MAX_EAGER_LANES> 1, the receiver can drop a restartedAM message of several fragments by its PSN check, if a later message arrived
first. Messages sent during the hold can already overtake the queue this way.
Left for a separate change.
test_ucp_ft_tf_hold, a put parked on a lane which stays down, andparked requests of several fragments.