-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
KqueueSelector
miscounts max events
#110038
Labels
Comments
sorcio
added a commit
to sorcio/cpython
that referenced
this issue
Sep 28, 2023
vstinner
pushed a commit
that referenced
this issue
Sep 28, 2023
sorcio
added a commit
to sorcio/cpython
that referenced
this issue
Sep 28, 2023
…ts (pythonGH-110039). (cherry picked from commit b14f0ab) Co-authored-by: Davide Rizzo <sorcio@gmail.com>
This was referenced Sep 28, 2023
sorcio
added a commit
to sorcio/cpython
that referenced
this issue
Sep 28, 2023
…ts (pythonGH-110039). (cherry picked from commit b14f0ab) Co-authored-by: Davide Rizzo <sorcio@gmail.com>
csm10495
pushed a commit
to csm10495/cpython
that referenced
this issue
Sep 29, 2023
Thanks for the issue and PRs! |
Thanks for the fix @sorcio. |
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
KqueueSelector.select()
may not get all events if a fd is registered for both read and write.kqueue requires to register two filters, one for read and one for write. But KqueueSelector.select() calls kqueue.control() counting the number of registered fds, not the filters. As a result a single call to select() won't return all the available events.
(Note that the two events are only visible on two subsequent selects)
For users like asyncio, this might mean missing a loop cycle or more (depending on number of registered readers/writers and ready events) before an event is seen. I previously said that this might cause deadlocks but I could not produce an example where a read/write event is never seen.
CPython versions tested on:
3.11, 3.12, CPython main branch
Operating systems tested on:
macOS, Other
Linked PRs
The text was updated successfully, but these errors were encountered: