Bug #20888
open4c270200db breaks TestGemRemoteFetcherLocalSSLServer tests or so
Description
With repeatedly trying to rebuild ruby master on Fedora copr build server, recently TestGemRemoteFetcherLocalSSLServer tests or so tests began to fail on x86_64 as:
183) Failure:
TestSocket_TCPSocket#test_initialize_with_connection_failure_after_hostname_resolution_failure [/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/socket/test_tcp.rb:318]:
[Errno::ECONNREFUSED] exception expected, not #<Socket::ResolutionError: getaddrinfo(3): Non-recoverable failure in name resolution>.
184) Failure:
TestSocket_TCPSocket#test_initialize_resolv_timeout_with_connection_failure [/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/socket/test_tcp.rb:284]:
[Errno::ETIMEDOUT] exception expected, not #<Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 39177>.
185) Failure:
TestSocket_TCPSocket#test_initialize_with_hostname_resolution_failure_after_connection_failure [/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/socket/test_tcp.rb:303]:
[Socket::ResolutionError] exception expected, not #<Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 40983>.
186) Error:
TestGemRemoteFetcherLocalSSLServer#test_ssl_connection_allow_verify_none:
Gem::RemoteFetcher::FetchError: Errno::ECONNREFUSED: Failed to open TCP connection to localhost:34229 (Connection refused - connect(2) for "localhost" port 34229) (https://localhost:34229/yaml)
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/lib/rubygems/remote_fetcher.rb:265:in 'Gem::RemoteFetcher#fetch_path'
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/rubygems/test_gem_remote_fetcher_local_ssl_server.rb:103:in 'block in TestGemRemoteFetcherLocalSSLServer#test_ssl_connection_allow_verify_none'
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/rubygems/test_gem_remote_fetcher_local_ssl_server.rb:145:in 'TestGemRemoteFetcherLocalSSLServer#with_configured_fetcher'
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/rubygems/test_gem_remote_fetcher_local_ssl_server.rb:102:in 'TestGemRemoteFetcherLocalSSLServer#test_ssl_connection_allow_verify_none'
187) Error:
TestSocket_TCPSocket#test_initialize_v6_hostname_resolution_failed_and_v4_hostname_resolution_is_success:
Socket::ResolutionError: getaddrinfo(3): Non-recoverable failure in name resolution
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/socket/test_tcp.rb:266:in 'TCPSocket#initialize'
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/socket/test_tcp.rb:266:in 'IO.new'
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/socket/test_tcp.rb:266:in '<main>'
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/socket/test_tcp.rb:259:in 'TestSocket_TCPSocket#test_initialize_v6_hostname_resolution_failed_and_v4_hostname_resolution_is_success'
188) Error:
TestSocket_TCPSocket#test_initialize_v6_hostname_resolved_earlier_and_v6_server_is_not_listening:
Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 47167
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/socket/test_tcp.rb:222:in 'TCPSocket#initialize'
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/socket/test_tcp.rb:222:in 'IO.new'
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/socket/test_tcp.rb:222:in '<main>'
/builddir/build/BUILD/ruby-3.4.0_20241112.1157gitfee706d9dd-build/ruby-3.4.0-fee706d9dd/test/socket/test_tcp.rb:213:in 'TestSocket_TCPSocket#test_initialize_v6_hostname_resolved_earlier_and_v6_server_is_not_listening'
Finished tests in 692.000057s, 46.3801 tests/s, 9452.0484 assertions/s.
32095 tests, 6540818 assertions, 3 failures, 3 errors, 182 skips
( From 1) to 182) are skipped tests )
Looks like
- 821a5b966fbc2926dc3bf88b6ba09879fa35318e tests are successful
- a6fdd8883cab6b31357552db8a64cfb335678172 sees the above error
- fee706d9dd52d7f0444357259f33d335f21c980b sees the above error
So looks like the culprit is between the above 2 commits.
( I suspect 4c270200dbc2a3a4511e8b793a033078afd6fb31 but not sure )
Updated by mtasaka (Mamoru TASAKA) 9 days ago
Confirmed fee706d9dd52d7f0444357259f33d335f21c980b with reverting 4c270200dbc2a3a4511e8b793a033078afd6fb31 removes the above errors and makes testsuite pass on x86_64.
Updated by mtasaka (Mamoru TASAKA) 9 days ago
- Subject changed from TestGemRemoteFetcherLocalSSLServer tests or so began to fail to 4c270200db breaks TestGemRemoteFetcherLocalSSLServer tests or so
Updated by hsbt (Hiroshi SHIBATA) 9 days ago
- Status changed from Open to Assigned
- Assignee set to shioimm (Misaki Shioi)
Updated by hsbt (Hiroshi SHIBATA) 7 days ago
- Has duplicate Bug #20895: Network related test failures added
Updated by shioimm (Misaki Shioi) 7 days ago
- Status changed from Assigned to Open
- Assignee deleted (
shioimm (Misaki Shioi))
Thank you for reporting.
As you pointed out, I believe the test failures are due to the Happy Eyeballs v2 implementation introduced in 4c270200dbc2a3a4511e8b793a033078afd6fb31.
I am currently investigating this issue, but I have temporarily disabled this feature in the master branch by default with this PR.
https://github.com/ruby/ruby/pull/12070
Therefore, you should not encounter this problem in your environment for the time being.
However, I plan to re-enable this feature during the investigation, so if you find any suspicious test failures in the future, I would greatly appreciate it if you could report them.
Updated by shioimm (Misaki Shioi) 7 days ago
- Status changed from Open to Assigned
- Assignee set to shioimm (Misaki Shioi)
Updated by shioimm (Misaki Shioi) 7 days ago
(I changed the status by mistake and will reassign myself)