Stop mapping eventfd resource exhaustion to EAGAIN - #1168
Stop mapping eventfd resource exhaustion to EAGAIN#1168Will Portnoy (willportnoy) wants to merge 1 commit into
Conversation
EventCounterError::ResourceExhausted mapped to EAGAIN, telling a guest to retry eventfd operations against a permanent object-reference limit or allocation failure. In practice this arm is only reachable on eventfd2() creation, where ENOMEM is the documented Linux errno; map it there and leave WouldBlock on EAGAIN. This matches how the socket path already surfaces ResourceExhausted as ENOBUFS rather than a retry-shaped errno. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ea6a6c0d-6bb9-4eed-b8f6-5059a53e326d
|
🤖 SemverChecks 🤖 No breaking API changes detected Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered. |
|
Will Portnoy (@willportnoy) , should this be merged into main instead of ulitebox? Also, I don't think the added test is particularly useful. Weiteng Chen (@CvvT), should we merge this into main? |
The main branch does not have this code. |
|
Ah okay. Thanks, Weiteng Chen (@CvvT). Will Portnoy (@willportnoy), please remove the test then merge the PR. Thanks! |
EventCounterError::ResourceExhausted mapped to EAGAIN, which tells a guest to retry eventfd operations against a permanent object-reference limit or allocation failure. In practice this arm is only reachable on eventfd2() creation, so it now maps to ENOMEM (eventfd2's documented exhaustion errno) while WouldBlock stays on EAGAIN, matching how the socket path already surfaces ResourceExhausted as ENOBUFS. If events ever gain an externally-backed readiness-sink path, the transient sink-full case should be split out rather than re-widening this arm, so a transient backpressure condition does not surface as ENOMEM on read/write.