pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41297?usp=email )
Change subject: tests/osmo_io_test (io_uring): test_segmentation: Fix infinite loop in read_cb rc=0 ......................................................................
tests/osmo_io_test (io_uring): test_segmentation: Fix infinite loop in read_cb rc=0
Under linux 6.17.6-arch1-1 & liburing 2.12-1, once we finish reading from the pipe (rc=0) because the write peer was closed and data has been consumed, we end up in some sort of infinite loop in the uring due to re-adding a sqe in iofd_uring_handle_recv()->iofd_uring_submit_recv() path and immediatelly consuming a cqe from the uring, without going through the poll() loop.
The user is expected to close the fd once rc=0 is received anyway, which was not being done in this test. Doing so successfully unregisters the iofd and fixes the infinite loop.
Fixes: 086ee51de416ae5276b4b185c055831e16c0ef85 Change-Id: I47b5fff04c601cd08ab2d46b88336247b2193808 --- M tests/osmo_io/osmo_io_test.c 1 file changed, 1 insertion(+), 0 deletions(-)
Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified jolly: Looks good to me, but someone else must approve
diff --git a/tests/osmo_io/osmo_io_test.c b/tests/osmo_io/osmo_io_test.c index 693c428..0812ea8 100644 --- a/tests/osmo_io/osmo_io_test.c +++ b/tests/osmo_io/osmo_io_test.c @@ -280,6 +280,7 @@ } else { OSMO_ASSERT(rc == 0); file_eof_read = true; + osmo_iofd_close(iofd); } talloc_free(msg); }