You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "Jens-G (via GitHub)" <gi...@apache.org> on 2026/06/18 10:01:57 UTC
[PR] THRIFT-6072: Rescue connection errors during accept in ThreadedServer and SimpleServer [thrift]
Jens-G opened a new pull request, #3603:
URL: https://github.com/apache/thrift/pull/3603
## Summary
- `ThreadedServer` and `SimpleServer` did not rescue errors raised during `@server_transport.accept`.
- When an SSL server socket receives a plain TCP probe connection (e.g. the cross-test runner's `ensure_socket_open` readiness check), the immediately-aborted connection causes an `OpenSSL::SSL::SSLError` from within `accept`, which propagated unhandled and terminated the server process.
- This produces `RESULT_ERROR (64)` in the cross-test runner because the server exits before the client can be started.
- The fix wraps `accept` in a rescue that swallows `Errno::ECONNRESET`, `Errno::EPIPE`, and `OpenSSL::SSL::SSLError` (when OpenSSL is loaded), allowing the server to continue serving after such transient connection failures.
- `ThreadPoolServer` and `NonblockingServer` were already safe; this brings `ThreadedServer` and `SimpleServer` in line.
## Test plan
- [ ] New unit tests in `lib/rb/spec/server_spec.rb` verify that both `SimpleServer` and `ThreadedServer` continue serving when `accept` raises `Errno::ECONNRESET` or `OpenSSL::SSL::SSLError`
- [ ] Existing server spec tests still pass (normal accept path unchanged)
- [ ] `lib-ruby` CI job passes
- [ ] Cross-test `rb-cpp accel-binary buffered-ip-ssl` no longer produces `RESULT_ERROR (64)`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] THRIFT-6072: Rescue connection errors during accept in ThreadedServer and SimpleServer [thrift]
Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G merged PR #3603:
URL: https://github.com/apache/thrift/pull/3603
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org