Project

General

Profile

Actions

Bug #6959

closed

Net/HTTPS tests: fixed port usage cause issues on CI

Added by luislavena (Luis Lavena) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.0.0dev (2012-09-01 trunk 36875) [x64-mingw32]
Backport:
[ruby-core:47387]

Description

=begin
Hello,

RubyInstaller's CI worker compiles and run tests for both x86 and x64 builds from trunk.

Sometimes, these builds are run in parallel and causing random (({Errno::EADDRINUSE})):

  1. Error:
    test_verify_none(TestNetHTTPS):
    Errno::EADDRINUSE: Only one usage of each socket address (protocol/network address/port) is normally permitted. - bind(2)
    C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/webrick/utils.rb:85:in initialize' C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/webrick/utils.rb:85:in new'
    C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/webrick/utils.rb:85:in block in create_listeners' C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/webrick/utils.rb:82:in each'
    C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/webrick/utils.rb:82:in create_listeners' C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/webrick/ssl.rb:88:in listen'
    C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/webrick/server.rb:70:in initialize' C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/webrick/httpserver.rb:45:in initialize'
    C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/test/net/http/utils.rb:64:in new' C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/test/net/http/utils.rb:64:in spawn_server'
    C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/test/net/http/utils.rb:31:in `setup'

Full output here:

http://ci.rubyinstaller.org/job/ruby-trunk-x64-test-all/19/console

http://ci.rubyinstaller.org/job/ruby-trunk-x86-test-all/23/console

Back in #6766, Yui NARUSE used '0' as WEBrick port to select one randomly, but appears that is not working as expected.

As you can see, those random failures are a problem when trying to determine a real failure.

Perhaps the port can be randomized with (({Process.pid})) as base? That way chances of same por for different process are minimal.

Thank you.
=end


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #6766: Unable to run tests for different builds due fixed port for Net::HTTPSClosednaruse (Yui NARUSE)07/22/2012Actions
Actions #1

Updated by naruse (Yui NARUSE) about 12 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r36877.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Use 0 as port like #6766 [Bug #6959]

Actions

Also available in: Atom PDF

Like0
Like0