On 9/2/20 4:09 AM, Norman Maurer wrote: > Hi there, > > We are currently working on integrating io_uring into netty and found > some “suprising” behaviour which seems like a bug to me. > > When a socket is marked as non blocking (accepted with O_NONBLOCK flag > set) and there is no data to be read IORING_OP_READ should complete > directly with EAGAIN or EWOULDBLOCK. This is not the case and it > basically blocks forever until there is some data to read. Is this > expected ? > > This seems to be somehow related to a bug that was fixed for > IO_URING_ACCEPT with non blocking sockets: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.8&id=e697deed834de15d2322d0619d51893022c90ea2 I agree with you that this is a bug, in general it's useful (and expected) that we'd return -EAGAIN for that case. I'll take a look. -- Jens Axboe