-
Bug
-
Resolution: Unresolved
-
P2
-
repo-valhalla
The JVM crashes when running runtime/valhalla/inlinetypes/InlineOops.java test in interpreted mode with either ZGC or generational ZGC:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/valhalla/open/src/hotspot/cpu/x86/gc/z/zAddress_x86.inline.hpp:35), pid=1252016, tid=1252048
# assert(index == 0 || is_power_of_2(index)) failed: Incorrect load shift: 7
#
# JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build 23-lworld5ea-2024-11-04-1724298.fred...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-lworld5ea-2024-11-04-1724298.fred..., interpreted mode, sharing, compressed class ptrs, z gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x5e5061] ZPointer::load_shift_lookup(unsigned long)+0x61
#
--------------- T H R E A D ---------------
Current thread (0x00007015d439bd40): JavaThread "MainThread" [_thread_in_vm, id=1252048, stack(0x00007015c3100000,0x00007015c3200000) (1024K)]
Stack: [0x00007015c3100000,0x00007015c3200000], sp=0x00007015c31fcd10, free space=1011k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
Current thread (0x00007015d439bd40): JavaThread "MainThread" [_thread_in_vm, id=1252048, stack(0x00007015c3100000,0x00007015c3200000) (1024K)]
Stack: [0x00007015c3100000,0x00007015c3200000], sp=0x00007015c31fcd10, free space=1011k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x5e5061] ZPointer::load_shift_lookup(unsigned long)+0x61 (zAddress_x86.inline.hpp:35)
V [libjvm.so+0xe19a5f] zaddress ZBarrier::barrier<ZBarrier::load_barrier_on_oop_field_preloaded(zpointer volatile*, zpointer)::{lambda(zaddress)#1}>(bool (*)(zpointer), ZBarrier::load_barrier_on_oop_field_preloaded(zpointer volatile*, zpointer)::{lambda(zaddress)#1}, zpointer (*)(zaddress, zpointer), zpointer volatile*, zpointer, bool) [clone .part.0] [clone .constprop.0]+0x14f (zAddress.inline.hpp:458)
V [libjvm.so+0xe2f677] AccessInternal::PostRuntimeDispatch<ZBarrierSet::AccessBarrier<286788ul, ZBarrierSet>, (AccessInternal::BarrierType)2, 286788ul>::oop_access_barrier(void*)+0x47 (zBarrier.inline.hpp:327)
V [libjvm.so+0x19bc528] CollectOops::do_oop(oop*)+0x28 (accessBackend.hpp:448)
V [libjvm.so+0xc4cb80] frame::oops_interpreted_do(OopClosure*, RegisterMap const*, bool) const [clone .part.0]+0x1a0 (frame.cpp:940)
V [libjvm.so+0x19ab480] WB_getObjectsViaFrameOopIterator+0x200 (frame.hpp:477)
j jdk.test.whitebox.WhiteBox.getObjectsViaFrameOopIterator(I)[Ljava/lang/Object;+0
j runtime.valhalla.inlinetypes.InlineOops.getOopMap()[Ljava/lang/Object;+4
j runtime.valhalla.inlinetypes.InlineOops.testFrameOops(Lruntime/valhalla/inlinetypes/InlineOops$Couple;)[Ljava/lang/Object;+56
j runtime.valhalla.inlinetypes.InlineOops.testOopMaps()V+396
j runtime.valhalla.inlinetypes.InlineOops.main([Ljava/lang/String;)V+26
j java.lang.invoke.LambdaForm$DMH+0x0000701153001400.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V+10 java.base@23-lworld5ea
j java.lang.invoke.LambdaForm$MH+0x000070115300ec00.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+33 java.base@23-lworld5ea
j java.lang.invoke.Invokers$Holder.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+20 java.base@23-lworld5ea
j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+55 java.base@23-lworld5ea
j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base@23-lworld5ea
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base@23-lworld5ea
j com.sun.javatest.regtest.agent.MainWrapper$MainTask.run()V+134
j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@23-lworld5ea
j java.lang.Thread.run()V+19 java.base@23-lworld5ea
v ~StubRoutines::call_stub 0x00007015d8400cfa
V [libjvm.so+0xeed53a] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4aa (javaCalls.cpp:429)
V [libjvm.so+0xeededc] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x34c (javaCalls.cpp:331)
V [libjvm.so+0xeee0f6] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x76 (javaCalls.cpp:193)
V [libjvm.so+0x1057e73] thread_entry(JavaThread*, JavaThread*)+0x93 (jvm.cpp:3049)
V [libjvm.so+0xf23a5c] JavaThread::thread_main_inner()+0xcc (javaThread.cpp:760)
V [libjvm.so+0x1875a76] Thread::call_run()+0xb6 (thread.cpp:225)
V [libjvm.so+0x15410b7] thread_native_entry(Thread*)+0x127 (os_linux.cpp:846)
C [libc.so.6+0x9ca94]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j jdk.test.whitebox.WhiteBox.getObjectsViaFrameOopIterator(I)[Ljava/lang/Object;+0
j runtime.valhalla.inlinetypes.InlineOops.getOopMap()[Ljava/lang/Object;+4
j runtime.valhalla.inlinetypes.InlineOops.testFrameOops(Lruntime/valhalla/inlinetypes/InlineOops$Couple;)[Ljava/lang/Object;+56
j runtime.valhalla.inlinetypes.InlineOops.testOopMaps()V+396
j runtime.valhalla.inlinetypes.InlineOops.main([Ljava/lang/String;)V+26
j java.lang.invoke.LambdaForm$DMH+0x0000701153001400.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V+10 java.base@23-lworld5ea
j java.lang.invoke.LambdaForm$MH+0x000070115300ec00.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+33 java.base@23-lworld5ea
j java.lang.invoke.Invokers$Holder.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+20 java.base@23-lworld5ea
j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+55 java.base@23-lworld5ea
j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base@23-lworld5ea
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base@23-lworld5ea
j com.sun.javatest.regtest.agent.MainWrapper$MainTask.run()V+134
j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@23-lworld5ea
j java.lang.Thread.run()V+19 java.base@23-lworld5ea
v ~StubRoutines::call_stub 0x00007015d8400cfa
The tests pass after the merge with jdk-23+21 but fail after the merge with jdk-23+22,jdk-23+23,jdk-23+24.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/valhalla/open/src/hotspot/cpu/x86/gc/z/zAddress_x86.inline.hpp:35), pid=1252016, tid=1252048
# assert(index == 0 || is_power_of_2(index)) failed: Incorrect load shift: 7
#
# JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build 23-lworld5ea-2024-11-04-1724298.fred...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-lworld5ea-2024-11-04-1724298.fred..., interpreted mode, sharing, compressed class ptrs, z gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x5e5061] ZPointer::load_shift_lookup(unsigned long)+0x61
#
--------------- T H R E A D ---------------
Current thread (0x00007015d439bd40): JavaThread "MainThread" [_thread_in_vm, id=1252048, stack(0x00007015c3100000,0x00007015c3200000) (1024K)]
Stack: [0x00007015c3100000,0x00007015c3200000], sp=0x00007015c31fcd10, free space=1011k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
Current thread (0x00007015d439bd40): JavaThread "MainThread" [_thread_in_vm, id=1252048, stack(0x00007015c3100000,0x00007015c3200000) (1024K)]
Stack: [0x00007015c3100000,0x00007015c3200000], sp=0x00007015c31fcd10, free space=1011k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x5e5061] ZPointer::load_shift_lookup(unsigned long)+0x61 (zAddress_x86.inline.hpp:35)
V [libjvm.so+0xe19a5f] zaddress ZBarrier::barrier<ZBarrier::load_barrier_on_oop_field_preloaded(zpointer volatile*, zpointer)::{lambda(zaddress)#1}>(bool (*)(zpointer), ZBarrier::load_barrier_on_oop_field_preloaded(zpointer volatile*, zpointer)::{lambda(zaddress)#1}, zpointer (*)(zaddress, zpointer), zpointer volatile*, zpointer, bool) [clone .part.0] [clone .constprop.0]+0x14f (zAddress.inline.hpp:458)
V [libjvm.so+0xe2f677] AccessInternal::PostRuntimeDispatch<ZBarrierSet::AccessBarrier<286788ul, ZBarrierSet>, (AccessInternal::BarrierType)2, 286788ul>::oop_access_barrier(void*)+0x47 (zBarrier.inline.hpp:327)
V [libjvm.so+0x19bc528] CollectOops::do_oop(oop*)+0x28 (accessBackend.hpp:448)
V [libjvm.so+0xc4cb80] frame::oops_interpreted_do(OopClosure*, RegisterMap const*, bool) const [clone .part.0]+0x1a0 (frame.cpp:940)
V [libjvm.so+0x19ab480] WB_getObjectsViaFrameOopIterator+0x200 (frame.hpp:477)
j jdk.test.whitebox.WhiteBox.getObjectsViaFrameOopIterator(I)[Ljava/lang/Object;+0
j runtime.valhalla.inlinetypes.InlineOops.getOopMap()[Ljava/lang/Object;+4
j runtime.valhalla.inlinetypes.InlineOops.testFrameOops(Lruntime/valhalla/inlinetypes/InlineOops$Couple;)[Ljava/lang/Object;+56
j runtime.valhalla.inlinetypes.InlineOops.testOopMaps()V+396
j runtime.valhalla.inlinetypes.InlineOops.main([Ljava/lang/String;)V+26
j java.lang.invoke.LambdaForm$DMH+0x0000701153001400.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V+10 java.base@23-lworld5ea
j java.lang.invoke.LambdaForm$MH+0x000070115300ec00.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+33 java.base@23-lworld5ea
j java.lang.invoke.Invokers$Holder.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+20 java.base@23-lworld5ea
j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+55 java.base@23-lworld5ea
j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base@23-lworld5ea
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base@23-lworld5ea
j com.sun.javatest.regtest.agent.MainWrapper$MainTask.run()V+134
j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@23-lworld5ea
j java.lang.Thread.run()V+19 java.base@23-lworld5ea
v ~StubRoutines::call_stub 0x00007015d8400cfa
V [libjvm.so+0xeed53a] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4aa (javaCalls.cpp:429)
V [libjvm.so+0xeededc] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x34c (javaCalls.cpp:331)
V [libjvm.so+0xeee0f6] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x76 (javaCalls.cpp:193)
V [libjvm.so+0x1057e73] thread_entry(JavaThread*, JavaThread*)+0x93 (jvm.cpp:3049)
V [libjvm.so+0xf23a5c] JavaThread::thread_main_inner()+0xcc (javaThread.cpp:760)
V [libjvm.so+0x1875a76] Thread::call_run()+0xb6 (thread.cpp:225)
V [libjvm.so+0x15410b7] thread_native_entry(Thread*)+0x127 (os_linux.cpp:846)
C [libc.so.6+0x9ca94]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j jdk.test.whitebox.WhiteBox.getObjectsViaFrameOopIterator(I)[Ljava/lang/Object;+0
j runtime.valhalla.inlinetypes.InlineOops.getOopMap()[Ljava/lang/Object;+4
j runtime.valhalla.inlinetypes.InlineOops.testFrameOops(Lruntime/valhalla/inlinetypes/InlineOops$Couple;)[Ljava/lang/Object;+56
j runtime.valhalla.inlinetypes.InlineOops.testOopMaps()V+396
j runtime.valhalla.inlinetypes.InlineOops.main([Ljava/lang/String;)V+26
j java.lang.invoke.LambdaForm$DMH+0x0000701153001400.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V+10 java.base@23-lworld5ea
j java.lang.invoke.LambdaForm$MH+0x000070115300ec00.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+33 java.base@23-lworld5ea
j java.lang.invoke.Invokers$Holder.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+20 java.base@23-lworld5ea
j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+55 java.base@23-lworld5ea
j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base@23-lworld5ea
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base@23-lworld5ea
j com.sun.javatest.regtest.agent.MainWrapper$MainTask.run()V+134
j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@23-lworld5ea
j java.lang.Thread.run()V+19 java.base@23-lworld5ea
v ~StubRoutines::call_stub 0x00007015d8400cfa
The tests pass after the merge with jdk-23+21 but fail after the merge with jdk-23+22,jdk-23+23,jdk-23+24.