-
In my event loop, I get a Here is the state of the ring:
Is this expected? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
That is not expected, looks like it's crashing on dereferencing the CQ ring memory. That is always allowed once the ring is setup, of course. Did you setup this up in a different process? This does not look like an io_uring/liburing issue. |
Beta Was this translation helpful? Give feedback.
-
A basic reproducer doesn't show any issues using io_uring_for_each_cqe() on a ring that's been setup without having done any waits. |
Beta Was this translation helpful? Give feedback.
Ah yes, it's shown in the above code:
ring_fd = -1
- this is what I do during garbage collection to indicate the ring is closed - this is definitely a bug on my end. My bad.Here are some more specific details just in case it's helpful for anyone else.
In my test suite, I was creating the
io_uring
and at the end of the test, it was closed.However, during the test, I was using a separate thread to actually run the
io_uring
to check the behaviour ofSIGVTALRM
/EINTR
.This thread was being leaked, and so the order of operations was:
io_uring
.io_uring
.io_uring_foreach_cqe
was invoked on invalidio_uring
.