Skip to content

Rescue SystemCallError in the TLS test server - #107

Merged
hsbt merged 1 commit into
masterfrom
claude/jovial-babbage-818864
Sep 26, 2026
Merged

hsbt merged 1 commit into
masterfrom
claude/jovial-babbage-818864

Conversation

@hsbt

@hsbt hsbt commented Sep 26, 2026

Copy link
Copy Markdown
Member

Net::TestSSLContext#test_tls_verify_true_after_initialize intermittently errors on the Windows test-bundled-gems job of ruby/ruby with Errno::ECONNRESET: An existing connection was forcibly closed by the remote host. - SSL_accept. Every test that expects a verification failure shares the race.

When the client rejects the certificate, it closes the socket with part of the server's handshake still unread. Windows then resets the connection and drops the client's alert, so SSL_accept in the server thread raises ECONNRESET instead of SSLError, and teardown re-raises it. I made wrap_ssl_socket rescue SystemCallError as well.

On mswin, the six verify-failure tests hit this 8 times in 24,000 runs before the change and 0 times after.

https://github.com/ruby/ruby/actions/runs/36208437463/job/108309842285

Generated with Claude Code

When the client rejects the certificate and closes the socket with part of the handshake still unread, Windows resets the connection and SSL_accept on the server thread raises Errno::ECONNRESET instead of SSLError. It escaped the thread and teardown re-raised it as a test error.

https://github.com/ruby/ruby/actions/runs/36208437463/job/108309842285

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsbt
hsbt merged commit b545f48 into master Sep 26, 2026
52 checks passed
@hsbt
hsbt deleted the claude/jovial-babbage-818864 branch September 26, 2026 06:45
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.

1 participant