Skip to content

Stop mapping eventfd resource exhaustion to EAGAIN - #1168

Open
Will Portnoy (willportnoy) wants to merge 1 commit into
uliteboxfrom
wportnoy/ulitebox-eventfd-errno
Open

Stop mapping eventfd resource exhaustion to EAGAIN#1168
Will Portnoy (willportnoy) wants to merge 1 commit into
uliteboxfrom
wportnoy/ulitebox-eventfd-errno

Conversation

@willportnoy

Copy link
Copy Markdown
Member

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.

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
@github-actions

Copy link
Copy Markdown

🤖 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.

@wdcui

Copy link
Copy Markdown
Member

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?

@CvvT

Copy link
Copy Markdown
Contributor

Will Portnoy (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 (Weiteng Chen (@CvvT)), should we merge this into main?

The main branch does not have this code.

@wdcui

Copy link
Copy Markdown
Member

Ah okay. Thanks, Weiteng Chen (@CvvT).

Will Portnoy (@willportnoy), please remove the test then merge the PR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants