The GitHub Actions job "Pull Requests" on 
pekko.git/fix-3692-tcp-accept-error-backoff has failed.
Run started by GitHub user He-Pin (triggered by He-Pin).

Head commit for run:
d1bd0c7627e589ac902d28ad2e9bf775264adf7d / 虎鸣 <[email protected]>
fix: back off instead of spinning when TcpListener accept keeps failing

Motivation:
When ServerSocketChannel.accept() throws (most commonly descriptor
exhaustion), TcpListener logged the error and immediately re-armed
OP_ACCEPT. The listening channel stays acceptable under a persistent error,
so the selector kept firing and the listener spun in a tight loop emitting
one ERROR per iteration, filling disk and competing for CPU at exactly the
moment resources were scarce.

Modification:
Track accept failures; when one occurs, do not re-arm OP_ACCEPT but schedule
a ChannelAcceptable retry after the new pekko.io.tcp.accept-error-retry-delay
(default 100ms). This also bounds the error log rate to one per retry
interval while the condition persists. Successful accepts re-arm interest as
before. New TcpListenerAcceptErrorSpec asserts the listener does not re-arm
interest while accept keeps failing.

Result:
A persistent accept error no longer pins the selector and floods the log;
accepting resumes automatically once the error clears.

Tests:
- sbt "actor-tests / Test / testOnly 
org.apache.pekko.io.TcpListenerAcceptErrorSpec": passed
- Reverted the fix and re-ran: failed as expected (directional)
- sbt "actor-tests / Test / testOnly org.apache.pekko.io.TcpIntegrationSpec": 
15/15 passed
- TcpListenerSpec has 2 failures on this macOS machine that reproduce 
identically on pristine origin/main (environmental, unrelated)

References:
Fixes #3692

Report URL: https://github.com/apache/pekko/actions/runs/40113783716

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to