Hi, commit 41be53e94fb04cc69fdf2f524c2a05d8069e047b (HEAD, refs/bisect/bad) Author: Jens Axboe <axboe@xxxxxxxxx> Date: 2021-02-13 09:11:04 -0700 io_uring: kill cached requests from exiting task closing the ring Be nice and prune these upfront, in case the ring is being shared and one of the tasks is going away. This is a bit more important now that we account the allocations. Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> causes EAGAIN to be returned by io_uring_enter() after a child exits. The existing liburing test across-fork.c repros the issue after applying the patch below. Retrying the submission twice seems to make it succeed most of the time... Greetings, Andres Freund diff --git a/test/across-fork.c b/test/across-fork.c index 14ee93a..2b19f39 100644 --- a/test/across-fork.c +++ b/test/across-fork.c @@ -220,6 +220,13 @@ int main(int argc, char *argv[]) if (wait_cqe(&shmem->ring, "p cqe 2")) goto errcleanup; + /* check that IO still works after the child exited */ + if (submit_write(&shmem->ring, shared_fd, "parent: after child exit\n", 0)) + goto errcleanup; + + if (wait_cqe(&shmem->ring, "p cqe 3")) + goto errcleanup; + break; } case 0: { @@ -260,7 +267,8 @@ int main(int argc, char *argv[]) if (verify_file(tmpdir, "shared", "before fork: write shared fd\n" "parent: write shared fd\n" - "child: write shared fd\n") || + "child: write shared fd\n" + "parent: after child exit\n") || verify_file(tmpdir, "parent1", "parent: write parent fd 1\n") || verify_file(tmpdir, "parent2", "parent: write parent fd 2\n") || verify_file(tmpdir, "child", "child: write child fd\n"))