Skip to content

prov/efa: release reorder-window packets at endpoint teardown - #13188

Open
charlesstoll wants to merge 2 commits into
ofiwg:mainfrom
charlesstoll:srx_teardown_fix
Open

charlesstoll wants to merge 2 commits into
ofiwg:mainfrom
charlesstoll:srx_teardown_fix

Conversation

@charlesstoll

Copy link
Copy Markdown
Contributor

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.

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>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants