Repository navigation
Conversation
A send posted before the wireup of its endpoint completes waits in the pending queue of a wireup endpoint. When the lanes are connected, ucp_wireup_eps_progress() replays the pending requests with UCP_EP_FLAG_BLOCK_FLUSH set, and a send which completes when it is posted, such as a small eager tag or AM message, calls its callback from the replay. A flush or a graceful close issued from that callback trips the assertion on UCP_EP_FLAG_BLOCK_FLUSH in ucp_ep_flush_progress(), in any error handling mode, not only with token failover. Add test_ucp_wireup_1sided.flush_from_replayed_send_cb: an eager tag send waits for the wireup, its callback flushes the endpoint, and the flush must complete with UCS_OK. On transports whose lanes wait for the wireup, such as rc and ud, it aborts in assertion builds. It is skipped when the send completes at once.
The wireup replays the pending requests of an endpoint with UCP_EP_FLAG_BLOCK_FLUSH set: when the lanes are connected, and in token failover mode from the recovery queue. The replay merges several pending queues, so a flush must not start until it ends. A request which completes when it is posted, such as an AM sent short after the wireup, calls its send callback from the replay. A flush or a graceful close issued there started at once: assertion builds aborted on the flag in ucp_ep_flush_progress(), and other builds started the flush before the requests left in the replay queue, which were issued before it. Start such a flush from the progress queue, as the replay does with a flush request which it finds in the queue. By then each replayed request is sent or waits in a pending queue of a lane, so the flush completes after them. The replay order of the sends does not change. test_ucp_wireup_1sided.flush_from_replayed_send_cb passes now.
|
🤖 Starting review — findings will be posted here when done. |
| ucp_request_set_send_callback_param(param, req, send); | ||
|
|
||
| if (ucs_unlikely(ep->flags & UCP_EP_FLAG_BLOCK_FLUSH)) { | ||
| /* The send callback of a request which the wireup replays issued the |
There was a problem hiding this comment.
minor: the first sentence is hard to parse
| /* The send callback of a request which the wireup replays issued the | |
| /* A request which the replay completed inline issued this flush from | |
| * its send callback. The requests which the replay did not send yet | |
| * were issued before the flush, so start it after the replay. */ |
|
Coverage gap worth noting but not comment-worthy: the test asserts only that the flush completes; it does not verify the ordering guarantee (flush completing after the not-yet-replayed requests were sent). That ordering still relies on the UCT rule that |
|
🤖 CI Triage Agent — TL;DR: Full analysisSummary: gtest job "roce on worker 1" failed with 1 of 9318 tests failing: Root cause: The only failing test is the dedicated regression test for "idle recovery wireup endpoint blocked worker flush" ( A per-EP flush taken from the worker-flush state machine ( Implicated commit: [REDACTED:Hex High Entropy String] — "UCP/FLUSH: Defer a flush issued during the replay of pending requests" (Dmitrii), PR #12411 File: src/ucp/rma/flush.c:659-667 (deferral), with resumption at src/ucp/rma/flush.c:353-363 and 399-427; test at test/gtest/ucp/test_ucp_fault_tolerance.cc:1245-1274 Suggested fix: Narrow the deferral so it cannot stall unrelated flushes and cannot wait forever:
Related: PR #12411 (this change); PR #11988 "UCP/WIREUP: fix worker flush hang from recovery wireup ep" (the bug this test protects against); PR #12274 "Clear a recovered lane only after its probe succeeds"
|
A flush which a send callback issues during the replay of pending requests starts from a progress callback after the replay. Signal the worker when the callback is added, as the failover restart of a flush does, so an application which arms the worker and waits for events after this progress call still runs the flush. Also reword the comment of the deferral, and format the test as the code style check suggests.
|
🤖 Starting review — findings will be posted here when done. |
The wireup replays pending requests with UCP_EP_FLAG_BLOCK_FLUSH set, and a send callback of a replayed request can issue a flush there. test_ucp_wireup_1sided.flush_from_replayed_send_cb covers it only where the send waits for the wireup and completes inline in the replay, and it passes as well when the callback runs outside the replay. Add test_ucp_flush.blocked_flush_starts_after_replay, which sets the flag directly: a flush issued then must not start while the flag is set, and must complete after it is cleared. Without the deferral it aborts on the assertion in ucp_ep_flush_progress().
|
🤖 Starting review — findings will be posted here when done. |
|
In
|
|
🤖 CI Triage Agent — TL;DR: The gtest run failed with exactly one test — Full analysisSummary: Root cause: The failing variant is the single
Note the follow-up commit Implicated commit: File: Suggested fix:
Related: PR #12411 (this change); earlier flush/failover work in the same area: #11923 ( |
|
/azp run |
|
Azure Pipelines: Successfully started running 4 pipeline(s). |
|
🤖 CI Triage Agent — TL;DR: The ASAN gtest job failed on LeakSanitizer, not on an assertion: 68 KB in 17 allocations leaked, all rooted in the setup of Full analysisSummary: Root cause: All leaked allocations belong to the UCP entity created by that one test case:
i.e. one The new code is Implicated commit: 3576459 "UCP/FLUSH: Defer a flush issued during the replay of pending requests" (Dmitrii), with follow-up 77bfc43 "UCP/FLUSH: Wake the worker for a flush deferred by the replay" (both on this PR branch; HEAD 80fa627) File: src/ucp/rma/flush.c:659-668 (deferred-flush path), interacting with src/ucp/rma/flush.c:131 / :353-363 (resume callback) and test/gtest/ucp/test_ucp_proto_mock.cc:5116 (failing test) Suggested fix:
Related: PR #12411 (this change); possibly relevant neighbours: #12404 (SGL replay handles), #12360 "Close endpoints by force on worker destroy", #12274 (lane recovery/probe) |
|
Re the triage of Re the LeakSanitizer triage of the rerun: also not this PR. All tests passed; the leak is from |
What?
Start a flush or a graceful close issued from a send callback during the
replay of pending requests from the progress queue, after the replay ends.
Why?
The wireup replays the pending requests of an endpoint with
UCP_EP_FLAG_BLOCK_FLUSHset. A send which completes when it is posted (forexample a small eager tag or AM message) calls its callback from the replay. A
flush or close issued there started at once:
UCP_EP_FLAG_BLOCK_FLUSHinucp_ep_flush_progress();replay, which were issued before it, so the flush can complete before them.
How?
ucp_ep_flush_lanes_internal()schedules the flush on the progress queue whenthe flag is set. By then every replayed request is sent or waits in a pending
queue of a lane, so the flush completes after them.
New test:
test_ucp_wireup_1sided.flush_from_replayed_send_cb.