Repository navigation
UCT/IB/RC: Remove an endpoint from ep_list in uct_rc_ep_t cleanup - #12059
Conversation
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 CI Triage Agent — TL;DR: The Coverity Full analysisSummary: Coverity static analysis job Root cause: The build and All 5 reports share the same path: step 6 is uct_ep_params_t ep_params = {}; // line 209 — zero-inits ALL fields
ep_params.field_mask = UCT_EP_PARAM_FIELD_IFACE;
ep_params.iface = new_iface.get();
status = uct_ep_create(&ep_params, &ep); // line 215The Note the existing convention avoids this exact problem: Implicated commit: File: Suggested fix: Match the existing pattern in uct_ep_params_t ep_params; /* only the fields in field_mask are read */
ep_params.field_mask = UCT_EP_PARAM_FIELD_IFACE;
ep_params.iface = new_iface.get();That eliminates the Longer-term, the real defect is in the model, not the test: Related: PR #12059 (branch
|
8a22d75 to
18b88ed
Compare
|
🤖 Starting review — findings will be posted here when done. |
18b88ed to
3d886f8
Compare
|
🤖 Starting review — findings will be posted here when done. |
tvegas1
left a comment
There was a problem hiding this comment.
confirmed that teh list add is done in rc_ep_t, and now removal done in rc_ep_t. the removal remains in CLEANUP call chain and no added flush call (->ep_list, from outstanding purge) can reach with the slightly later removal.
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 CI Triage Agent — TL;DR: The Full analysisSummary: Azure job 138631 ( Root cause: A hang, not a timeout. Log timestamps show continuous activity up to Both peers wedged symmetrically — characteristic of a progress/flush loop that never completes rather than a data-path error (no UCX error, no assertion, no The PR under test changes exactly the RC endpoint lifecycle in this path. /* src/uct/ib/rc/base/rc_iface.c:309 */
ucs_list_for_each(ep, &iface->ep_list, list) {
status = uct_ep_flush(&ep->super.super, 0, NULL);Two consequences, both of which produce exactly this silent hang:
Implicated commit: File: Suggested fix:
Note: do not raise the job time limit — the 3h17m single gap proves the process was hung, not making progress. Related: PR #12059 (
|
This looks like the same RoCE stall on swx-rain03 that hit #12060 in the same window (rc_mlx5 atomic test hung 18:52–19:07 UTC there; this run went silent at 19:05 UTC). I think it's not specific to the ep_list removal. Also, the same perftest batch with the CI build (release-mt --with-mpi --enable-assertions, UCX_TLS=rc_verbs,rc_x) completes locally, I can not reproduce this locally. I think the CI needs rerun. |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 12059 in repo openucx/ucx |
|
Restarted CI, did you or your organization sign the CLA? |
Thanks. |
|
Can you please fix conflict and push again? |
Head branch was pushed to by a user without write access
e19a08e to
81fd1e4
Compare
|
🤖 Starting review — findings will be posted here when done. |
An endpoint is added to iface->ep_list when uct_rc_ep_t is initialized, but it is removed outside of the uct_rc_ep_t cleanup: by rc_verbs and rc_mlx5 through uct_rc_ep_cleanup_qp(), and by gga_mlx5 on its own. If a transport fails to initialize an endpoint, it is freed while it is still on ep_list, and uct_rc_iface_flush() then calls uct_ep_flush() on freed memory. Remove the endpoint in the uct_rc_ep_t cleanup, which runs both when the endpoint is destroyed and when a transport fails to initialize it. Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Limit the receive buffer pool below the shared receive queue size, then create an endpoint on an interface which did not post its receive work requests yet, so that the creation fails with UCS_ERR_NO_MEMORY. Verify that the interface endpoint list still begins with the same entry, which means the failed endpoint was removed from the list. The check compares the list entry instead of walking the list, so the test does not read freed memory when an endpoint is left on the list. A new interface is opened since an existing one has already posted its receive work requests when receive progress was enabled. Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
|
minor: this can't happen here - Residual coverage gap: Residual coverage gap: |
81fd1e4 to
89c326a
Compare
|
🤖 Starting review — findings will be posted here when done. |
| } | ||
|
|
||
| ASSERT_EQ(UCS_ERR_NO_MEMORY, status); | ||
| EXPECT_EQ(first, rc->ep_list.next); |
There was a problem hiding this comment.
minor: the new iface has no eps, so EXPECT_TRUE(ucs_list_is_empty(&rc->ep_list)) is enough here and first can be dropped (same check as in test_tcp.cc).
|
Out of scope for this PR, but the same ep-init-failure path still leaks in mlx5: Test coverage is |
|
🤖 CI Triage Agent — TL;DR: The ASAN/roce worker‑2 job died because Full analysisSummary: gtest shard 3/4 aborted in Root cause: Log timestamps show the test started at The PR commit under test is not a plausible cause: Implicated commit: none for the hang (PR commit File: test/gtest/ucp/test_ucp_tag_cancel.cc:40‑67 (hanging test) and test/gtest/ucp/test_ucp_tag.cc:149 (unbounded wait loop that converts the stall into a 900 s watchdog kill) Suggested fix:
Related: PR #12059 (branch under test,
|
Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
89c326a to
c769d9f
Compare
|
🤖 Starting review — findings will be posted here when done. |
| * rx.bufs_grow keeps the pool valid regardless of rx.queue_len. */ | ||
| if (uct_config_modify(m_iface_config, "IB_RX_MAX_BUFS", "8") != UCS_OK) { | ||
| UCS_TEST_SKIP_R("cannot limit the receive buffer pool"); | ||
| } |
There was a problem hiding this comment.
| } | |
| ASSERT_UCS_OK(uct_config_modify(m_iface_config, "IB_RX_MAX_BUFS", "8")); |
minor: the test is already restricted to rc_verbs, which always has IB_RX_MAX_BUFS, so this skip is unreachable - same handling as the next line.
| UCS_TEST_SKIP_R("cannot limit the receive buffer pool"); | ||
| } | ||
|
|
||
| ASSERT_UCS_OK(uct_config_modify(m_iface_config, "IB_RX_BUFS_GROW", "8")); |
There was a problem hiding this comment.
minor: the failure also depends on rx.queue_len > 8 (so that srq.quota exceeds the pool size) - can we pin IB_RX_QUEUE_LEN too? Otherwise UCX_RC_RX_QUEUE_LEN<=8 from the environment makes the prepost succeed and ASSERT_EQ(UCS_ERR_NO_MEMORY, status) fail instead of skip.
What?
Remove the endpoint from
iface->ep_listinuct_rc_ep_tcleanup, instead ofdoing it in the places which destroy an endpoint, and add a regression test for
a transport which fails to initialize an endpoint.
Why?
An endpoint is added to
iface->ep_listwhenuct_rc_ep_tis initialized, butit was removed outside of the
uct_rc_ep_tcleanup: by rc_verbs and rc_mlx5through
uct_rc_ep_cleanup_qp(), and by gga_mlx5 on its own. When a transportfails to initialize an endpoint, the endpoint is freed while it is still on
ep_list, anduct_rc_iface_flush()then callsuct_ep_flush()on freedmemory.
How?
Move the removal into
UCS_CLASS_CLEANUP_FUNC(uct_rc_ep_t), which runs bothwhen the endpoint is destroyed and when a transport fails to initialize it -
UCS_CLASS_INITcalls the cleanup chain of the parent classes which wereinitialized, so both cases are covered by one place.
Test: open an rc_verbs interface which did not enable receive progress yet, so
its first receive work requests are posted when its first endpoint is created,
and limit the receive buffer pool below the shared receive queue size
(
IB_RX_MAX_BUFS=8, withIB_RX_BUFS_GROW=8to keep the pool valid) to makethat creation fail. The test then requires
iface->ep_listto still startwith the same entry. The list entry is compared instead of walking the list,
so the test does not read freed memory when an endpoint is left on the list.
The change to gga_mlx5.c only removes its own list removal, which the base
class cleanup now performs. The removal logic is shared by all RC transports,
so no gga-specific test is added.