Project

General

Profile

Actions

Bug #20888

open

4c270200db breaks TestGemRemoteFetcherLocalSSLServer tests or so

Added by mtasaka (Mamoru TASAKA) about 1 month ago. Updated 16 days ago.

Status:
Assigned
Target version:
-
ruby -v:
ruby 3.4.0dev (2024-11-12 master a6fdd8883c) +PRISM [x86_64-linux]
[ruby-dev:<unknown>]

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

So looks like the culprit is between the above 2 commits.
( I suspect 4c270200dbc2a3a4511e8b793a033078afd6fb31 but not sure )


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #20895: Network related test failuresClosedActions
Actions #1

Updated by mtasaka (Mamoru TASAKA) about 1 month ago

Confirmed fee706d9dd52d7f0444357259f33d335f21c980b with reverting 4c270200dbc2a3a4511e8b793a033078afd6fb31 removes the above errors and makes testsuite pass on x86_64.

Actions #2

Updated by mtasaka (Mamoru TASAKA) about 1 month ago

  • Subject changed from TestGemRemoteFetcherLocalSSLServer tests or so began to fail to 4c270200db breaks TestGemRemoteFetcherLocalSSLServer tests or so
Actions #3

Updated by hsbt (Hiroshi SHIBATA) about 1 month ago

  • Status changed from Open to Assigned
  • Assignee set to shioimm (Misaki Shioi)
Actions #4

Updated by hsbt (Hiroshi SHIBATA) about 1 month ago

  • Has duplicate Bug #20895: Network related test failures added
Actions #5

Updated by shioimm (Misaki Shioi) about 1 month 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.

Actions #6

Updated by shioimm (Misaki Shioi) about 1 month ago

  • Status changed from Open to Assigned
  • Assignee set to shioimm (Misaki Shioi)
Actions #7

Updated by shioimm (Misaki Shioi) about 1 month ago

(I changed the status by mistake and will reassign myself)

Actions #8

Updated by shioimm (Misaki Shioi) 16 days ago ยท Edited

Sorry for the late response.
I believe the issue you reported has been resolved by the following change, so please have a look.
https://github.com/ruby/ruby/pull/12153
Currently, this feature is once again enabled by default on the master branch again.
Thank you for reporting this.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0