Bug#1058703: getsockopt test failures in JRuby on aarch64

Jérôme Charaoui jerome at riseup.net
Thu Dec 14 21:04:56 GMT 2023


Package: libjffi-jni
Version: 1.3.12+ds-1
Severity: normal

Hello,

I'm encountering unexpected failures when running the JRuby testsuite on 
aarch64 with libjffi-jni_1.3.12+ds-1:

===============================================================================
Failure: test_tcp_info(SocketTest) 
 

/tmp/autopkgtest.LCcGF4/autopkgtest_tmp/test/jruby/test_socket.rb:60:in 
`block in test_tcp_info' 

      57:           t.join 
 

      58:           tcp_info = client.getsockopt(Socket::IPPROTO_TCP, 
Socket::TCP_INFO) 

      59:           state = tcp_info.unpack("C")[0] 
 

   => 60:           assert_equal(8, state) # CLOSE_WAIT 
 

      61:         ensure 
 

      62:           server.close if server && !server.closed? 
 

      63:         end 
 

/tmp/autopkgtest.LCcGF4/autopkgtest_tmp/test/jruby/test_socket.rb:49:in 
`test_tcp_info'
org/jruby/RubyKernel.java:1308:in `catch'
org/jruby/RubyKernel.java:1303:in `catch'
org/jruby/RubyKernel.java:1308:in `catch'
org/jruby/RubyKernel.java:1303:in `catch'
<8> expected but was
<nil>
===============================================================================
..E
===============================================================================
Error: test_tcp_socket_get_keep_cnt(SocketTest): TypeError: size differ. 
  expected as sizeof(int)=4 but 0
org/jruby/ext/socket/Option.java:201:in `int'
/tmp/autopkgtest.LCcGF4/autopkgtest_tmp/test/jruby/test_socket.rb:197:in 
`test_tcp_socket_get_keep_cnt'
      194:
      195:     def test_tcp_socket_get_keep_cnt
      196:       socket = Socket.new(Socket::AF_INET, 
Socket::SOCK_STREAM, 0)
   => 197:       assert_instance_of(Integer, 
socket.getsockopt(Socket::SOL_TCP, Socket::TCP_KEEPCNT).int)
      198:     ensure
      199:       socket.close
      200:     end
org/jruby/RubyKernel.java:1308:in `catch'
org/jruby/RubyKernel.java:1303:in `catch'
org/jruby/RubyKernel.java:1308:in `catch'
org/jruby/RubyKernel.java:1303:in `catch'
===============================================================================
E
===============================================================================
Error: test_tcp_socket_get_keep_idle(SocketTest): TypeError: size 
differ.  expected as sizeof(int)=4 but 0
org/jruby/ext/socket/Option.java:201:in `int'
/tmp/autopkgtest.LCcGF4/autopkgtest_tmp/test/jruby/test_socket.rb:183:in 
`test_tcp_socket_get_keep_idle'
      180:   if RbConfig::CONFIG['target_os'] == 'linux'
      181:     def test_tcp_socket_get_keep_idle
      182:       socket = Socket.new(Socket::AF_INET, 
Socket::SOCK_STREAM, 0)
   => 183:       assert_instance_of(Integer, 
socket.getsockopt(Socket::SOL_TCP, Socket::TCP_KEEPIDLE).int)
      184:     ensure
      185:       socket.close
      186:     end
org/jruby/RubyKernel.java:1308:in `catch'
org/jruby/RubyKernel.java:1303:in `catch'
org/jruby/RubyKernel.java:1308:in `catch'
org/jruby/RubyKernel.java:1303:in `catch'
===============================================================================
E
===============================================================================
Error: test_tcp_socket_get_keep_intvl(SocketTest): TypeError: size 
differ.  expected as sizeof(int)=4 but 0
org/jruby/ext/socket/Option.java:201:in `int'
/tmp/autopkgtest.LCcGF4/autopkgtest_tmp/test/jruby/test_socket.rb:190:in 
`test_tcp_socket_get_keep_intvl'
      187:
      188:     def test_tcp_socket_get_keep_intvl
      189:       socket = Socket.new(Socket::AF_INET, 
Socket::SOCK_STREAM, 0)
   => 190:       assert_instance_of(Integer, 
socket.getsockopt(Socket::SOL_TCP, Socket::TCP_KEEPINTVL).int)
      191:     ensure
      192:       socket.close
      193:     end
===============================================================================

These failures are *not* present when running the testsuite with 
libjffi-jni_1.3.9+ds-6 shipped in bookworm, nor with the upstream-built 
1.3.12 binary version of this library.

I'm not sure but I suspect maybe some element deeper in the build chain 
changed between bookworm and sid, causing these new issues.

These tests pass fine on amd64.

Thanks,

-- Jérôme



More information about the pkg-java-maintainers mailing list