Skip to content

Commit

Permalink
prov/tcp: flush potential wait obj interupts from uring on close
Browse files Browse the repository at this point in the history
When using a FI_WAIT_FD wait object with uring polled connections
it's possible for interrupts to be sent from the kernel after the
urings are unregistered.  To circumvent potential "dangling" interrupts
later in the applcation flow, do one final epoll after destroying urings

this issue was caught by the eq_wait_fd_sread flow of fi_eq_test
  • Loading branch information
ooststep committed Dec 17, 2024
1 parent cc3deaa commit fedf1c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions prov/tcp/src/xnet_progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -1951,6 +1951,12 @@ void xnet_close_progress(struct xnet_progress *progress)
free(progress->cqes);
xnet_destroy_uring(&progress->rx_uring, &progress->epoll_fd);
xnet_destroy_uring(&progress->tx_uring, &progress->epoll_fd);

/* destroying a uring may trigger an interrupt on subsequent
* epoll_wait so force catch the interrupt and ignore it
*/
(void) ofi_dynpoll_wait(&progress->epoll_fd, &progress->events[0],
ARRAY_SIZE(progress->events), 100);
}
ofi_dynpoll_close(&progress->epoll_fd);
ofi_bufpool_destroy(progress->xfer_pool);
Expand Down

0 comments on commit fedf1c5

Please sign in to comment.