The following test failed in the JDK21 CI:
vmTestbase/nsk/jdi/ReferenceType/instances/instances001/instances001.java
Here's a snippet from the log file:
debugee.stderr> Debuggee: received the command: createInstances:boolean[]:50:1:JNI_LOCAL
debugee.stdout> # To suppress the following error report, specify this argument
debugee.stdout> # after -XX: or in .hotspotrc: SuppressErrorAt=/zRelocate.cpp:124
debugee.stdout> #
debugee.stdout> # A fatal error has been detected by the Java Runtime Environment:
debugee.stdout> #
debugee.stdout> # Internal Error (/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S80242/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/b46b8a0c-c1ed-4372-aad0-5f01cdddfbbd/runs/253fc8ee-6f29-4b05-9709-1f5e7ed82f68/workspace/open/src/hotspot/share/gc/z/zRelocate.cpp:124), pid=996508, tid=997340
debugee.stdout> # assert(to_addr != 0) failed: Should be forwarded
debugee.stdout> #
debugee.stdout> # JRE version: Java(TM) SE Runtime Environment (21.0+7) (fastdebug build 21-ea+7-LTS-397)
debugee.stdout> # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 21-ea+7-LTS-397, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-amd64)
debugee.stdout> # Problematic frame:
debugee.stdout> # V [libjvm.so+0x1c9dd4c] ZRelocate::relocate_object(ZForwarding*, unsigned long) const+0x22c
debugee.stdout> #
debugee.stdout> # Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88564/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/595b1026-c088-4339-96e1-2c196b07ca2d/runs/be6cd732-806c-4ea2-939e-460539e9a677/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/scratch/4/core.996508)
debugee.stdout> #
debugee.stdout> # An error report file with more information is saved as:
debugee.stdout> # /opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88564/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/595b1026-c088-4339-96e1-2c196b07ca2d/runs/be6cd732-806c-4ea2-939e-460539e9a677/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/scratch/4/hs_err_pid996508.log
debugee.stdout> #
debugee.stdout> # If you would like to submit a bug report, please visit:
debugee.stdout> # https://bugreport.java.com/bugreport/crash.jsp
debugee.stdout> #
# ERROR: Unexpected exception: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "<local1>" is null
The following stacktrace is for failure analysis.
nsk.share.TestFailure: Unexpected exception: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "<local1>" is null
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:432)
at nsk.share.Log.complain(Log.java:403)
at nsk.share.jdi.TestDebuggerType2.runIt(TestDebuggerType2.java:221)
at nsk.jdi.ReferenceType.instances.instances001.instances001.run(instances001.java:90)
at nsk.jdi.ReferenceType.instances.instances001.instances001.main(instances001.java:86)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1623)
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "<local1>" is null
at nsk.share.jdi.TestDebuggerType2.isDebuggeeReady(TestDebuggerType2.java:240)
at nsk.share.jdi.HeapwalkingDebugger.checkDebugeeAnswer_instanceCounts(HeapwalkingDebugger.java:129)
at nsk.jdi.ReferenceType.instances.instances001.instances001.testReferrerType(instances001.java:139)
at nsk.jdi.ReferenceType.instances.instances001.instances001.testClass(instances001.java:103)
at nsk.jdi.ReferenceType.instances.instances001.instances001.doTest(instances001.java:204)
at nsk.share.jdi.TestDebuggerType2.runIt(TestDebuggerType2.java:214)
at nsk.jdi.ReferenceType.instances.instances001.instances001.run(instances001.java:90)
at nsk.jdi.ReferenceType.instances.instances001.instances001.main(instances001.java:86)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1623)
# ERROR: TEST FAILED: debuggee's process finished with status: 134
The following stacktrace is for failure analysis.
nsk.share.TestFailure: TEST FAILED: debuggee's process finished with status: 134
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:432)
at nsk.share.Log.complain(Log.java:403)
at nsk.share.jdi.TestDebuggerType2.quitDebuggee(TestDebuggerType2.java:202)
at nsk.share.jdi.TestDebuggerType2.runIt(TestDebuggerType2.java:225)
at nsk.jdi.ReferenceType.instances.instances001.instances001.run(instances001.java:90)
at nsk.jdi.ReferenceType.instances.instances001.instances001.main(instances001.java:86)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1623)
TEST FAILED
Here's the crashing thread's stack:
--------------- T H R E A D ---------------
Current thread (0x00007f003c541f70): JavaThread "Thread-100" [_thread_in_vm, id=997340, stack(0x00007efdd2c43000,0x00007efdd2d44000)]
Stack: [0x00007efdd2c43000,0x00007efdd2d44000], sp=0x00007efdd2d42a10, free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x1c9dd4c] ZRelocate::relocate_object(ZForwarding*, unsigned long) const+0x22c (zRelocate.cpp:124)
V [libjvm.so+0x75d4b8] ZBarrier::weak_load_barrier_on_phantom_oop_field_preloaded(oop volatile*, oop) [clone .isra.0]+0x218 (zBarrier.inline.hpp:172)
V [libjvm.so+0x75e775] AccessInternal::PostRuntimeDispatch<ZBarrierSet::AccessBarrier<593988ul, ZBarrierSet>, (AccessInternal::BarrierType)2, 593988ul>::oop_access_barrier(void*)+0x45 (zBarrierSet.inline.hpp:67)
V [libjvm.so+0x1196af7] jni_IsSameObject+0x3c7 (accessBackend.hpp:481)
C [libjdwp.so+0xfece] commonRef_compact+0xbe (commonRef.c:697)
C [libjdwp.so+0x16ab5] event_callback+0x355 (eventHandler.c:623)
C [libjdwp.so+0x17f87] cbThreadStart+0x77 (eventHandler.c:845)
V [libjvm.so+0x13ad210] JvmtiExport::post_thread_start(JavaThread*)+0x220 (jvmtiExport.cpp:1487)
V [libjvm.so+0x10a3c38] JavaThread::run()+0x218 (javaThread.cpp:689)
V [libjvm.so+0x1ab1cd0] Thread::call_run()+0x100 (thread.cpp:224)
V [libjvm.so+0x1748e83] thread_native_entry(Thread*)+0x103 (os_linux.cpp:739)