Repository navigation
prov/efa: release reorder-window packets at endpoint teardown - #13188
Open
charlesstoll wants to merge 2 commits into
Open
charlesstoll wants to merge 2 commits into
charlesstoll wants to merge 2 commits into
Conversation
The EFA RDM provider aborts at endpoint close with a buffer-pool assertion:
fi_efa_rnr_read_cq_error: prov/util/src/util_buf.c:291: ofi_bufpool_destroy:
Assertion `(flags & OFI_BUFPOOL_NO_TRACK) || !ofi_atomic_get32(&buf_region->use_cnt)' failed.
An out-of-order packet cloned into rx_ooo_pkt_pool can sit permanently in the
peer reorder window behind a gap that never fills (e.g. a send dropped under RNR
with retry count 0). At teardown efa_recvwin_free frees only the window array,
so in a non-debug build these packets are never released and ofi_bufpool_destroy
finds a nonzero use_cnt. The abort is timing dependent, hence flaky.
Add efa_rdm_peer_release_pending_items_in_robuf() to free any packets left in
the window. It is called per peer from efa_rdm_ep_destroy_buffer_pools and from
efa_rdm_peer_destruct to also cover the fi_av_remove path.
Signed-off-by: Charles Stoll <stollcha@amazon.com>
Queue an out-of-order packet into a peer's reorder window, remove the peer, and check rx_ooo_pkt_pool has no outstanding entry afterward. Fails before the teardown drain, passes after. Signed-off-by: Charles Stoll <stollcha@amazon.com>
shijin-aws
approved these changes
Nov 11, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The EFA RDM provider aborts at endpoint close with a buffer-pool assertion:
fi_efa_rnr_read_cq_error: prov/util/src/util_buf.c:291: ofi_bufpool_destroy:
Assertion `(flags & OFI_BUFPOOL_NO_TRACK) || !ofi_atomic_get32(&buf_region->use_cnt)' failed.
An out-of-order packet cloned into rx_ooo_pkt_pool can sit permanently in the peer reorder window behind a gap that never fills (e.g. a send dropped under RNR with retry count 0). At teardown efa_recvwin_free frees only the window array, so in a non-debug build these packets are never released and ofi_bufpool_destroy finds a nonzero use_cnt. The abort is timing dependent, hence flaky.
Add efa_rdm_peer_release_pending_items_in_robuf() to free any packets left in the window. It is called per peer from efa_rdm_ep_destroy_buffer_pools and from efa_rdm_peer_destruct to also cover the fi_av_remove path.