Bug 33022
Summary: | incorrect return value when calling select() on an epoll descriptor | ||
---|---|---|---|
Product: | IO/Storage | Reporter: | Mark Heily (mark) |
Component: | Other | Assignee: | io_other |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | Debian "squeeze" 2.6.32-5-amd64 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | test case |
Sorry, this is not a kernel bug.. I misinterpreted the usage of the "nfds" argument to select(), it should be the value of the epoll descriptor + 1. |
Created attachment 54012 [details] test case The epoll(7) manpage states the following: Q3 Is the epoll file descriptor itself poll/epoll/selectable? A3 Yes. If an epoll file descriptor has events waiting then it will indicate as being readable. It appears that this functionality is broken. I have attached a testcase that uses select() to test an epoll descriptor for readability. The return value of select() is zero, even though the epoll descriptor has events waiting.