Repository navigation
UCP/WIREUP: fix worker flush hang from recovery wireup ep - #11988
Conversation
|
🤖 Starting review — findings will be posted here when done. |
|
Residual coverage gap: the new test only runs on RC/IB with the pure-AM variant ( |
|
🤖 CI Triage Agent — TL;DR: The wire-compat test aborted (exit 134) because the PR's new Full analysisSummary: Root cause: Commit [REDACTED:Hex High Entropy String] ("UCP/WIREUP: fix worker flush hang from recovery wireup ep") introduced Implicated commit: [REDACTED:Hex High Entropy String] — Zhenlong Ma, "UCP/WIREUP: fix worker flush hang from recovery wireup ep" File: src/ucp/wireup/wireup_ep.c:633 (flag introduced at src/ucp/wireup/wireup_ep.c:463, defined at src/ucp/wireup/wireup_ep.h:38) Suggested fix: Exclude the new flag from the assertion, e.g.: wireup_ep->flags &= ~UCP_WIREUP_EP_FLAG_LOCAL_CONNECTED;
ucs_assert((wireup_ep->flags & ~(UCP_WIREUP_EP_FLAG_SEND_CLIENT_ID |
UCP_WIREUP_EP_FLAG_TRACK_FLUSH)) == 0);(cleanest is to define a Related: PR #11988 (this PR); prior work on the same file: #11563, #11562
|
850d6ea to
52fa4c8
Compare
|
🤖 Starting review — findings will be posted here when done. |
|
minor: trailing whitespace at end of line. |
52fa4c8 to
d2cf095
Compare
|
🤖 Starting review — findings will be posted here when done. |
| return status; | ||
| } | ||
|
|
||
| /* |
There was a problem hiding this comment.
The proxy can also hold pending wireup messages (pending_count), which are not counted in flush_ops_count, and ucp_wireup_eps_progress() keeps the proxy alive until they drain. Can worker flush now complete while a LANES_ADDR/ACK is still queued on this lane?
|
|
||
| m_held_probe_comp = NULL; | ||
|
|
||
| ucs::mock mock; |
There was a problem hiding this comment.
Maybe move the mock setup + failure injection + wait-for-probe-in-flight sequence into a helper shared with teardown_with_outstanding_probe? The first ~15 lines of both tests are identical.
|
Residual coverage gap (already reported on an earlier revision): the new test only runs on the pure-AM IB variant via |
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 CI Triage Agent — TL;DR: The aarch64 build failed compiling Full analysisSummary: Root cause: Not an environment or aarch64-specific issue — plain source corruption. In Lines 997–998 are the tail of the old call that was not deleted. After the Implicated commit: File: Suggested fix: Delete the two orphaned lines so the block reads: ASSERT_TRUE(wait_for_recovery_probe_in_flight(ep, ucs::get_deadline(5.0)))
<< "could not catch an aux recovery probe in flight";
void *flush_req = sender().flush_worker_nb(0);Also worth a quick consistency pass: the sibling assertion at lines 962–964 still uses the raw Related: PR #11988 (branch |
7c78361 to
77805b5
Compare
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 CI Triage Agent — TL;DR: This isn't a code/product bug — the "commit title" codestyle job failed because PR #11988 contains a commit titled Full analysisSummary: Azure Pipelines job "Codestyle → commit title" (build 137460) exited with code 1 after Root cause: The check in
The offending title is the auto-generated message GitHub creates when a file is edited through the web UI. No infrastructure problem, no timeout, no hang — the step ran in under a second (12:42:53.55 → 12:42:53.59). Implicated commit: The PR commit titled File: Suggested fix: Rewrite the bad commit title to follow the convention, e.g.: Or simply squash it into the Related: Guidance referenced by the job: https://github.com/openucx/ucx/wiki/Guidance-for-contributors#general-guidelines — PR: #11988
|
|
|
||
| if (self->flags & UCP_WIREUP_EP_FLAG_TRACK_FLUSH) { | ||
| UCS_ASYNC_BLOCK(&worker->async); | ||
| ucp_worker_flush_ops_count_add(worker, -1); |
There was a problem hiding this comment.
minor: can we call the new helper here instead of duplicating the count update?
| ucp_worker_flush_ops_count_add(worker, -1); | |
| if (self->flags & UCP_WIREUP_EP_FLAG_TRACK_FLUSH) { | |
| ucp_wireup_ep_untrack_flush(&self->super.super); | |
| } | |
| } |
The local worker variable then becomes unused and can be dropped.
|
Residual coverage gap (already reported on earlier revisions): the new test only runs on the pure-AM IB variant via |
Signed-off-by: Zhenlong Ma <zhenlongm@nvidia.com>
77805b5 to
cfc1236
Compare
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 Review complete — no issues found. |
|
🤖 CI Triage Agent — TL;DR: The only failing test is the new/racy |
| * The failed transport EP and requests queued on the proxy are accounted | ||
| * separately, so the idle proxy itself must not block worker flush. | ||
| */ | ||
| ucp_wireup_ep_untrack_flush(wireup_ep_uct); |
There was a problem hiding this comment.
adding boolean parameter to ucp_wireup_ep_create could simplify the code
|
🤖 Starting review — findings will be posted here when done. |
| } | ||
|
|
||
| status = ucp_wireup_ep_create(ep, &wireup_ep_uct); | ||
| /* The stub wireup endpoint which is vailing for recovery should not block |
There was a problem hiding this comment.
minor: typo in the new comment, vailing -> waiting.
| /* The stub wireup endpoint which is vailing for recovery should not block | |
| /* The stub wireup endpoint which is waiting for recovery should not block | |
| * worker flush. */ |
| wireup_ep->flags &= ~UCP_WIREUP_EP_FLAG_LOCAL_CONNECTED; | ||
| ucs_assert((wireup_ep->flags & ~UCP_WIREUP_EP_FLAG_SEND_CLIENT_ID) == 0); | ||
| ucs_assert((wireup_ep->flags & ~(UCP_WIREUP_EP_FLAG_SEND_CLIENT_ID | | ||
| UCP_WIREUP_EP_FLAG_BLOCK_WORKER_FLUSH)) == 0); |
There was a problem hiding this comment.
minor: the second line of the updated assert is 83 columns, exceeding the 80-column limit from docs/CodeStyle.md ("Up to 80 columns").
| UCP_WIREUP_EP_FLAG_BLOCK_WORKER_FLUSH)) == 0); | |
| ucs_assert((wireup_ep->flags & | |
| ~(UCP_WIREUP_EP_FLAG_SEND_CLIENT_ID | | |
| UCP_WIREUP_EP_FLAG_BLOCK_WORKER_FLUSH)) == 0); |
What?
Fix a hang in
ucp_worker_flush()that occurs while a UCP endpoint lane is undergoing recovery.Why?
Applications calling
ucp_worker_flush()while a lane is mid-recovery would stall indefinitely, even though the recovery itself was progressing normally and no actual outstanding operation was blocking it.How?
UCP_WIREUP_EP_FLAG_TRACK_FLUSHsegment in wireup ep, set by default atucp_wireup_ep_tconstruction to preserve the behavior for the normal wireup path).ucp_wireup_ep_untrack_flush()inwireup_ep.cto clear the flag for recovery wireup ep.test_ucp_fault_tolerance.worker_flush_during_recovery.