Repository navigation
UCT/IB/RC/VERBS: Release the descriptor of a failed receive completion - #12060
Conversation
A receive descriptor is taken from the interface pool for every receive WR posted to the SRQ, but a completion which reports an error returns without releasing it, while the SRQ counts the WR as available and the next post takes another descriptor from the pool. Every failed receive therefore leaks a descriptor. Release the descriptor before skipping the completion. Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 CI Triage Agent — TL;DR: This isn't a code bug — the "AUTHORS file update check" failed because PR #12060's author, Guangguan Wang, is a new contributor who isn't listed in the Full analysisSummary: Azure Pipelines Codestyle job "AUTHORS file check" exited with code 1 because Root cause: The CI step computes the PR's commit range ( and appended the entry, producing a diff: Confirmed in the source: Implicated commit: [REDACTED:Hex High Entropy String] (Guangguan Wang, PR #12060 head) — the PR simply omits the required File: Suggested fix: On the git fetch origin master
./contrib/authors_update.sh origin/master..HEAD
git add AUTHORS && git commit -m "AUTHORS: add Guangguan Wang" && git pushAlternatively, add the single line Related: PR #12060; check implemented by
|
9ac3ff7 to
4447c4f
Compare
|
🤖 Starting review — findings will be posted here when done. |
|
The injected The mock replaces No coverage for the equivalent |
Mock the poll_cq() operation of the device context to produce a receive completion with an error status, and check that its descriptor is released back to the receive buffer pool. Both statuses which the transport skips are covered. Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
|
🤖 CI Triage Agent — TL;DR: The "AUTHORS file check" failed because PR #12060's commit author Full analysisSummary: Codestyle stage "AUTHORS file check" exited 1 — Root cause: The CI step computes the PR commit range ( Implicated commit: [REDACTED:Hex High Entropy String] (PR #12060, author Guangguan Wang) — missing AUTHORS entry, not a faulty code change. File: Suggested fix: In the PR branch i.e. add the line Related: PR #12060; no existing issue found for this specific AUTHORS gate failure.
|
4447c4f to
1091f14
Compare
tvegas1
left a comment
There was a problem hiding this comment.
need to update AUTHOR file too
|
🤖 Starting review — findings will be posted here when done. |
Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
|
🤖 Starting review — findings will be posted here when done. |
|
pls fix pr description according to latest code/testing. |
Done. |
|
🤖 CI Triage Agent — TL;DR: The ASAN gtest shard hung for exactly 900 s in its very first test, Full analysisSummary: Root cause: A hang, not a slow test. The log has exactly one gap, and it is the entire runtime of the step:
900 s is precisely The backtrace frames 10–16 are gtest framework frames, i.e. the main thread was stuck inside the test body. In while (count < exp_replies.size()) {
while (m_replies.empty()) {
progress(); // no deadline, spins forever
}( So one or more Not caused by this PR: the failing instance is rc_mlx5, but commit Implicated commit: unknown — not File: Suggested fix:
Related: PR #12060 (this PR), #11915, #11866, #11845; historically similar silent UCT hang: issue #3007. |
What?
Release the receive descriptor back to the interface pool when a receive
completion reports an error, and add a regression test for it.
Why?
A receive completion consumes the receive WR either way, so the descriptor which
that WR holds must go back to the pool. The two skipped statuses,
IBV_WC_REM_ABORT_ERRandIBV_WC_WR_FLUSH_ERR, continued without releasingit, so every failed receive leaked one descriptor. Enough of them exhaust the
pool, which stops reposting receives and stalls incoming traffic.
How?
Neither status delivered an active message, so the descriptor is released
unconditionally, as the success path already does. All other non-success
statuses are fatal, so no other path leaks one here.
Test: the error completion is produced by a mock, which replaces the
poll_cq()operation of the device context to report it stably. The testtakes one descriptor out of the pool, as if a receive WR held it, reports an
IBV_WC_REM_ABORT_ERRcompletion for it, and requires it back afterwards. Itthen gives back the receive queue slot which that completion returned, since
the queue never held the work request.