UCT/BASE: revert log level and token cap - #11851
Conversation
|
🤖 Starting review — findings will be posted here when done. |
| @@ -1048,7 +1048,7 @@ ucs_log_level_t uct_base_iface_failure_log_level(uct_base_iface_t *iface, | |||
| ucs_status_t err_handler_status, | |||
| ucs_status_t status) | |||
| { | |||
There was a problem hiding this comment.
UCS_INPROGRESS is a documented valid return of uct_error_handler_t ("error handling in progress"), but changing the condition from UCS_STATUS_IS_ERR(err_handler_status) to err_handler_status != UCS_OK now treats it as FATAL. This function is shared by cma, srd, rc_verbs, rc_mlx5, and dc_mlx5 failure paths, so a handler returning UCS_INPROGRESS would now cause a FATAL log (process abort) instead of the normal per-transport failure level. Is escalating UCS_INPROGRESS to FATAL intended? If not, keep UCS_STATUS_IS_ERR(err_handler_status).
|
Scope: the log-level change in Coverage: the |
| UCS_TEST_P(test_uct_query, query_token_support) | ||
| { | ||
| uct_iface_attr_v2_t attr = {}; | ||
| uint64_t iface_cap_flags = 0; | ||
|
|
||
| attr.field_mask = UCT_IFACE_ATTR_FIELD_CAP_FLAGS; | ||
| attr.cap.flags = UINT64_MAX; | ||
|
|
||
| ASSERT_UCS_OK(uct_iface_query_v2(get_iface(), &attr)); | ||
|
|
||
| #ifdef HAVE_MLX5_DV | ||
| if (has_transport("rc_mlx5")) { | ||
| uct_ib_mlx5_md_t *md = uct_ib_mlx5_iface_md( | ||
| ucs_derived_of(get_iface(), uct_ib_iface_t)); | ||
| if (md->flags & UCT_IB_MLX5_MD_FLAG_DEVX) { | ||
| iface_cap_flags = UCT_IFACE_FLAG_V2_QUERY_TOKEN; | ||
| } | ||
| } | ||
| #endif | ||
|
|
||
| EXPECT_EQ(iface_cap_flags, attr.cap.flags & UCT_IFACE_FLAG_V2_QUERY_TOKEN); | ||
| EXPECT_EQ(0ul, attr.cap.flags & UCT_IFACE_FLAG_V2_QUERY_TOKEN); | ||
| } |
There was a problem hiding this comment.
Do we still need that test? it just check query_v2 is not returning V2_QUERY_TOKEN
|
🤖 Starting review — findings will be posted here when done. |
| ucs_status_t status) | ||
| { | ||
| if (UCS_STATUS_IS_ERR(err_handler_status)) { | ||
| if (err_handler_status != UCS_OK) { |
There was a problem hiding this comment.
err_handler_status != UCS_OK escalates the documented UCS_INPROGRESS return to FATAL. uct_base_iface_failure_log_level() receives the error handler's return value via uct_iface_handle_ep_err(), i.e. the value returned by uct_error_handler_t. That callback's contract in src/uct/api/uct_def.h explicitly allows three outcomes: UCS_OK (handled), UCS_INPROGRESS ("error handling is in progress and the transport should not purge outstanding operations"), and otherwise (not handled). UCS_STATUS_IS_ERR(x) is x < 0, and UCS_INPROGRESS is positive. So the old code escalated to UCS_LOG_LEVEL_FATAL only for real errors and treated UCS_INPROGRESS as a non-fatal, in-progress case. After the change, UCS_INPROGRESS != UCS_OK is true, so a handler that returns the documented UCS_INPROGRESS now produces a FATAL failure log. This looks like an unintended behavior change rather than a fix. No in-tree error handler currently returns UCS_INPROGRESS (ucp_worker_iface_error_handler returns UCS_OK/UCS_ERR_NO_ELEM; all gtest handlers return UCS_OK), so this is not caught by existing coverage and would only bite an external handler using the documented API contract. Is escalating UCS_INPROGRESS to FATAL intended? If so, update the callback documentation in uct_def.h and add a focused test; if not:
| if (err_handler_status != UCS_OK) { | |
| if (UCS_STATUS_IS_ERR(err_handler_status)) { |
|
Scope — the two changes are unrelated. The Notes on the token-flag removal (change 2): the flag macro Residual coverage gap: no test exercises the log-level path with a |
|
🤖 CI Triage Agent — TL;DR: The only failure in the whole Full analysisSummary: Root cause: From the log, the failing case is Implicated commit: none in this PR; the PR head commit 11bd528 / 408e6d6 (Zihao Zhao, File: test/gtest/uct/test_md.cc:413 (test body), test/gtest/uct/test_md.cc:394-411 (log filter), test/gtest/uct/test_md.cc:493 (failure threshold) Suggested fix: Re-trigger the Related: PR #11851 (this PR, |
|
🤖 Starting review — findings will be posted here when done. |
| @@ -1048,7 +1048,7 @@ ucs_log_level_t uct_base_iface_failure_log_level(uct_base_iface_t *iface, | |||
| ucs_status_t err_handler_status, | |||
| ucs_status_t status) | |||
| { | |||
There was a problem hiding this comment.
The condition change is a behavioral regression for a documented, valid handler return value. err_handler_status != UCS_OK now escalates a UCS_INPROGRESS return to FATAL, but uct_error_handler_t documents UCS_INPROGRESS as a valid non-error return ("The error handling is in progress and the transport should not purge outstanding operations."). Because FATAL at/below log_level_trigger calls ucs_fatal_error_message (i.e. abort), this can turn a legitimate in-progress error-handling flow into a crash. The old UCS_STATUS_IS_ERR(err_handler_status) (status < 0) escalated only genuine errors and let UCS_INPROGRESS (positive) fall through to the normal ERROR/failure_level path. Should this stay UCS_STATUS_IS_ERR(err_handler_status), or is escalating positive statuses intentional?
|
Scope: the two changes (uct_iface.h condition change and the token-flag removal in rc_mlx5_iface.c + test) are unrelated. Already covered in an unresolved thread — +1 rather than repeat. Token-flag removal internal consistency: Residual coverage gap: no test exercises the |
What?
revert log level and token cap
Why?
Do not change log level for all transports.
Set token cap until token, purge and in progress return code are all supported.
How?
Revert log level changes.
Revert cap flags.