On 02/02/2021 16:18, Victor Stewart wrote: >>> Please don't forget about checking error codes. At least fixed >>> files don't work for you because of >>> >>> int fds[10]; >>> memset(fds, -1, 10); // 10 bytes, not 10 ints >>> >>> So io_uring_register_files() silently fails. > > well i'm glad this one was my own careless error. fresh eyes are > everything. you're right, bad habit of ignoring return values lol. > >> Also you forget to submit, all works with these 2 changes. >> >> When you don't do io_uring_submit(), apparently it gets live-locked >> in liburing's _io_uring_get_cqe(), that's a bug. > > in the comments above io_uring_wait_cqe_timeout it says it submits for > you, that's why i didn't submit here. but i guess great if that There is a change of behaviour, if IORING_FEAT_EXT_ARG is set it won't submit (IIRC, since 5.12) -- it's pretty important for some multi-threaded cases. So... where in particular does it say that? In case your liburing is up to date and we forgot to remove such a comment. > exposed the _io_uring_get_cqe bug. It's great for sure! > > thanks so much for taking a look at this Pavel > -- Pavel Begunkov