JDK-6990587 : JRuby test/test_rexml_document.rb fails with NPE on SPARC
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs20
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2010-10-08
  • Updated: 2012-02-01
  • Resolved: 2011-04-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7Resolved
Related Reports
Duplicate :  
Relates :  
Description
I think the NPE is just coincidence.

$ bin/jruby.indy -J-XX:+UseSerialGC test/test_rexml_document.rb
gamma is /export/twisti/hotspot-comp/hotspot/build/solaris_sparc_compiler2/fastdebug/gamma
java version "1.7.0-ea-fastdebug"
Java(TM) SE Runtime Environment (build 1.7.0-ea-fastdebug-b111)
OpenJDK Server VM (build 20.0-b01-internal-fastdebug, mixed mode)
OpenJDK Server VM (20.0-b01-internal-fastdebug) for solaris-sparc JRE (1.7.0), built on Oct  7 2010 06:40:38 by "ct232829" with Sun Studio 12u1
gamma -Djruby.memory.max=500m -Djruby.stack.max=1024k -Djruby.compile.invokedynamic=true -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic -Xmx500m -Xss1024k -Djffi.boot.library.path=./lib/native/sparc-SunOS:./lib/native/sparcv9-SunOS -XX:+UseSerialGC -Xbootclasspath/a:./lib/jruby.jar -classpath ./lib/profile.jar: -Djruby.home=. -Djruby.lib=./lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main test/test_rexml_document.rb
VM option '+UnlockExperimentalVMOptions'
VM option '+EnableMethodHandles'
VM option '+EnableInvokeDynamic'
VM option '+UseSerialGC'
Loaded suite test/test_rexml_document
Started
E.
Finished in 39.261 seconds.

  1) Error:
test_entity_expansion_limit(TestRexmlDocument):
REXML::ParseException: #<REXML::ParseException: java.lang.NullPointerException
ruby.jit.match_C68C412E93A504F03A3CBA42B13990AAA32E83EB.__file__(source.rb:105)
ruby.jit.match_C68C412E93A504F03A3CBA42B13990AAA32E83EB.__file__(source.rb)
org.jruby.ast.executable.AbstractScript.__file__(AbstractScript.java:43)
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:187)
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:188)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:190)
<snip>

Comments
EVALUATION This appears to be the same bug as 7009361. A temporary fix to that bug made this bug disappear and the symptoms are similar so I'm closing it as a duplicate.
21-04-2011

PUBLIC COMMENTS This one still fails with a current JRuby version.
18-02-2011

EVALUATION Finally I could get a stacktrace: 1 - frame( sp=0xffbf7f98, unextended_sp=0xffbf7f98, fp=0xffbf7fe0, pc=0xfb4e1e48) org.jruby.runtime.invokedynamic.InvokeDynamicSupport.fallback(InvokeDynamicSupport.java:109) 2 - frame( sp=0xffbf7fe0, unextended_sp=0xffbf7fe0, fp=0xffbf8080, pc=0xfb407028) ruby.jit.match_C68C412E93A504F03A3CBA42B13990AAA32E83EB.__file__(source.rb:105) 3 - frame( sp=0xffbf8080, unextended_sp=0xffbf8088, fp=0xffbf8110, pc=0xfb406490) ruby.jit.match_C68C412E93A504F03A3CBA42B13990AAA32E83EB.__file__ 4 - frame( sp=0xffbf8110, unextended_sp=0xffbf8110, fp=0xffbf81a0, pc=0xfb406490) org.jruby.ast.executable.AbstractScript.__file__(AbstractScript.java:43) 5 - frame( sp=0xffbf81a0, unextended_sp=0xffbf81a0, fp=0xffbf8230, pc=0xfb407028) org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:187) <snip> So the invokedynamic at bci 95 calls the trapping fallback method.
14-10-2010

EVALUATION Here are the bytecodes for: 136739 2 org.jruby.runtime.invokedynamic.InvokeDynamicSupport::fallback (83 bytes) 0 aload_1 1 aload_3 2 invokestatic 34 <org/jruby/runtime/invokedynamic/InvokeDynamicSupport.pollAndGetClass(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyClass;> 0 bci: 2 CounterData count(11399) 5 astore #6 7 aload #6 9 aload #4 11 invokevirtual 35 <org/jruby/RubyClass.searchWithCache(Ljava/lang/String;)Lorg/jruby/runtime/callsite/CacheEntry;> 8 bci: 11 VirtualCallData count(0) entries(2) 'org/jruby/RubyClass'(9119 0.80) 'org/jruby/MetaClass'(2280 0.20) 14 astore #7 16 aload #7 18 aload_0 19 invokevirtual 36 <org/jruby/runtime/invokedynamic/InvokeDynamicSupport$JRubyCallSite.callType()Lorg/jruby/runtime/CallType;> 32 bci: 19 VirtualCallData count(0) entries(1) 'org/jruby/runtime/invokedynamic/InvokeDynamicSupport$JRubyCallSite'(11399 1.00) 22 aload #4 24 aload_2 25 invokestatic 37 <org/jruby/runtime/invokedynamic/InvokeDynamicSupport.methodMissing(Lorg/jruby/runtime/callsite/CacheEntry;Lorg/jruby/runtime/CallType;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Z> 56 bci: 25 CounterData count(11400) 28 ifeq 47 64 bci: 28 BranchData taken(11400) displacement(48) not taken(0) 31 aload #7 33 aload_0 34 invokevirtual 36 <org/jruby/runtime/invokedynamic/InvokeDynamicSupport$JRubyCallSite.callType()Lorg/jruby/runtime/CallType;> 80 bci: 34 VirtualCallData count(0) entries(0) 37 aload_1 38 aload_3 39 aload #4 41 aload #5 43 invokestatic 45 <org/jruby/runtime/invokedynamic/InvokeDynamicSupport.callMethodMissing(Lorg/jruby/runtime/callsite/CacheEntry;Lorg/jruby/runtime/CallType;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 104 bci: 43 CounterData count(0) 46 areturn 47 aload_0 48 getstatic 46 <org/jruby/runtime/invokedynamic/InvokeDynamicSupport.TEST_1/Ljava/dyn/MethodHandle;> 51 getstatic 47 <org/jruby/runtime/invokedynamic/InvokeDynamicSupport.TARGET_1/Ljava/dyn/MethodHandle;> 54 getstatic 48 <org/jruby/runtime/invokedynamic/InvokeDynamicSupport.FALLBACK_1/Ljava/dyn/MethodHandle;> 57 aload #7 59 aload_0 60 invokestatic 42 <org/jruby/runtime/invokedynamic/InvokeDynamicSupport.createGWT(Ljava/dyn/MethodHandle;Ljava/dyn/MethodHandle;Ljava/dyn/MethodHandle;Lorg/jruby/runtime/callsite/CacheEntry;Lorg/jruby/runtime/invokedynamic/InvokeDynamicSupport$JRubyCallSite;)Ljava/dyn/MethodHandle;> 112 bci: 60 CounterData count(11400) 63 invokevirtual 14 <org/jruby/runtime/invokedynamic/InvokeDynamicSupport$JRubyCallSite.setTarget(Ljava/dyn/MethodHandle;)V> 120 bci: 63 VirtualCallData count(0) entries(1) 'org/jruby/runtime/invokedynamic/InvokeDynamicSupport$JRubyCallSite'(11399 1.00) 66 aload #7 68 getfield 43 <org/jruby/runtime/callsite/CacheEntry.method/Lorg/jruby/internal/runtime/methods/DynamicMethod;> 71 aload_1 72 aload_3 73 aload #6 75 aload #4 77 aload #5 79 invokevirtual 49 <org/jruby/internal/runtime/methods/DynamicMethod.call(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyModule;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 144 bci: 79 VirtualCallData count(0) entries(1) 'org/jruby/RubyObject$i_method_1_0$RUBYINVOKER$kind_of_p'(11399 1.00) 82 areturn
14-10-2010

EVALUATION Printing the same frame as above on i386 shows that the expression stack is correct: 1 - frame( sp=0xbfffb030, unextended_sp=0xbfffb030, fp=0xbfffb058, pc=0x04017534) ruby.jit.match_C68C412E93A504F03A3CBA42B13990AAA32E83EB.__file__(source.rb:105) Interpreted frame (sp=0xbfffb030 unextended sp=0xbfffb030, fp=0xbfffb058, pc=0x04017534) (~invokevirtual 182 invokevirtual [0x040174e0, 0x04017700] 544 bytes ) BufferBlob (0x04002688) used for Interpreter {method} '__file__' '(Lruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;' in 'ruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB'[5,6] bci: 100 locals: 0 a 'ruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB' <0x07527bd8> 1 a 'org/jruby/runtime/ThreadContext' <0x117deb80> 2 a 'org/jruby/RubyObject' <0x074f6d80> 3 a 'org/jruby/runtime/builtin/IRubyObject'[2] <0x07528038> 4 a 'org/jruby/runtime/Block' <0x117dec68> 5 a 'org/jruby/runtime/scope/ThreeVarDynamicScope' <0x07528010> expressions: 0 122847248 (int) 0.000000 (float) 7528010 (hex) 527624912686452992 (long) 2.137378397610966e-273 (double) 0x0752801007529100 (longhex) 1 122851584 (int) 0.000000 (float) 7529100 (hex) (gdb) p findpc(0x7528010) org.jruby.runtime.scope.ThreeVarDynamicScope - klass: 'org/jruby/runtime/scope/ThreeVarDynamicScope' - ---- fields (total size 10 words): - protected final 'staticScope' 'Lorg/jruby/parser/StaticScope;' @8 a 'org/jruby/parser/LocalStaticScope' (11759600) - protected final 'parent' 'Lorg/jruby/runtime/DynamicScope;' @12 NULL - private 'backref' 'Lorg/jruby/runtime/builtin/IRubyObject;' @16 a 'org/jruby/RubyMatchData' (7529100) - private 'lastline' 'Lorg/jruby/runtime/builtin/IRubyObject;' @20 NULL - protected 'evalScope' 'Lorg/jruby/runtime/DynamicScope;' @24 NULL - protected 'variableValueZero' 'Lorg/jruby/runtime/builtin/IRubyObject;' @28 a 'org/jruby/RubyRegexp' (11908f48) - protected 'variableValueOne' 'Lorg/jruby/runtime/builtin/IRubyObject;' @32 a 'org/jruby/RubyBoolean' (117defd0) - protected 'variableValueTwo' 'Lorg/jruby/runtime/builtin/IRubyObject;' @36 NULL (gdb) p findpc(0x7529100) org.jruby.RubyMatchData - klass: 'org/jruby/RubyMatchData' - ---- fields (total size 14 words): - protected 'flags' 'I' @8 128 (80) - protected transient 'metaClass' 'Lorg/jruby/RubyClass;' @12 a 'org/jruby/RubyClass' (11819888) - private volatile 'varTable' '[Ljava/lang/Object;' @16 a 'java/lang/Object'[0] (118121f0) - 'begin' 'I' @20 0 - 'end' 'I' @24 1 - 'charOffsetUpdated' 'Z' @28 false - 'regs' 'Lorg/joni/Region;' @32 a 'org/joni/Region' (75290a0) - 'str' 'Lorg/jruby/RubyString;' @36 a 'org/jruby/RubyString' (7529138) - 'pattern' 'Lorg/joni/Regex;' @40 a 'org/joni/Regex' (1190b180) - 'regexp' 'Lorg/jruby/RubyRegexp;' @44 a 'org/jruby/RubyRegexp' (11908f48) - 'charOffsets' 'Lorg/joni/Region;' @48 NULL
14-10-2010

EVALUATION The expression stack seems to be corrupt (SP not properly restored?): 1 - frame( sp=0xffbf7fe8, unextended_sp=0xffbf7fe8, fp=0xffbf8080, pc=0xfb42ec74) ruby.jit.match_C68C412E93A504F03A3CBA42B13990AAA32E83EB.__file__(source.rb:105) Interpreted frame (sp=0xffbf7fe8 unextended sp=0xffbf7fe8, fp=0xffbf8080, pc=0xfb42ec74) (~invokevirtual 182 invokevirtual [0xfb42ea20, 0xfb42eee0] 1216 bytes ) BufferBlob (0xfb404f88) used for Interpreter {method} '__file__' '(Lruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;' in 'ruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB'[5,6] bci: 100 locals: 0 a 'ruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB' <0xd82d9d40> 1 a 'org/jruby/runtime/ThreadContext' <0xe23f2e00> 2 a 'org/jruby/RubyObject' <0xd82a8948> 3 a 'org/jruby/runtime/builtin/IRubyObject'[2] <0xd82da1a0> 4 a 'org/jruby/runtime/Block' <0xe23f2f18> 5 a 'org/jruby/runtime/scope/ThreeVarDynamicScope' <0xd82da178> expressions: 0 0 (int) 0.000000 (float) 0 (hex) -2869440197026643968 (long) -5.851308545914399e+116 (double) 0xd82db35800000000 (longhex) 1 -668093608 (int) -763943148584960.000000 (float) d82db358 (hex) (dbx) p findpc(0xd82db358) org.jruby.RubyMatchData mark(biased,hash 0,age 0) - klass: 'org/jruby/RubyMatchData' - ---- fields (total size 14 words): - protected 'flags' 'I' @8 128 (80) - protected transient 'metaClass' 'Lorg/jruby/RubyClass;' @12 a 'org/jruby/RubyClass' (e2439c10) - private volatile 'varTable' '[Ljava/lang/Object;' @16 a 'java/lang/Object'[0] (e242e2f0) - 'begin' 'I' @20 0 - 'end' 'I' @24 1 - 'charOffsetUpdated' 'Z' @28 false - 'regs' 'Lorg/joni/Region;' @32 a 'org/joni/Region' (d82db2f8) - 'str' 'Lorg/jruby/RubyString;' @36 a 'org/jruby/RubyString' (d82db390) - 'pattern' 'Lorg/joni/Regex;' @40 a 'org/joni/Regex' (e24362f0) - 'regexp' 'Lorg/jruby/RubyRegexp;' @44 a 'org/jruby/RubyRegexp' (e234ccf0) - 'charOffsets' 'Lorg/joni/Region;' @48 NULL
08-10-2010

EVALUATION Limiting the compiled methods to only org/jruby/runtime/invokedynamic/InvokeDynamicSupport::fallback also triggers the bug. After a couple of uncommon traps (actually 3) the method is "made not entrant" and the bug happens: $ bin/jruby.indy -J-XX:+UseSerialGC -J-XX:CompileCommand=compileonly,org/jruby/runtime/invokedynamic/InvokeDynamicSupport::fallback -J-XX:+PrintCompilation test/test_rexml_document.rbgamma is /export/twisti/hotspot-comp/hotspot/build/solaris_sparc_compiler2/fastdebug/gamma java version "1.7.0-ea-fastdebug" Java(TM) SE Runtime Environment (build 1.7.0-ea-fastdebug-b111) OpenJDK Server VM (build 20.0-b01-internal-fastdebug, mixed mode) OpenJDK Server VM (20.0-b01-internal-fastdebug) for solaris-sparc JRE (1.7.0), built on Oct 7 2010 06:40:38 by "ct232829" with Sun Studio 12u1 gamma -Djruby.memory.max=500m -Djruby.stack.max=1024k -Djruby.compile.invokedynamic=true -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic -Xmx500m -Xss1024k -Djffi.boot.library.path=./lib/native/sparc-SunOS:./lib/native/sparcv9-SunOS -XX:+UseSerialGC -XX:CompileCommand=compileonly,org/jruby/runtime/invokedynamic/InvokeDynamicSupport::fallback -XX:+PrintCompilation -Xbootclasspath/a:./lib/jruby.jar -classpath ./lib/profile.jar: -Djruby.home=. -Djruby.lib=./lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main test/test_rexml_document.rb VM option '+UnlockExperimentalVMOptions' VM option '+EnableMethodHandles' VM option '+EnableInvokeDynamic' VM option '+UseSerialGC' VM option 'CompileCommand=compileonly,org/jruby/runtime/invokedynamic/InvokeDynamicSupport::fallback' VM option '+PrintCompilation' CompilerOracle: compileonly org/jruby/runtime/invokedynamic/InvokeDynamicSupport.fallback Loaded suite test/test_rexml_document Started 20705 1 org.jruby.runtime.invokedynamic.InvokeDynamicSupport::fallback (79 bytes) 59422 2 org.jruby.runtime.invokedynamic.InvokeDynamicSupport::fallback (83 bytes) 226230 2 made not entrant org.jruby.runtime.invokedynamic.InvokeDynamicSupport::fallback (83 bytes) E. Finished in 219.738 seconds. 1) Error: test_entity_expansion_limit(TestRexmlDocument): REXML::ParseException: #<REXML::ParseException: java.lang.NullPointerException <snip> Aborting on the NPE helps to debug the problem: $ bin/jruby.indy -J-XX:+UseSerialGC -J-XX:CompileCommand=compileonly,org/jruby/runtime/invokedynamic/InvokeDynamicSupport::fallback -J-XX:-Inline -J-XX:AbortVMOnException=java.lang.NullPointerException -J-XX:+ShowMessageBoxOnError -J-XX:+TraceDeoptimization -J-XX:+Verbose test/test_rexml_document.rb <snip> Uncommon trap occurred in org.jruby.runtime.invokedynamic.InvokeDynamicSupport::fallback (@0xfb4e1288) thread=1 reason=class_check action=maybe_recompile unloaded_class_index=-1 DEOPT PACKING thread 0x00062c00 Compiled frame (sp=0xffbf8100 unextended sp=0xffbf8100, fp=0xffbf8148, pc=0xfb4e1288) 227576 2 nmethod org.jruby.runtime.invokedynamic.InvokeDynamicSupport::fallback (83 bytes) Virtual frames (innermost first): 0 - frame( sp=0xffbf8100, unextended_sp=0xffbf8100, fp=0xffbf8148, pc=0xfb4e1288, adjustment=0) org.jruby.runtime.invokedynamic.InvokeDynamicSupport.fallback(InvokeDynamicSupport.java:109) - invokevirtual @ bci 79 {method} 'fallback' '(Lorg/jruby/runtime/invokedynamic/InvokeDynamicSupport$JRubyCallSite;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;' in 'org/jruby/runtime/invokedynamic/InvokeDynamicSupport' bci: 79 locals: 0 conflict 1 conflict 2 conflict 3 conflict 4 conflict 5 conflict 6 conflict 7 conflict expressions: 0 a 'org/jruby/RubyRegexp$i_method_1_0$RUBYINVOKER$match_m' <0xe246b640> 1 a 'org/jruby/runtime/ThreadContext' <0xe23f21f8> 2 a 'org/jruby/RubyRegexp' <0xe2344b58> 3 a 'org/jruby/RubyClass' <0xe2431a08> 4 "match" <0xf7507b48> 5 a 'org/jruby/RubyString' <0xd82b2890> Created vframeArray 0x001e1940 DEOPT UNPACKING thread 0x00062c00 vframeArray 0x001e1940 mode 2 interpreted caller fp=0xffbf81e8 sp=0xffbf8140 save area = 0xffbf8140, 0xffbf8180 save area = 0xffbf81e8, 0xffbf8228 interpreter fp=0xffbf8140 sp=0xffbf80b0 save area = 0xffbf80b0, 0xffbf80f0 save area = 0xffbf8140, 0xffbf8180 Llocals = 0xffbf81cc Lesp = 0xffbf810c Lmonitors = 0xffbf8128 [3 Interpreted Frame] Interpreted frame (sp=0xffbf80b0 unextended sp=0xffbf80b0, fp=0xffbf8140, pc=0xfb40b0c8) (~deoptimization entry points [0xfb40b0c0, 0xfb4105a0] 21728 bytes ) BufferBlob (0xfb404f88) used for Interpreter - local [0x00000000] ; #0 - local [0x00000000] ; #1 - local [0x00000000] ; #2 - local [0x00000000] ; #3 - local [0x00000000] ; #4 - local [0x00000000] ; #5 - local [0x00000000] ; #6 - local [0x00000000] ; #7 - stack [0xd82b2890] ; #5 - stack [0xf7507b48] ; #4 - stack [0xe2431a08] ; #3 - stack [0xe2344b58] ; #2 - stack [0xe23f21f8] ; #1 - stack [0xe246b640] ; #0 - monitor[0xffbf8128] - bcp [0xf79c6b57] ; @79 - locals [0xffbf81cc] - method [0xf79c6bc8] ; static jobject org.jruby.runtime.invokedynamic.InvokeDynamicSupport.fallback(jobject, jobject, jobject, jobject, jobject, jobject) {method} 'fallback' '(Lorg/jruby/runtime/invokedynamic/InvokeDynamicSupport$JRubyCallSite;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;' in 'org/jruby/runtime/invokedynamic/InvokeDynamicSupport' bci: 79 locals: 0 NULL <0x00000000> 1 NULL <0x00000000> 2 NULL <0x00000000> 3 NULL <0x00000000> 4 NULL <0x00000000> 5 NULL <0x00000000> 6 NULL <0x00000000> 7 NULL <0x00000000> expressions: 0 -498682304 (int) -916396955776975896576.000000 (float) e246b640 (hex) -2143957544773175744 (long) -1.792810894242887e+165 (double) 0xe23f21f8e246b640 (longhex) 1 -499179016 (int) -881443956119000055808.000000 (float) e23f21f8 (hex) -2147008277223890440 (long) -1.168670959782046e+165 (double) 0xe2344b58e23f21f8 (longhex) 2 -499889320 (int) -831460755654628605952.000000 (float) e2344b58 (hex) -2142840372241085608 (long) -2.199984457483806e+165 (double) 0xe2431a08e2344b58 (longhex) 3 -498918904 (int) -899747710904540594176.000000 (float) e2431a08 (hex) -625864795240588792 (long) -5.314409812993225e+266 (double) 0xf7507b48e2431a08 (longhex) 4 -145720504 (int) -4228508544469509098549982357618688.000000 (float) f7507b48 (hex) -2870155734428910776 (long) -5.350489441364822e+116 (double) 0xd82b2890f7507b48 (longhex) 5 -668260208 (int) -752762811842560.000000 (float) d82b2890 (hex) locals size 8 expression size 6 {method} 'fallback' '(Lorg/jruby/runtime/invokedynamic/InvokeDynamicSupport$JRubyCallSite;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;' in 'org/jruby/runtime/invokedynamic/InvokeDynamicSupport' # To suppress the following error report, specify this argument # after -XX: or in .hotspotrc: SuppressErrorAt=/exceptions.cpp:383 ============================================================================== Unexpected Error ------------------------------------------------------------------------------ Internal Error at exceptions.cpp:383, pid=5970, tid=1 fatal error: Saw java.lang.NullPointerException, aborting Do you want to debug the problem? To debug, run 'dbx - 5970'; then switch to thread 1 Enter 'yes' to launch dbx automatically (PATH must include dbx) Otherwise, press RETURN to abort... ============================================================================== The NPE is a null receiver when resolving an invokevirtual instruction right after an invokedynamic instruction (which I think is the caller of the traping fallback method): [8] report_fatal(file = 0xfeda20f3 "/home/ct232829/hotspot-comp/hotspot/src/share/vm/utilities/exceptions.cpp", line = 383, message = 0xffbf79dc "Saw java.lang.NullPointerException, aborting"), line 181 in "debug.cpp" [9] Exceptions::debug_check_abort(value_string = 0x62f60 "java.lang.NullPointerException", message = (nil)), line 383 in "exceptions.cpp" [10] Exceptions::debug_check_abort(exception = CLASS, message = (nil)), line 397 in "exceptions.cpp" [11] Exceptions::_throw(thread = 0x62800, file = 0xfeecdb19 "/home/ct232829/hotspot-comp/hotspot/src/share/vm/interpreter/linkResolver.cpp", line = 758, h_exception = CLASS, message = (nil)), line 120 in "exceptions.cpp" [12] Exceptions::_throw_msg(thread = 0x62800, file = 0xfeecdb19 "/home/ct232829/hotspot-comp/hotspot/src/share/vm/interpreter/linkResolver.cpp", line = 758, h_name = CLASS, message = (nil), h_loader = CLASS, h_protection_domain = CLASS), line 141 in "exceptions.cpp" [13] Exceptions::_throw_msg(thread = 0x62800, file = 0xfeecdb19 "/home/ct232829/hotspot-comp/hotspot/src/share/vm/interpreter/linkResolver.cpp", line = 758, name = 0xf7402060, message = (nil)), line 159 in "exceptions.cpp" [14] LinkResolver::runtime_resolve_virtual_method(result = CLASS, resolved_method = CLASS, resolved_klass = CLASS, recv = CLASS, recv_klass = CLASS, check_null_and_abstract = true, __the_thread__ = 0x62800), line 758 in "linkResolver.cpp" [15] LinkResolver::resolve_virtual_call(result = CLASS, recv = CLASS, receiver_klass = CLASS, resolved_klass = CLASS, method_name = CLASS, method_signature = CLASS, current_klass = CLASS, check_access = true, check_null_and_abstract = true, __the_thread__ = 0x62800), line 718 in "linkResolver.cpp" [16] LinkResolver::resolve_invokevirtual(result = CLASS, recv = CLASS, pool = CLASS, index = 65554, __the_thread__ = 0x62800), line 1056 in "linkResolver.cpp" [17] LinkResolver::resolve_invoke(result = CLASS, recv = CLASS, pool = CLASS, index = 65554, byte = _invokevirtual, __the_thread__ = 0x62800), line 1007 in "linkResolver.cpp" [18] InterpreterRuntime::resolve_invoke(thread = 0x62800, bytecode = _invokevirtual), line 648 in "interpreterRuntime.cpp" [19] 0xfb82ec6c(0x62800, 0xb8, 0x0, 0xfb82ea20, 0x72ae, 0xffbf8200), at 0xfb82ec6c {method} '__file__' '(Lruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;' in 'ruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB'[5,6]t@1 (l@1) stopped in javaVFrame::print at line 495 in file "vframe.cpp" 495 tty->cr(); (dbx) p method()->print_codes() 0 aload_1 1 invokevirtual cp[44] 44 <org/jruby/runtime/ThreadContext.getCurrentScope()Lorg/jruby/runtime/DynamicScope;> 4 astore #5 6 aload_1 7 getfield cp[48] 48 <org/jruby/runtime/ThreadContext.runtime/Lorg/jruby/Ruby;> 10 aload_3 11 iconst_1 12 iconst_2 13 invokestatic cp[54] 54 <org/jruby/runtime/Arity.raiseArgumentError(Lorg/jruby/Ruby;[Lorg/jruby/runtime/builtin/IRubyObject;II)V> 16 aload_3 17 iconst_0 18 aaload 19 aload #5 21 swap 22 invokevirtual cp[60] 60 <org/jruby/runtime/DynamicScope.setValueZeroDepthZero(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 25 pop 26 aload_3 27 iconst_1 28 invokestatic cp[66] 66 <org/jruby/javasupport/util/RuntimeHelpers.elementOrNull([Lorg/jruby/runtime/builtin/IRubyObject;I)Lorg/jruby/runtime/builtin/IRubyObject;> 31 dup 32 ifnull 45 35 aload #5 37 swap 38 invokevirtual cp[69] 69 <org/jruby/runtime/DynamicScope.setValueOneDepthZero(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 41 pop 42 goto 63 45 aload #5 47 aload_1 48 getfield cp[48] 48 <org/jruby/runtime/ThreadContext.runtime/Lorg/jruby/Ruby;> 51 invokevirtual cp[75] 75 <org/jruby/Ruby.getFalse()Lorg/jruby/RubyBoolean;> 54 aload_1 55 invokevirtual cp[78] 78 <org/jruby/runtime/ThreadContext.pollThreadEvents()V> 58 invokevirtual cp[69] 69 <org/jruby/runtime/DynamicScope.setValueOneDepthZero(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 61 pop 62 pop 63 aload_1 64 bipush 104 66 invokestatic cp[83] 83 <ruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB.setPosition(Lorg/jruby/runtime/ThreadContext;I)V> 69 aload #5 71 aload_1 72 aload_2 73 aload #5 75 aload_1 76 getfield cp[87] 87 <org/jruby/runtime/ThreadContext.nil/Lorg/jruby/runtime/builtin/IRubyObject;> 79 invokevirtual cp[90] 90 <org/jruby/runtime/DynamicScope.getValueZeroDepthZeroOrNil(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 82 ldc cp[92] Symbol: 'match' 84 aload_0 85 aload_1 86 getfield cp[48] 48 <org/jruby/runtime/ThreadContext.runtime/Lorg/jruby/Ruby;> 89 ldc cp[94] Symbol: '@buffer' 91 aload_2 92 invokevirtual cp[98] 98 <ruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB.getVariable0(Lorg/jruby/Ruby;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 95 invokedynamic secondary cache[28] of CP[27] missing bias? 100 invokevirtual cp[104] 104 <org/jruby/runtime/DynamicScope.setValueTwoDepthZero(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 103 pop 104 aload_1 105 bipush 105 107 invokestatic cp[83] 83 <ruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB.setPosition(Lorg/jruby/runtime/ThreadContext;I)V> 110 aload #5 112 aload_1 113 getfield cp[87] 87 <org/jruby/runtime/ThreadContext.nil/Lorg/jruby/runtime/builtin/IRubyObject;> 116 invokevirtual cp[107] 107 <org/jruby/runtime/DynamicScope.getValueOneDepthZeroOrNil(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 119 dup 120 invokeinterface cp[113] 113 <org/jruby/runtime/builtin/IRubyObject.isTrue()Z> 125 ifeq 138 128 pop 129 aload #5 131 aload_1 132 getfield cp[87] 87 <org/jruby/runtime/ThreadContext.nil/Lorg/jruby/runtime/builtin/IRubyObject;> 135 invokevirtual cp[116] 116 <org/jruby/runtime/DynamicScope.getValueTwoDepthZeroOrNil(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 138 invokeinterface cp[113] 113 <org/jruby/runtime/builtin/IRubyObject.isTrue()Z> 143 ifeq 165 146 aload_0 147 aload_1 148 getfield cp[48] 48 <org/jruby/runtime/ThreadContext.runtime/Lorg/jruby/Ruby;> 151 ldc cp[94] Symbol: '@buffer' 153 aload_2 154 aload_1 155 invokestatic cp[120] 120 <org/jruby/javasupport/util/RuntimeHelpers.backrefMatchPost(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;> 158 invokevirtual cp[124] 124 <ruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB.setVariable0(Lorg/jruby/Ruby;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 161 pop 162 goto 165 165 aload_1 166 bipush 106 168 invokestatic cp[83] 83 <ruby/jit/match_C68C412E93A504F03A3CBA42B13990AAA32E83EB.setPosition(Lorg/jruby/runtime/ThreadContext;I)V> 171 aload #5 173 aload_1 174 getfield cp[87] 87 <org/jruby/runtime/ThreadContext.nil/Lorg/jruby/runtime/builtin/IRubyObject;> 177 invokevirtual cp[116] 116 <org/jruby/runtime/DynamicScope.getValueTwoDepthZeroOrNil(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;> 180 areturn 181 athrow
08-10-2010