#998097 ruby-eventmachine FTBFS on IPV6-only buildds and accesses the internet during the build

#998097#5
Date:
2021-10-30 08:53:46 UTC
From:
To:
FTBFS on IPV6-only buildds:

https://buildd.debian.org/status/fetch.php?pkg=ruby-eventmachine&arch=amd64&ver=1.3~pre20201020-b50c135-3&stamp=1633500476&raw=0
https://buildd.debian.org/status/fetch.php?pkg=ruby-eventmachine&arch=i386&ver=1.3~pre20201020-b50c135-4%2Bb1&stamp=1635578996&raw=0

FTBFS due to attempted DNS:

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/ruby-eventmachine.html

...
===============================================================================
Failure: test_nameserver(TestResolver):
  <nil> was expected to be kind_of?
  <String> but was
  <NilClass>.
/build/1st/ruby-eventmachine-1.3~pre20201020-b50c135/tests/test_resolver.rb:19:in `test_nameserver'
     16:   end
     17:
     18:   def test_nameserver
  => 19:     assert_kind_of(String, EM::DNS::Resolver.nameserver)
     20:   end
     21:
     22:   def test_nameservers
===============================================================================
...

#998097#10
Date:
2021-11-03 12:50:32 UTC
From:
To:
The ipv6-only thing is already worked around in
1.3~pre20201020-b50c135-4 by skipping the tests in those setups.

Now, there is some type of weird issue with the test suite. It seems to
fail randomly on some circumstances, which I could not pinpoint yet.
e.g. I cannot reproduce the failures on a i386 chroot locally.

#998097#13
Date:
2022-09-02 20:30:46 UTC
From:
To:
Hello,

Bug #998097 in ruby-eventmachine reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/ruby-team/ruby-eventmachine/-/commit/32a494c56ff57e33f963e4642e6ae949fe926f86

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/998097

#998097#20
Date:
2022-09-02 21:07:05 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
ruby-eventmachine, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 998097@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Lucas Kanashiro <kanashiro@debian.org> (supplier of updated ruby-eventmachine package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 02 Sep 2022 17:20:43 -0300
Source: ruby-eventmachine
Architecture: source
Version: 1.3~pre20201020-b50c135-6
Distribution: unstable
Urgency: medium
Maintainer: Debian Ruby Team <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
Changed-By: Lucas Kanashiro <kanashiro@debian.org>
Closes: 998097
Changes:
 ruby-eventmachine (1.3~pre20201020-b50c135-6) unstable; urgency=medium
 .
   * Team upload.
   * Add patch to skip tests which require non-empty resolv.conf
     (Closes: #998097).
   * Declare compliance with Debian Policy 4.6.1.
Checksums-Sha1:
 fd2edca1ddf204ad3dffd56dc00766146467d44a 2371 ruby-eventmachine_1.3~pre20201020-b50c135-6.dsc
 f0d133d9ea988c846fe6c295819ec18c9ce5595a 14380 ruby-eventmachine_1.3~pre20201020-b50c135-6.debian.tar.xz
Checksums-Sha256:
 e145198268974a62818f6dcfa6e62defd70a619f905a7e778cd251904c35d27a 2371 ruby-eventmachine_1.3~pre20201020-b50c135-6.dsc
 ca08b6f46be3d0ccdf32b09a5365d7accdb03d20323070b8b55a35e7e8e00a6d 14380 ruby-eventmachine_1.3~pre20201020-b50c135-6.debian.tar.xz
Files:
 e22f82c2fcdaf74a07f5667ac5108770 2371 ruby optional ruby-eventmachine_1.3~pre20201020-b50c135-6.dsc
 599cbdf844b9b77f24b22f6d910458c0 14380 ruby optional ruby-eventmachine_1.3~pre20201020-b50c135-6.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEjtbD+LrJ23/BMKhw+COicpiDyXwFAmMSZ64VHGthbmFzaGly
b0BkZWJpYW4ub3JnAAoJEPgjonKYg8l820MQALTcQwBLtNDcoGPHVXQ48Eal4CjS
w08E4gS6NZ8VIPLCNxwjspJ1H98yDoWwUcntteb11EpWAmopWFn8rea4wgw+CRVY
4D/xJgl75VSua79QWt9H5IS91/5mTlEo8X0mENkk61ZaVNYwcleUZ5Sxj2/XSlTw
cu5ljD+9B9Y/M581gCHCQmewKvHfQidAAw9aoSHENcVO2mX/9AOTEge9I6O7gU3O
kGHKzGiGOnDZfLW4NFhQ0HnD7Y8Co1FOncqJAFUvH8HDDVeGDYTd6UN8QG/x6561
2kSAbiTaimmMBENCTgRUgfxZ/IAPP2gAsIkVvFXpFJYiiI87XdxThSCVdevWk89c
iY75D8xxUBkrcNbnz7iDyAm7h9g8/aS7dhnVZbnhGLpSN/7AQRCbUyqbaWmHYa+/
DrhmHoK2m58JUb3/4Aunl7rxYUIspGxAjKJWgf49F243zrGCgCci8Xx2n2x5AwAN
zTUhOlCpMKPRxw/g015J5Fn2vMJ0RW4KA5PxwnllIHMY90BwjmFuXBSyXayxve9D
wlleK6JZJdeCMDCHVtZ5KWlasdNlgD1b9QLbnX/6mwN3BSw5U8nQS3yi1sb8S9Qg
8QIcr+SiVbIQa5ghL/hzyYQDiNo9NihkWwqN9DyLSoSFHKuFQxdifmzfV7530leW
yrXhmdrPF3BmZ7ie
=YKFG
-----END PGP SIGNATURE-----

#998097#36
Date:
2022-12-31 14:03:13 UTC
From:
To:
retitle 855931 ruby-eventmachine: FTBFS due to hanging flaky tests
found 855931 1.3~pre20220315-df4ab006-3
retitle 998097 ruby-eventmachine: FTBFS on IPV6-only buildds
thanks

Hi,

Also, this package has had it's share of FTBFS bugs due to failing
tests, so I wonder if this should be fixed with wack-a-mole or if it's
better to disable the test suite. I tried to make sense of the different
failures to fix bug 998097, but there have been so many tries to fix or
disable several tests that I couldn't make sense of it in the time I
spent on it. I have the feeling that some of the timeout issues are due
to the test suite not properly cleaning up if one test fails and than
hanging later on.

For documentation purposes, at least I got this from archeology (all but
test_kb.rb pass on my system):
  disabled_tests= [
+  # has a tast that (sometimes?) seems to hang
    'tests/test_exc.rb',
+  # some tests requiring network access
    'tests/test_get_sock_opt.rb',
+  # several tests need internet (google.com)
    'tests/test_httpclient2.rb',
+  # several tests need internet (google.com)
    'tests/test_httpclient.rb',
+  # some tests requiring network access
    'tests/test_idle_connection.rb',
+  # mips sometimes too slow
    'tests/test_inactivity_timeout.rb',
+  # error: terminate called after throwing an instance of
'std::runtime_error' what(): unable to add new descriptor: Operation not
permitted
    'tests/test_kb.rb',
+  # one test needs internet (192.0.2.0)
    'tests/test_pending_connect_timeout.rb',
+  # several tests need internet
    'tests/test_resolver.rb',
+  # some tests requiring network access
    'tests/test_set_sock_opt.rb',
+  # one test needs internet (192.0.2.0)
    'tests/test_unbind_reason.rb',
  ]

https://buildd.debian.org/status/fetch.php?pkg=ruby-eventmachine&arch=amd64&ver=1.3%7Epre20220315-df4ab006-3&stamp=1665953644&raw=0

TestConnectionCount:
   test_idle_connection_count:				.: (0.000488)
   test_idle_connection_count_epoll:			.: (0.000377)
   test_idle_connection_count_kqueue:			.: (0.000320)
   test_num_close_scheduled:				.: (0.000794)
   test_with_some_connections:				.: (0.001581)
TestConnectionWrite:
   test_with_naughty_callback:				.: (0.000710)
TestDefer:
   test_defers:
E: Build killed with signal TERM after 150 minutes of inactivity


https://buildd.debian.org/status/fetch.php?pkg=ruby-eventmachine&arch=i386&ver=1.3%7Epre20201020-b50c135-4%2Bb1&stamp=1635553347&raw=0

TestConnectionCount:
   test_idle_connection_count:				.: (0.000292)
   test_idle_connection_count_epoll:			.: (0.000344)
   test_idle_connection_count_kqueue:			.: (0.000234)
   test_num_close_scheduled:				.: (0.000539)
   test_with_some_connections:				.: (0.001199)
TestConnectionWrite:
   test_with_naughty_callback:				.: (0.000396)
TestDefer:
   test_defers:
E: Build killed with signal TERM after 150 minutes of inactivity


https://buildd.debian.org/status/fetch.php?pkg=ruby-eventmachine&arch=s390x&ver=1.2.7-1%7Eexp1&stamp=1546537666&raw=0

TestSockOpt:
   test_get_sock_opt:					.: (0.000343)
   test_set_sock_opt:					.: (0.000254)
TestSomeExceptions:
   test_a:						.: (0.000130)
   test_b:						.: (0.000072)
   test_exception_on_unbind:
E: Build killed with signal TERM after 150 minutes of inactivity


Non release architectures:
alpha seems to suffer a lot from this, one example

https://buildd.debian.org/status/fetch.php?pkg=ruby-eventmachine&arch=alpha&ver=1.0.7-4.2&stamp=1544037015&raw=0


TestConnectionCount:
   test_idle_connection_count:				.: (0.000977)
   test_num_close_scheduled:				.: (15.075295)
   test_with_some_connections:
E: Build killed with signal TERM after 150 minutes of inactivity


https://buildd.debian.org/status/fetch.php?pkg=ruby-eventmachine&arch=hppa&ver=1.3%7Epre20220315-df4ab006-3&stamp=1666020944&raw=0

   test_attach_pipe:					E
===============================================================================
Error: test_attach_pipe(TestAttach): Errno::E111: Unknown error 111 -
connect(2) for "127.0.0.1" port 486688568
/<<PKGBUILDDIR>>/tests/em_test_helper.rb:51:in `initialize'
/<<PKGBUILDDIR>>/tests/em_test_helper.rb:51:in `new'
/<<PKGBUILDDIR>>/tests/em_test_helper.rb:51:in `port_in_use?'
/<<PKGBUILDDIR>>/tests/em_test_helper.rb:62:in `next_port'
/<<PKGBUILDDIR>>/tests/test_attach.rb:32:in `setup'
===============================================================================/<<PKGBUILDDIR>>/tests/test_attach.rb:38:
warning: global variable `$r' not initialized
/<<PKGBUILDDIR>>/tests/test_attach.rb:38: warning: global variable `$w'
not initialized

: (19373.112091)
   test_attach_server:
E: Build killed with signal TERM after 600 minutes of inactivity


https://buildd.debian.org/status/fetch.php?pkg=ruby-eventmachine&arch=sparc64&ver=1.3%7Epre2019019-g8f7e128-1%7Eexp2&stamp=1548244484&raw=0

===============================================================================
Error: test_any_with_external_client_tlsv1_2(TestSSLProtocols):
OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0
state=SSLv3/TLS write finished
/<<PKGBUILDDIR>>/tests/test_ssl_protocols.rb:128:in `connect'
/<<PKGBUILDDIR>>/tests/test_ssl_protocols.rb:128:in `block (2 levels) in
external_client'
/<<PKGBUILDDIR>>/debian/ruby-eventmachine/usr/lib/ruby/vendor_ruby/eventmachine.rb:1078:in
`block in spawn_threadpool'
===============================================================================
E
===============================================================================
Error: test_any_with_external_client_tlsv1_2(TestSSLProtocols):
OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0
state=SSLv3/TLS write finished
/<<PKGBUILDDIR>>/tests/test_ssl_protocols.rb:128:in `connect'
/<<PKGBUILDDIR>>/tests/test_ssl_protocols.rb:128:in `block (2 levels) in
external_client'
/<<PKGBUILDDIR>>/debian/ruby-eventmachine/usr/lib/ruby/vendor_ruby/eventmachine.rb:1078:in
`block in spawn_threadpool'
===============================================================================
: (0.112230)
   test_any_with_external_client_tlsv1_3:
E: Build killed with signal TERM after 600 minutes of inactivity


Paul

#998097#43
Date:
2025-02-14 20:22:02 UTC
From:
To:
Hi,

Ping.


The last couple of uploads seem to have gone reasonably well. Should we
go ahead with the above, or close this bug? (trixie freeze is coming up).

Paul

#998097#48
Date:
2025-05-03 06:28:20 UTC
From:
To:
Hi,

I set up an IPv6-only Proxmox LXC container and tested building
|ruby-eventmachine| multiple times. All builds completed successfully.

Attaching the log with this mail.