liburing: Missing poll event when using io_uring_register
Hi,
I’ve a scenario where a parent process communicates with a child process through a socketpair using sendmsg/recvmsg. I’m polling the fds of the socketpair using IORING_OP_POLL_ADD so I can know when there’s available data for reading. I’m also registering those fd’s. They send data back and forth and after a while the parent process closes the connection using close(). The issue I’m facing is that the child process doesn’t detect the disconnection (there’s no poll event received). The problem looks similar to when trying to close a connection without having unregistered the fd first, but I’m doing it just before calling close() by using io_uring_register_files_update() with -1 . If I run the same code without registering the files, it works correctly and the disconnection is detected.
I’m trying to come up with a reduced test case that demonstrates the issue as I can only reproduce it as part of a larger test case but in the meantime any hint on what I could be doing wrong would really be appreciated.
Thanks in advance.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (4 by maintainers)
@axboe, got it, thanks.
As said, I’ll look what’s going on.