ruby / ruby/drb

Failures in test suite running on JRuby

Open
#36 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
226
Forks
28
Avg merge
7m
Merged PRs (30d)
1

Description

There are a few failures during the test suite on JRuby. We will want to investigate them so we can get JRuby into CI.

Some of these may be expected failures due to behavioral differences on JRuby, like concurrency and GC differences.

  • ArgumentError in test_bug16634: https://github.com/jruby/jruby/issues/8798

  • Connection closed during test_05_break and test_07_break_18. If these are intermittent they may be a thread race or other concurrency-related failure.

Error: test_05_break(DRbTests::TestDRbAry): DRb::DRbConnError: connection closed
/Users/headius/work/drb/lib/drb/drb.rb:613:in 'load'
/Users/headius/work/drb/lib/drb/drb.rb:668:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:970:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:1353:in 'send_message'
/Users/headius/work/drb/lib/drb/drb.rb:1172:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1331:in 'open'
/Users/headius/work/drb/lib/drb/drb.rb:1171:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1190:in 'with_friend'
/Users/headius/work/drb/lib/drb/drb.rb:1170:in 'method_missing'
/Users/headius/work/drb/test/drb/drbtest.rb:366:in 'test_05_break'
     363: 
     364:   def test_05_break
     365:     ary = []
  => 366:     @there.each do |x|
     367:       ary.push x
     368:       break if x == 4
     369:     end

Error: test_07_break_18(DRbTests::TestDRbAry): DRb::DRbConnError: connection closed
/Users/headius/work/drb/lib/drb/drb.rb:613:in 'load'
/Users/headius/work/drb/lib/drb/drb.rb:668:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:970:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:1353:in 'send_message'
/Users/headius/work/drb/lib/drb/drb.rb:1172:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1331:in 'open'
/Users/headius/work/drb/lib/drb/drb.rb:1171:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1190:in 'with_friend'
/Users/headius/work/drb/lib/drb/drb.rb:1170:in 'method_missing'
(eval at /Users/headius/work/drb/test/drb/drbtest.rb:382):3:in 'test_07_break_18'

Error: test_05_break(DRbTests::TestDRbSafe1): DRb::DRbConnError: connection closed
/Users/headius/work/drb/lib/drb/drb.rb:613:in 'load'
/Users/headius/work/drb/lib/drb/drb.rb:668:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:970:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:1353:in 'send_message'
/Users/headius/work/drb/lib/drb/drb.rb:1172:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1331:in 'open'
/Users/headius/work/drb/lib/drb/drb.rb:1171:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1196:in 'with_friend'
/Users/headius/work/drb/lib/drb/drb.rb:1170:in 'method_missing'
/Users/headius/work/drb/test/drb/drbtest.rb:366:in 'test_05_break'
     363: 
     364:   def test_05_break
     365:     ary = []
  => 366:     @there.each do |x|
     367:       ary.push x
     368:       break if x == 4
     369:     end

Error: test_07_break_18(DRbTests::TestDRbSafe1): DRb::DRbConnError: connection closed
/Users/headius/work/drb/lib/drb/drb.rb:613:in 'load'
/Users/headius/work/drb/lib/drb/drb.rb:668:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:970:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:1353:in 'send_message'
/Users/headius/work/drb/lib/drb/drb.rb:1172:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1331:in 'open'
/Users/headius/work/drb/lib/drb/drb.rb:1171:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1196:in 'with_friend'
/Users/headius/work/drb/lib/drb/drb.rb:1170:in 'method_missing'
(eval at /Users/headius/work/drb/test/drb/drbtest.rb:382):3:in 'test_07_break_18'

Error: test_05_break(DRbTests::TestDRbUNIXAry): DRb::DRbConnError: connection closed
/Users/headius/work/drb/lib/drb/drb.rb:613:in 'load'
/Users/headius/work/drb/lib/drb/drb.rb:668:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:970:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:1353:in 'send_message'
/Users/headius/work/drb/lib/drb/drb.rb:1172:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1331:in 'open'
/Users/headius/work/drb/lib/drb/drb.rb:1171:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1196:in 'with_friend'
/Users/headius/work/drb/lib/drb/drb.rb:1170:in 'method_missing'
/Users/headius/work/drb/test/drb/drbtest.rb:366:in 'test_05_break'
     363: 
     364:   def test_05_break
     365:     ary = []
  => 366:     @there.each do |x|
     367:       ary.push x
     368:       break if x == 4
     369:     end

Error: test_07_break_18(DRbTests::TestDRbUNIXAry): DRb::DRbConnError: connection closed
/Users/headius/work/drb/lib/drb/drb.rb:613:in 'load'
/Users/headius/work/drb/lib/drb/drb.rb:668:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:970:in 'recv_reply'
/Users/headius/work/drb/lib/drb/drb.rb:1353:in 'send_message'
/Users/headius/work/drb/lib/drb/drb.rb:1172:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1331:in 'open'
/Users/headius/work/drb/lib/drb/drb.rb:1171:in 'block in method_missing'
/Users/headius/work/drb/lib/drb/drb.rb:1196:in 'with_friend'
/Users/headius/work/drb/lib/drb/drb.rb:1170:in 'method_missing'
(eval at /Users/headius/work/drb/test/drb/drbtest.rb:382):3:in 'test_07_break_18'
  • Oddity in reported name from a remote object (I think?):
Failure: test_02_unknown(DRbTests::TestDRbCore)
/Users/headius/work/drb/test/drb/drbtest.rb:177:in 'test_02_unknown'
     174: 
     175:     obj = @there.unknown_module
     176:     assert_kind_of(DRb::DRbUnknown, obj)
  => 177:     assert_equal('DRbTests::DRbEx::', obj.name)
     178: 
     179:     assert_raise(DRb::DRbUnknownError) do
     180:       @there.unknown_error
org/jruby/RubyKernel.java:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyKernel.java:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
<"DRbTests::DRbEx::"> expected but was
<"DRbTests::DRbEx::FooBar">
  • Missing method on a remote object?
Failure: test_11_remote_no_method_error(DRbTests::TestDRbCore): [DRb::DRbRemoteError] exception expected, not #<NoMethodError: undefined method 'invoke_no_method' for an instance of DRbTests::DRbEx>.
/Users/headius/work/jruby/lib/ruby/gems/shared/bundler/gems/test-unit-ruby-core-04bbdf8d1f83/lib/core_assertions.rb:454:in 'block in assert_raise'
/Users/headius/work/jruby/lib/ruby/gems/shared/bundler/gems/test-unit-ruby-core-04bbdf8d1f83/lib/core_assertions.rb:540:in 'assert'
/Users/headius/work/jruby/lib/ruby/gems/shared/bundler/gems/test-unit-ruby-core-04bbdf8d1f83/lib/core_assertions.rb:453:in 'assert_raise'
/Users/headius/work/drb/test/drb/drbtest.rb:313:in 'test_11_remote_no_method_error'
     310:   end
     311: 
     312:   def test_11_remote_no_method_error
  => 313:     assert_raise(DRb::DRbRemoteError) do
     314:       @there.remote_no_method_error
     315:     end
     316:     begin

Failure: test_11_remote_no_method_error(DRbTests::TestDRbUNIXCore): [DRb::DRbRemoteError] exception expected, not #<NoMethodError: undefined method 'invoke_no_method' for an instance of DRbTests::DRbEx>.
/Users/headius/work/jruby/lib/ruby/gems/shared/bundler/gems/test-unit-ruby-core-04bbdf8d1f83/lib/core_assertions.rb:454:in 'block in assert_raise'
/Users/headius/work/jruby/lib/ruby/gems/shared/bundler/gems/test-unit-ruby-core-04bbdf8d1f83/lib/core_assertions.rb:540:in 'assert'
/Users/headius/work/jruby/lib/ruby/gems/shared/bundler/gems/test-unit-ruby-core-04bbdf8d1f83/lib/core_assertions.rb:453:in 'assert_raise'
/Users/headius/work/drb/test/drb/drbtest.rb:313:in 'test_11_remote_no_method_error'
     310:   end
     311: 
     312:   def test_11_remote_no_method_error
  => 313:     assert_raise(DRb::DRbRemoteError) do
     314:       @there.remote_no_method_error
     315:     end
     316:     begin

  • Several SSL-related tests (basically everything in DRbTests::TestDRbSSLCore) fail with certificate verify failed but I'm not sure if this is a bug or some misconfiguration in JRuby's openssl support. A server in a separate thread crashes as a result and these tests then time out waiting for the server to respond.
warning: thread "Ruby-0-Thread-1: /Users/headius/work/drb/lib/drb/drb.rb:1584" terminated with exception (report_on_exception is true):NoMethodError: undefined method 'include?' for nil
  accept_or_shutdown at /Users/headius/work/drb/lib/drb/drb.rb:1016
              accept at /Users/headius/work/drb/lib/drb/ssl.rb:334
           main_loop at /Users/headius/work/drb/lib/drb/drb.rb:1743
                 run at /Users/headius/work/drb/lib/drb/drb.rb:1586
DRb::DRbConnError: drbssl://localhost:52295 - #<OpenSSL::SSL::SSLError: certificate verify failed>
             open at /Users/headius/work/drb/lib/drb/drb.rb:772
             each at org/jruby/RubyArray.java:2079
             open at /Users/headius/work/drb/lib/drb/drb.rb:765
       initialize at /Users/headius/work/drb/lib/drb/drb.rb:1347
              new at org/jruby/RubyClass.java:1023
             open at /Users/headius/work/drb/lib/drb/drb.rb:1330
   method_missing at /Users/headius/work/drb/lib/drb/drb.rb:1171
      with_friend at /Users/headius/work/drb/lib/drb/drb.rb:1190
   method_missing at /Users/headius/work/drb/lib/drb/drb.rb:1170
       initialize at /Users/headius/work/drb/lib/drb/extserv.rb:21
      synchronize at org/jruby/ext/monitor/Monitor.java:85
  mon_synchronize at /Users/headius/work/jruby/lib/ruby/stdlib/monitor.rb:206
       initialize at /Users/headius/work/drb/lib/drb/extserv.rb:20
              new at org/jruby/RubyClass.java:1050
           <main> at /Users/headius/work/drb/test/drb/ut_array_drbssl.rb:39

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the JRuby failures in test/drb/drbtest.rb and test/drb/ut_array_drbssl.rb, then trace the reported paths through lib/drb/drb.rb and lib/drb/ssl.rb. Compare each failure with the referenced tests and JRuby issue to separate expected behavioral differences from defects or configuration problems. Done means the failures are explained and either fixed, justified, or excluded from JRuby CI with documented reasoning.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
distributed-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.