liburing: `io_uring_peek_batch_cqe` does not populate `cqe` over FFI consistently!
After couple months of segfaults(over interpreter) narrowed the bug down to io_uring_peek_batch_cqe not populating cqe consistently. The first loop always runs fine after its anyone’s guess as to when it will segfault from not populating cqe
while counter := ((io_uring_submit(ring) if io_uring_sq_ready(ring) else 0) + counter - cq_ready):
# get count of how many event(s) are ready and fill `cqe`
while not (cq_ready := io_uring_peek_batch_cqe(ring, cqe, counter)):
io_uring_wait_cqe_nr(ring, cqe, 1) # wait for at least `1` event to be ready.
for i in range(cq_ready):
# do stuff ...
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 23 (20 by maintainers)
Not exactly sure what you mean, I do have
faulthandlerenabled and output:edit: I am not assigning any memory for cqe/sqe so I am not calling
free()either,liburinghandles memory assigning and freeing