-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Creating PollEvented for RawFd #2413
Comments
Convert to a future that returns when packets are available, up to a specified buffering time limit. Currently using mio due to tokio-rs/tokio#2413
@dbcfd Do you have any additional output from the error? Token is just a wrapped |
Not a way to reproduce easily, but a way to fix. PollEvented registers both read and write, but not all file descriptors are read and write. Providing a method to register a PollEvented with just read prevents this error from happening.
I then create PollEvented with |
I believe the PR referenced above can verify the fix with |
Add additional methods to allow PollEvented to be created with an appropriate `mio::Ready` state so that it can be properly registered with the reactor.
Add additional methods to allow PollEvented to be created with an appropriate `mio::Ready` state so that it can be properly registered with the reactor.
* No Delay Convert to a future that returns when packets are available, up to a specified buffering time limit. Currently using mio due to tokio-rs/tokio#2413
Add additional methods to allow PollEvented to be created with an appropriate `mio::Ready` state so that it can be properly registered with the reactor.
Add additional methods to allow PollEvented to be created with an appropriate `mio::Ready` state so that it can be properly registered with the reactor.
What type of resource does the FD reference? |
In this case it's an interface opened by libpcap for packet capture. |
@dbcfd could you help provide an example of how to repro? I would like to see the steps to get the RawFd in this case (syscalls, ...). I think we need to move away from PollEvented if we want to support uring. |
|
Add additional methods to allow PollEvented to be created with an appropriate mio::Ready state, so that it can be properly registered with the reactor. Fixes #2413
Add additional methods to allow PollEvented to be created with an appropriate mio::Ready state, so that it can be properly registered with the reactor. Fixes tokio-rs#2413
Version
0.2.18
Platform
19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
Description
I am attempting to create PollEvented from a RawFd, but it looks to be getting an invalid token.
This is leading to an IO Error for invalid argument
Code occurring inside an async context:
When I create a mio event manually, I do not have an issue.
The text was updated successfully, but these errors were encountered: