Commit 30075b3
committed
tests: add reproducer for issue #614 Bad file descriptor on SSL topology change
Add integration test that reproduces the '[Errno 9] Bad file descriptor'
error in ControlConnection._try_connect() when TLS/SSL is enabled and
topology changes happen concurrently with active sessions.
Root cause: CPython bug python/cpython#148594
ERR_clear_error() not called before SSL_read_ex()/SSL_write_ex(), causing
stale OpenSSL error queue entries to corrupt SSL_get_error() on connections
sharing the same thread (libev event loop). Affects Python 3.12+.
Test scenarios:
- Node stop during active SSL session (primary reproducer)
- Rolling restart with continuous workload
- Decommission with active session
- Rapid node cycling stress test
- Environment diagnostic info
Run with:
EVENT_LOOP_MANAGER=libev SCYLLA_VERSION=release:2025.2 \
uv run pytest tests/integration/long/test_ssl_topology_change.py -v
Refs: #614, python/cpython#1485941 parent bf7966f commit 30075b3
1 file changed
Lines changed: 567 additions & 0 deletions
0 commit comments