Skip to content

Jruby crashes intermittently right before coverage generation #5882

@deivid-rodriguez

Description

@deivid-rodriguez

Environment

The following is my local environment information, but CI information (where the crash happened should be the same).

$ jruby -v
jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 11.0.4+11-post-Ubuntu-1ubuntu218.04.3 on 11.0.4+11-post-Ubuntu-1ubuntu218.04.3 [linux-x86_64]

$ echo $JRUBY_OPTS 
--dev --debug -J-Xmx1024m

$ uname -a
Linux chaba 5.0.0-25-generic #26~18.04.1-Ubuntu SMP Thu Aug 1 13:51:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Crash happens in activeadmin's test suite, have only seen it once on activeadmin/activeadmin#5858, but without that PR, the behavior is that sometimes jruby hangs right before coverage report generation (instead of crashing).

This is the log of the crash: https://circleci.com/gh/activeadmin/activeadmin/22252, where a backtrace can be seen:

Unhandled Java exception: java.lang.NullPointerException
java.lang.NullPointerException: null
   commonYieldPath at org/jruby/runtime/InterpretedIRBlockBody.java:127
           doYield at org/jruby/runtime/IRBlockBody.java:187
             yield at org/jruby/runtime/BlockBody.java:116
             yield at org/jruby/runtime/Block.java:170
      detectCommon at org/jruby/RubyArray.java:4756
              find at org/jruby/RubyArray.java:4729
            detect at org/jruby/RubyEnumerable.java:634
              call at org/jruby/RubyEnumerable$INVOKER$s$detect_DBG.gen:-1
              call at org/jruby/internal/runtime/methods/JavaMethod.java:575
      cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:332
              call at org/jruby/runtime/callsite/CachingCallSite.java:86
          callIter at org/jruby/runtime/callsite/CachingCallSite.java:93
         interpret at org/jruby/ir/instructions/CallBase.java:537
       processCall at org/jruby/ir/interpreter/InterpreterEngine.java:361
         interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:72
         interpret at org/jruby/ir/interpreter/InterpreterEngine.java:80
  INTERPRET_METHOD at org/jruby/internal/runtime/methods/InterpretedIRMethod.java:153
              call at org/jruby/internal/runtime/methods/InterpretedIRMethod.java:140
              call at org/jruby/runtime/callsite/CachingCallSite.java:141
       processCall at org/jruby/ir/interpreter/InterpreterEngine.java:345
         interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:72
  INTERPRET_METHOD at org/jruby/internal/runtime/methods/InterpretedIRMethod.java:115
              call at org/jruby/internal/runtime/methods/InterpretedIRMethod.java:94
      cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:332
              call at org/jruby/runtime/callsite/CachingCallSite.java:86
         interpret at org/jruby/ir/instructions/CallBase.java:540
       processCall at org/jruby/ir/interpreter/InterpreterEngine.java:361
         interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:72
  INTERPRET_METHOD at org/jruby/internal/runtime/methods/InterpretedIRMethod.java:115
              call at org/jruby/internal/runtime/methods/InterpretedIRMethod.java:94
      cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:332
              call at org/jruby/runtime/callsite/CachingCallSite.java:86
         interpret at org/jruby/ir/instructions/CallBase.java:540
       processCall at org/jruby/ir/interpreter/InterpreterEngine.java:361
         interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:72
   INTERPRET_BLOCK at org/jruby/ir/interpreter/Interpreter.java:114
   commonYieldPath at org/jruby/runtime/InterpretedIRBlockBody.java:137
           doYield at org/jruby/runtime/IRBlockBody.java:187
             yield at org/jruby/runtime/BlockBody.java:116
             yield at org/jruby/runtime/Block.java:170
             yield at org/jruby/ir/runtime/IRRuntimeHelpers.java:477
         interpret at org/jruby/ir/instructions/YieldInstr.java:85
    processOtherOp at org/jruby/ir/interpreter/StartupInterpreterEngine.java:178
         interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:104
   INTERPRET_BLOCK at org/jruby/ir/interpreter/Interpreter.java:114
   commonYieldPath at org/jruby/runtime/InterpretedIRBlockBody.java:137
              call at org/jruby/runtime/IRBlockBody.java:79
              call at org/jruby/runtime/Block.java:129
              call at org/jruby/RubyProc.java:295
              call at org/jruby/RubyProc.java:274
              call at org/jruby/RubyProc.java:266
              call at org/jruby/RubyProc$INVOKER$i$0$0$call_DBG.gen:-1
      cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:332
              call at org/jruby/runtime/callsite/CachingCallSite.java:86
         interpret at org/jruby/ir/instructions/CallBase.java:540
       processCall at org/jruby/ir/interpreter/InterpreterEngine.java:361
         interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:72
  INTERPRET_METHOD at org/jruby/internal/runtime/methods/InterpretedIRMethod.java:115
              call at org/jruby/internal/runtime/methods/InterpretedIRMethod.java:94
      cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:332
              call at org/jruby/runtime/callsite/CachingCallSite.java:86
         interpret at org/jruby/ir/instructions/CallBase.java:540
       processCall at org/jruby/ir/interpreter/InterpreterEngine.java:361
         interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:72
   INTERPRET_BLOCK at org/jruby/ir/interpreter/Interpreter.java:114
   commonYieldPath at org/jruby/runtime/InterpretedIRBlockBody.java:137
     yieldSpecific at org/jruby/runtime/IRBlockBody.java:89
     yieldSpecific at org/jruby/runtime/Block.java:139
     yieldSpecific at org/jruby/ir/runtime/IRRuntimeHelpers.java:481
         interpret at org/jruby/ir/instructions/YieldInstr.java:76
    processOtherOp at org/jruby/ir/interpreter/StartupInterpreterEngine.java:178
         interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:104
  INTERPRET_METHOD at org/jruby/internal/runtime/methods/InterpretedIRMethod.java:115
              call at org/jruby/internal/runtime/methods/InterpretedIRMethod.java:94
      cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:332
              call at org/jruby/runtime/callsite/CachingCallSite.java:86
          callIter at org/jruby/runtime/callsite/CachingCallSite.java:93
         interpret at org/jruby/ir/instructions/CallBase.java:537
       processCall at org/jruby/ir/interpreter/InterpreterEngine.java:361
         interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:72
   INTERPRET_BLOCK at org/jruby/ir/interpreter/Interpreter.java:114
   commonYieldPath at org/jruby/runtime/InterpretedIRBlockBody.java:137
           doYield at org/jruby/runtime/IRBlockBody.java:187
             yield at org/jruby/runtime/BlockBody.java:116
             yield at org/jruby/runtime/Block.java:170
             yield at org/jruby/ir/runtime/IRRuntimeHelpers.java:477
         interpret at org/jruby/ir/instructions/YieldInstr.java:85
    processOtherOp at org/jruby/ir/interpreter/StartupInterpreterEngine.java:178
         interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:104
   INTERPRET_BLOCK at org/jruby/ir/interpreter/Interpreter.java:114
   commonYieldPath at org/jruby/runtime/InterpretedIRBlockBody.java:137
              call at org/jruby/runtime/IRBlockBody.java:79
              call at org/jruby/runtime/Block.java:129
              call at org/jruby/RubyProc.java:295
              call at org/jruby/RubyProc.java:274
              call at org/jruby/RubyProc.java:270
               run at org/jruby/internal/runtime/RubyRunnable.java:105
               run at java/lang/Thread.java:748

Expected Behavior

Jruby doesn't crash nor hangs.

Actual Behavior

Jruby hangs intermittently (with simplecov 0.17.0), or crashes intermittenly (with simplecov 0.17.1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions