You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The file descriptor refers to a kernel module, which is not readable but pollable. Calling libc::read on it will receive a EINVAL error. However, this file descriptor supports epoll, and can be correctly polled by EPOLLIN, without any EPOLLERR event triggered. The behaviors of AsyncFd and epoll mismatched.
The following code will hang infinitely while manual calling to epoll will return correct event count:
Version
tokio v1.38.0
Platform
Linux 5.11.0-25-generic, Ubuntu 20.04.1
Description
The file descriptor refers to a kernel module, which is not readable but pollable. Calling
libc::read
on it will receive aEINVAL
error. However, this file descriptor supports epoll, and can be correctly polled byEPOLLIN
, without anyEPOLLERR
event triggered. The behaviors ofAsyncFd
and epoll mismatched.The following code will hang infinitely while manual calling to
epoll
will return correct event count:The following code will return immediately, while no events will be received even if
EPOLLERR
is registered:It turns out
AsyncFd
thinks there are some errors while no error is from epoll.I hope to know if this is the expected behavior; if it is, is there any workaround to get the same behavior with epoll?
The text was updated successfully, but these errors were encountered: