Skip to content
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

epoll_wait can lose events when they do not all fit into the output buffer #3812

Closed
RalfJung opened this issue Aug 16, 2024 · 0 comments · Fixed by #3818
Closed

epoll_wait can lose events when they do not all fit into the output buffer #3812

RalfJung opened this issue Aug 16, 2024 · 0 comments · Fixed by #3818
Labels
A-files Area: related to files, paths, sockets, file descriptors, or handles C-bug Category: This is a bug.

Comments

@RalfJung
Copy link
Member

See here for the relevant code and what is wrong with it: we first fetch an event from the queue, and then try to find a spot for it in the buffer. That's the wrong way around; we should iterate over the output buffer and only if we are sure we can store an event, then fetch one from the queue.

Cc @tiif

@RalfJung RalfJung added C-bug Category: This is a bug. A-files Area: related to files, paths, sockets, file descriptors, or handles labels Aug 16, 2024
@bors bors closed this as completed in 6c93473 Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-files Area: related to files, paths, sockets, file descriptors, or handles C-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant