During Jruby test suite execution VM crashes with
Here are description from Tom and head of hs_err:
>> If it is reproducible file bug. It is in Interpreter for method:
>>
>> j java.lang.invoke.MethodHandle.invokeExact
>>
>> But the code is strange (load to g0?):
>>
>> d0 5c 00 04 ldx [ %l0 + %g4 ], %o0
>> -----------
>> c0 5a 20 00 ldx [ %o0 ], %g0
>
> That's a null check. I think it's this code:
>
> void TemplateTable::invokevfinal_helper(Register Rscratch, Register Rret) {
> Register Rtemp = G4_scratch;
>
> // Load receiver from stack slot
> __ lduh(G5_method, in_bytes(methodOopDesc::size_of_parameters_offset()), G4_scratch);
> __ load_receiver(G4_scratch, O0);
>
> // receiver NULL check
> __ null_check(O0);
>
> __ profile_final_call(O4);
>
> I tried to reproduce it a couple times on the original machine but without any luck. It's probably a crash after an uncommon trap because the method we die in appears to be a generated method handle adapter. I'll keep running it to see if I can reproduce it.
;; Using jvm: "/export/home/local/common/jdk/baseline/solaris-sparcv9/jre/lib/sparcv9/server/libjvm.so"
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xffffffff7444517c, pid=8917, tid=2
#
# JRE version: 7.0-b147
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.0-b06-internal-201112030540.kvn.7117282-fastdebug compiled mode solaris-sparc compressed oops)
# Problematic frame:
# j java.lang.invoke.MethodHandle.invokeExact(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;+15
#
# Core dump written. Default location: /export/home/local/56678.JDK7.NIGHTLY.VM_solaris-sparcv9_jruby_server_comp_jruby.quick.testlist/results/ResultDir/bench.bench_nsieve/core or core.8917
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
--------------- T H R E A D ---------------
Current thread (0x0000000100131000): JavaThread "main" [_thread_in_Java, id=2, stack(0xffffffff7ac00000,0xffffffff7ad00000)]
siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0xffffffff00000000;;
Registers:
G1=0xffffffff7acfacb0 G2=0x0000000100131000 G3=0x00000000000000e2 G4=0x0000000000000010
G5=0xffffffff512a2988 G6=0xffffffff4fbfe000 G7=0xffffffff7eb00a00 Y=0x0000000000000000
O0=0xffffffff00000000 O1=0x00000000000000b6 O2=0x0000000000000069 O3=0x00000000dead0006
O4=0x00000000dead0008 O5=0xffffffff7acfa291 O6=0xffffffff7acfa291 O7=0xffffffff74406e48
L0=0xffffffff7acfab98 L1=0xffffffff512a2a77 L2=0xffffffff512a2a90 L3=0xffffffff7acfacd0
L4=0xffffffff7acfabb0 L5=0x000000007c800002 L6=0xffffffff512a2c40 L7=0x0000000100131000
I0=0x00000000dead0000 I1=0x00000000dead0002 I2=0xffffffff512a2d78 I3=0xffffffff74444e94
I4=0x00000000dead0008 I5=0xffffffff7acfa401 I6=0xffffffff7acfa3e1 I7=0xffffffff74407bbc
PC=0xffffffff7444517c nPC=0xffffffff74445180
Top of Stack: (sp=0xffffffff7acfaa90)
0xffffffff7acfaa90: ffffffff7acfab98 ffffffff512a2a77
0xffffffff7acfaaa0: ffffffff512a2a90 ffffffff7acfacd0
0xffffffff7acfaab0: ffffffff7acfabb0 000000007c800002
0xffffffff7acfaac0: ffffffff512a2c40 0000000100131000
0xffffffff7acfaad0: 00000000dead0000 00000000dead0002
0xffffffff7acfaae0: ffffffff512a2d78 ffffffff74444e94
0xffffffff7acfaaf0: 00000000dead0008 ffffffff7acfa401
0xffffffff7acfab00: ffffffff7acfa3e1 ffffffff74407bbc
0xffffffff7acfab10: 0000000000000000 0000000000000000
0xffffffff7acfab20: 0000000000000000 0000000000000000
0xffffffff7acfab30: 0000000000000000 0000000000000000
0xffffffff7acfab40: 0000000000000000 0000000000000000
0xffffffff7acfab50: 0000000000000000 0000000000000000
0xffffffff7acfab60: 0000000000000000 0000000000000000
0xffffffff7acfab70: 00ffffffffffffde 0000000100131000
0xffffffff7acfab80: 01ffffff7acfaa10 0000000000000000
Instructions: (pc=0xffffffff7444517c)
0xffffffff7444515c: da 5b 61 90 9f c3 60 00 01 00 00 00 91 d0 20 10
0xffffffff7444516c: c6 2c 60 00 c8 11 60 3a 89 29 20 03 d0 5c 00 04
0xffffffff7444517c: c0 5a 20 00 12 e6 a0 c0 d8 5e a0 08 98 83 20 01
0xffffffff7444518c: 98 63 00 00 d8 76 a0 08 b4 06 a0 30 09 20 72 09
;; ffffffff7444516c c6 2c 60 00 stb %g3, [ %l1 ]
;; ffffffff74445170 c8 11 60 3a lduh [ %g5 + 0x3a ], %g4
;; ffffffff74445174 89 29 20 03 sll %g4, 3, %g4
;; ffffffff74445178 d0 5c 00 04 ldx [ %l0 + %g4 ], %o0
;; ---------------
;; ffffffff7444517c c0 5a 20 00 ldx [ %o0 ], %g0
;; ffffffff74445180 12 e6 a0 c0 unknown
;; ffffffff74445184 d8 5e a0 08 ldx [ %i2 + 8 ], %o4
;; ffffffff74445188 98 83 20 01 inccc %o4
;; ffffffff7444518c 98 63 00 00 subc %o4, %g0, %o4
;; ffffffff74445190 d8 76 a0 08 stx %o4, [ %i2 + 8 ]
;; ffffffff74445194 b4 06 a0 30 add %i2, 0x30, %i2
;; ffffffff74445198 09 20 72 09 sethi %hi(0x81c82400), %g4
;;
Register to memory mapping:
G1=0xffffffff7acfacb0 is pointing into the stack for thread: 0x0000000100131000
G2=0x0000000100131000 is a thread
G3=0x00000000000000e2 is an unknown value
G4=0x0000000000000010 is an unknown value
G5=0xffffffff512a2988 is an oop
{method}
- klass: {other class}
- this oop: 0xffffffff512a2988
- method holder: 'java/lang/invoke/MethodHandle'
- constants: 0xffffffff512a28c8 constant pool [4]/pseudo_string/preresolution for 'java/lang/invoke/MethodHandle' (extra)
- access: 0x10001111 public final native synthetic
- name: 'invokeExact'
- signature: '(Z)Ljava/lang/invoke/MethodHandle;'
- max stack: 0
- max locals: 0
- size of params: 2
- method size: 19
- intrinsic id: 146 _invokeExact
- vtable index: -2
- i2i entry: 0xffffffff7441cd80
- adapter: 0x0000000100339d48
- compiled entry 0xffffffff744d952c
- code size: 0
- checked ex length: 0
- localvar length: 0
- invoke method type: 0xffffffff6c0faaf8
G6=0xffffffff4fbfe000 is an unknown value
G7=0xffffffff7eb00a00 is an unknown value
O0=0xffffffff00000000 is an unknown value
O1=0x00000000000000b6 is an unknown value
O2=0x0000000000000069 is an unknown value
O3=0x00000000dead0006 is an unknown value
O4=0x00000000dead0008 is an unknown value
O5=0xffffffff7acfa291 is pointing into the stack for thread: 0x0000000100131000
O6=0xffffffff7acfa291 is pointing into the stack for thread: 0x0000000100131000
O7=0xffffffff74406e48 is an Interpreter codelet
return entry points [0xffffffff74405c60, 0xffffffff74409060] 13312 bytes
L0=0xffffffff7acfab98 is pointing into the stack for thread: 0x0000000100131000
L1=0xffffffff512a2a77 is an oop
{constMethod}
- klass: {other class}
- method: 0xffffffff512a2a90 {method} 'invokeExact' '(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;' in 'java/lang/invoke/MethodHandle'
- exceptions: 0xffffffff4fc01d40
bci_from(ffffffff512a2a77) = 15; print_codes():
0 ldc<Object> 0xffffffff6c7a8d20
2 aload_0
3 aload_1
4 aload_2
5 aload_3
6 invokevirtual 8<java/lang/invoke/MethodHandle.invokeExact(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Z>
0 bci: 6 VirtualCallData count(2) entries(0)
9 istore #4
11 ldc<Object> 0xffffffff6c7a8f00
13 fast_iload #4
15 fast_invokevfinal 14<java/lang/invoke/MethodHandle.invokeExact(Z)Ljava/lang/invoke/MethodHandle;>
48 bci: 15 VirtualCallData count(2) entries(0)
18 astore #5
20 aload #5
22 checkcast 15<java/lang/invoke/MethodHandle>
96 bci: 22 ReceiverTypeData count(2) entries(0)
25 astore #6
27 aload #6
29 aload_0
30 aload_1
31 aload_2
32 aload_3
33 invokespecial 20<java/lang/invoke/MethodHandle.invokeExact(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;>
144 bci: 33 CounterData count(2)
36 areturn
L2=0xffffffff512a2a90 is an oop
{method}
- klass: {other class}
- this oop: 0xffffffff512a2a90
- method holder: 'java/lang/invoke/MethodHandle'
- constants: 0xffffffff512a2b18 constant pool [21]/preresolution for 'java/lang/invoke/MethodHandle' (extra) cache=0xffffffff512a2c40
- access: 0x1019 public static final synthetic
- name: 'invokeExact'
- signature: '(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;'
- max stack: 13
- max locals: 7
- size of params: 4
- method size: 17
- vtable index: -3
- i2i entry: 0xffffffff7441a6e0
- adapter: 0x000000010033a1c0
- compiled entry 0xffffffff744e2634
- code size: 37
- code start: 0xffffffff512a2a68
- code end (excl): 0xffffffff512a2a8d
- method data: 0xffffffff512a2cc0
- checked ex length: 0
- localvar length: 0
L3=0xffffffff7acfacd0 is pointing into the stack for thread: 0x0000000100131000
L4=0xffffffff7acfabb0 is pointing into the stack for thread: 0x0000000100131000
L5=0x000000007c800002 is an unknown value
L6=0xffffffff512a2c40 is an oop
{constant pool cache}
- klass: {other class}
L7=0x0000000100131000 is a thread
I0=0x00000000dead0000 is an unknown value
I1=0x00000000dead0002 is an unknown value
I2=0xffffffff512a2d78 is an oop
method data for {method} 'invokeExact' '(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;' in 'java/lang/invoke/MethodHandle'
0 bci: 6 VirtualCallData count(2) entries(0)
48 bci: 15 VirtualCallData count(2) entries(0)
96 bci: 22 ReceiverTypeData count(2) entries(0)
144 bci: 33 CounterData count(2)
--- Extra data:
168 bci: 0 ArgInfoData 0x0 0x0 0x0 0x0
I3=0xffffffff74444e94 is an Interpreter codelet
invokevirtual 182 invokevirtual [0xffffffff74444ca0, 0xffffffff744453a0] 1792 bytes
I4=0x00000000dead0008 is an unknown value
I5=0xffffffff7acfa401 is pointing into the stack for thread: 0x0000000100131000
I6=0xffffffff7acfa3e1 is pointing into the stack for thread: 0x0000000100131000
I7=0xffffffff74407bbc is an Interpreter codelet
return entry points [0xffffffff74405c60, 0xffffffff74409060] 13312 bytes
Stack: [0xffffffff7ac00000,0xffffffff7ad00000], sp=0xffffffff7acfaa90, free space=1002k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
j java.lang.invoke.MethodHandle.invokeExact(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;+15
j export.local.common.testbase.jruby.imported.jruby.bench.bench_nsieve.method__0$RUBY$sieve(Lexport/local/common/testbase/jruby/imported/jruby/bench/bench_nsieve;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;+45
J export$local$common$testbase$jruby$imported$jruby$bench$bench_nsieve$method__0$RUBY$sieve.call(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyModule;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
j export$local$common$testbase$jruby$imported$jruby$bench$bench_nsieve$method__0$RUBY$sieve.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;+11
J org.jruby.runtime.invokedynamic.InvocationLinker.fail(Lorg/jruby/runtime/invokedynamic/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;
j export.local.common.testbase.jruby.imported.jruby.bench.bench_nsieve.block_1$RUBY$__file__(Lexport/local/common/testbase/jruby/imported/jruby/bench/bench_nsieve;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;+100
j export$local$common$testbase$jruby$imported$jruby$bench$bench_nsieve$block_1$RUBY$__file__.call(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;+9
J org.jruby.runtime.CompiledBlock.yield(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Binding;Lorg/jruby/runtime/Block$Type;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
j org.jruby.runtime.CompiledBlock.yield(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Binding;Lorg/jruby/runtime/Block$Type;)Lorg/jruby/runtime/builtin/IRubyObject;+9
J org.jruby.RubyInteger.fixnumDownto(Lorg/jruby/runtime/ThreadContext;JJLorg/jruby/runtime/Block;)V
J org.jruby.RubyInteger.downto(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
J java.lang.invoke.MethodHandleImpl$GuardWithCatch.invoke_L6(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
J java.lang.invoke.MethodHandleImpl$GuardWithCatch.invoke_L6(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
v ~RichochetBlob
J java.lang.invoke.MethodHandle.invokeWithArguments([Ljava/lang/Object;)Ljava/lang/Object;
J org.jruby.runtime.invokedynamic.InvocationLinker.invocationFallback(Lorg/jruby/runtime/invokedynamic/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/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
j export.local.common.testbase.jruby.imported.jruby.bench.bench_nsieve.block_0$RUBY$__file__(Lexport/local/common/testbase/jruby/imported/jruby/bench/bench_nsieve;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;+66
j export$local$common$testbase$jruby$imported$jruby$bench$bench_nsieve$block_0$RUBY$__file__.call(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;+9
[error occurred during error reporting (printing native stack), id 0xe0000000]