[DRE-maint] Bug#1077462: Bug#1069399: ruby3.1: FTBFS on arm64: Errno::EADDRINUSE: Address already in use - listen(2)
Colin Watson
cjwatson at debian.org
Mon Aug 26 13:06:43 BST 2024
Control: forwarded 1069399 https://github.com/ruby/ruby/pull/11456
Control: forwarded 1064685 https://github.com/ruby/ruby/pull/11456
Control: forwarded 1077462 https://github.com/ruby/ruby/pull/11456
On Sat, Apr 20, 2024 at 02:12:50PM +0200, Lucas Nussbaum wrote:
> During a rebuild of all packages in sid, your package failed to build
> on arm64.
>
>
> Relevant part (hopefully):
> > 13) Error:
> > TestNetHTTPS#test_verify_none:
> > Errno::EADDRINUSE: Address already in use - listen(2)
> > /<<PKGBUILDDIR>>/.ext/common/socket.rb:710:in `listen'
> > /<<PKGBUILDDIR>>/.ext/common/socket.rb:710:in `block in tcp_server_sockets_port0'
> > /<<PKGBUILDDIR>>/.ext/common/socket.rb:709:in `each'
> > /<<PKGBUILDDIR>>/.ext/common/socket.rb:709:in `tcp_server_sockets_port0'
> > /<<PKGBUILDDIR>>/.ext/common/socket.rb:758:in `tcp_server_sockets'
> > /<<PKGBUILDDIR>>/tool/lib/webrick/utils.rb:60:in `create_listeners'
> > /<<PKGBUILDDIR>>/tool/lib/webrick/ssl.rb:165:in `listen'
> > /<<PKGBUILDDIR>>/tool/lib/webrick/server.rb:111:in `initialize'
> > /<<PKGBUILDDIR>>/tool/lib/webrick/httpserver.rb:47:in `initialize'
> > /<<PKGBUILDDIR>>/test/net/http/utils.rb:67:in `new'
> > /<<PKGBUILDDIR>>/test/net/http/utils.rb:67:in `spawn_server'
> > /<<PKGBUILDDIR>>/test/net/http/utils.rb:32:in `setup'
This isn't arm64-specific. It happens when /etc/hosts has multiple
entries mapping localhost to the same IP address, which is the case in
my sbuild environments and apparently also yours.
$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 [...]
127.0.0.1 localhost ip6-localhost ip6-loopback
I haven't tracked down what made it this way. It ought to be harmless,
but it causes a few things to break that loop over getaddrinfo output
and listen to all the addresses they find there;
https://bugs.debian.org/1052788 (python-asyncssh) is essentially the
same thing, as are https://bugs.debian.org/1064685 (ruby3.2) and
https://bugs.debian.org/1077462 (ruby3.3).
I sent https://github.com/ruby/ruby/pull/11456 to upstream Ruby for
this. I suggest applying it to the various Ruby versions in Debian.
Thanks,
--
Colin Watson (he/him) [cjwatson at debian.org]
More information about the Pkg-ruby-extras-maintainers
mailing list