Segfault in compiler/whitebox/StressNMethodRelocation.java with -XX:+UseZGC

XMLWordPrintable

      The test compiler/whitebox/StressNMethodRelocation.java segfaulted with -XX:+UseZGC in tier3. Only seen once so far:

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x0000000195e02364, pid=47365, tid=34363
      #
      # JRE version: Java(TM) SE Runtime Environment (26.0+23) (fastdebug build 26-ea+23-2287)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 26-ea+23-2287, mixed mode, sharing, tiered, compressed class ptrs, z gc, bsd-aarch64)
      # Problematic frame:
      # C [libsystem_pthread.dylib+0x1364] pthread_mutex_lock+0xc
      .............
      Command Line: -Dtest.vm.opts=-XX:MaxRAMPercentage=6.25 -Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/25/37/bundles/macos-aarch64/jdk-25_macos-aarch64_bin.tar.gz/jdk-25.jdk/Contents/Home -Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/526fbd26-20de-495c-9a19-a04adc16f7d1-S19357/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/634873fd-2e9b-4112-8231-bc62ba7d9ccc/runs/f27837bf-345d-43e5-989c-cbe7274096da/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/tmp -Dtest.tool.vm.opts=-J-XX:MaxRAMPercentage=6.25 -J-Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/25/37/bundles/macos-aarch64/jdk-25_macos-aarch64_bin.tar.gz/jdk-25.jdk/Contents/Home -J-Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/526fbd26-20de-495c-9a19-a04adc16f7d1-S19357/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/634873fd-2e9b-4112-8231-bc62ba7d9ccc/runs/f27837bf-345d-43e5-989c-cbe7274096da/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/tmp -Dtest.compiler.opts= -Dtest.java.opts=-XX:+UseZGC -Dtest.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-26+23-2287/macosx-aarch64-debug.jdk/jdk-26/fastdebug -Dcompile.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-26+23-2287/macosx-aarch64-debug.jdk/jdk-26/fastdebug -Dtest.timeout.factor=4.0 -Dtest.nativepath=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-26+23-2287/macosx-aarch64-debug.test/hotspot/jtreg/native -Dtest.root=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-26+23-2287/src.full/open/test/hotspot/jtreg -Dtest.name=compiler/whitebox/StressNMethodRelocation.java -Dtest.verbose=Verbose[p=BRIEF,f=FULL,e=FULL,t=true,m=false] -Dtest.file=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-26+23-2287/src.full/open/test/hotspot/jtreg/compiler/whitebox/StressNMethodRelocation.java -Dtest.main.class=compiler.whitebox.StressNMethodRelocation -Dtest.src=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-26+23-2287/src.full/open/test/hotspot/jtreg/compiler/whitebox -Dtest.src.path=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-26+23-2287/src.full/open/test/hotspot/jtreg/compiler/whitebox:/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-26+23-2287/src.full/open/test/lib:/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-26+23-2287/src.full/open/test/hotspot/jtreg -Dtest.classes=/System/Volumes/Data/mesos/work_dir/slaves/526fbd26-20de-495c-9a19-a04adc16f7d1-S19357/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/634873fd-2e9b-4112-8231-bc62ba7d9ccc/runs/f27837bf-345d-43e5-989c-cbe7274096da/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/1/compiler/whitebox/StressNMethodRelocation.d -Dtest.class.path=/System/Volumes/Data/mesos/work_dir/slaves/526fbd26-20de-495c-9a19-a04adc16f7d1-S19357/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/634873fd-2e9b-4112-8231-bc62ba7d9ccc/runs/f27837bf-345d-43e5-989c-cbe7274096da/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/1/compiler/whitebox/StressNMethodRelocation.d:/System/Volumes/Data/mesos/work_dir/slaves/526fbd26-20de-495c-9a19-a04adc16f7d1-S19357/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/634873fd-2e9b-4112-8231-bc62ba7d9ccc/runs/f27837bf-345d-43e5-989c-cbe7274096da/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/1/compiler/whitebox/StressNMethodRelocation.d/test/lib:/System/Volumes/Data/mesos/work_dir/slaves/526fbd26-20de-495c-9a19-a04adc16f7d1-S19357/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/634873fd-2e9b-4112-8231-bc62ba7d9ccc/runs/f27837bf-345d-43e5-989c-cbe7274096da/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/1/compiler/whitebox/StressNMethodRelocation.d -Dtest.class.path.prefix=/System/Volumes/Data/mesos/work_dir/slaves/526fbd26-20de-495c-9a19-a04adc16f7d1-S19357/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/634873fd-2e9b-4112-8231-bc62ba7d9ccc/runs/f27837bf-345d-43e5-989c-cbe7274096da/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/1/compiler/whitebox/StressNMethodRelocation.d:/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-26+23-2287/src.full/open/test/hotspot/jtreg/compiler/whitebox:/System/Volumes/Data/mesos/work_dir/slaves/526fbd26-20de-495c-9a19-a04adc16f7d1-S19357/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/634873fd-2e9b-4112-8231-bc62ba7d9ccc/runs/f27837bf-345d-43e5-989c-cbe7274096da/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/1/compiler/whitebox/StressNMethodRelocation.d/test/lib -Dtest.modules=java.base/jdk.internal.misc java.management --add-modules=java.base,java.management --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED -XX:MaxRAMPercentage=6.25 -Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/25/37/bundles/macos-aarch64/jdk-25_macos-aarch64_bin.tar.gz/jdk-25.jdk/Contents/Home -Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/526fbd26-20de-495c-9a19-a04adc16f7d1-S19357/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/634873fd-2e9b-4112-8231-bc62ba7d9ccc/runs/f27837bf-345d-43e5-989c-cbe7274096da/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/tmp -XX:+UseZGC -Djava.library.path=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-26+23-2287/macosx-aarch64-debug.test/hotspot/jtreg/native -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+NMethodRelocation com.sun.javatest.regtest.agent.MainWrapper /System/Volumes/Data/mesos/work_dir/slaves/526fbd26-20de-495c-9a19-a04adc16f7d1-S19357/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/634873fd-2e9b-4112-8231-bc62ba7d9ccc/runs/f27837bf-345d-43e5-989c-cbe7274096da/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/compiler/whitebox/StressNMethodRelocation.d/main.0.jta
      ...............
      Stack: [0x0000000170c70000,0x0000000170e73000], sp=0x0000000170e72740, free space=2057k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C [libsystem_pthread.dylib+0x1364] pthread_mutex_lock+0xc
      V [libjvm.dylib+0x1369970] ZCompiledICProtectionBehaviour::lock(nmethod*)+0x5c
      V [libjvm.dylib+0x532e3c] CompiledICLocker::CompiledICLocker(nmethod*)+0x30
      V [libjvm.dylib+0x1298c98] WB_RelocateNMethodFromAddr+0x28c
      J 2998 jdk.test.whitebox.WhiteBox.relocateNMethodFromAddr(JI)V (0 bytes) @ 0x000000011701d978 [0x000000011701d8c0+0x00000000000000b8]
      J 4855% c2 compiler.whitebox.StressNMethodRelocation$RelocateNMethods.run()V (147 bytes) @ 0x0000000116d14168 [0x0000000116d14040+0x0000000000000128]
      j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@26-ea
      j java.lang.Thread.run()V+19 java.base@26-ea
      v ~StubRoutines::Stub Generator call_stub_stub 0x000000011673c48c
      V [libjvm.dylib+0x8eb020] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x444
      V [libjvm.dylib+0x8e9bd8] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x1c8
      V [libjvm.dylib+0x8e9d8c] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x84
      V [libjvm.dylib+0xa82814] thread_entry(JavaThread*, JavaThread*)+0x160
      V [libjvm.dylib+0x922c6c] JavaThread::thread_main_inner()+0x1d0
      V [libjvm.dylib+0x117e184] Thread::call_run()+0xf0
      V [libjvm.dylib+0xedafac] thread_native_entry(Thread*)+0x138
      C [libsystem_pthread.dylib+0x6bc8] _pthread_start+0x88
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      J 2998 jdk.test.whitebox.WhiteBox.relocateNMethodFromAddr(JI)V (0 bytes) @ 0x000000011701d948 [0x000000011701d8c0+0x0000000000000088]
      J 4855% c2 compiler.whitebox.StressNMethodRelocation$RelocateNMethods.run()V (147 bytes) @ 0x0000000116d14168 [0x0000000116d14040+0x0000000000000128]
      j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@26-ea
      j java.lang.Thread.run()V+19 java.base@26-ea
      v ~StubRoutines::Stub Generator call_stub_stub 0x000000011673c48c

      siginfo: si_signo: 11 (SIGSEGV), si_code: 2 (SEGV_ACCERR), si_addr: 0x0000000000000000


      Another failure with ZGC:

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x0000ffff9a7c787c, pid=27085, tid=27105
      #
      # JRE version: OpenJDK Runtime Environment (26.0) (slowdebug build 26-internal-adhoc.chadrako.JDK-8371046)
      # Java VM: OpenJDK 64-Bit Server VM (slowdebug 26-internal-adhoc.chadrako.JDK-8371046, mixed mode, tiered, compressed class ptrs, z gc, linux-aarch64)
      # Problematic frame:
      # V [libjvm.so+0x67987c] CodeBlob::is_nmethod() const+0xc
      #
      # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #

      --------------- S U M M A R Y ------------

      Command Line: -Dtest.vm.opts=-XX:ReservedCodeCacheSize=32m -XX:+UseZGC -XX:ErrorFile=hs_err_pid%p.log -XX:LogFile=/dev/null -Dtest.tool.vm.opts=-J-XX:ReservedCodeCacheSize=32m -J-XX:+UseZGC -J-XX:ErrorFile=hs_err_pid%p.log -J-XX:LogFile=/dev/null -Dtest.compiler.opts= -Dtest.java.opts= -Dtest.jdk=/home/chadrako/workplace/JDK-8371046/build/linux-aarch64-server-slowdebug/jdk -Dcompile.jdk=/home/chadrako/workplace/JDK-8371046/build/linux-aarch64-server-slowdebug/jdk -Dtest.timeout.factor=1.0 -Dtest.root=/workplace/chadrako/JDK-8371046/test/hotspot/jtreg -Dtest.name=compiler/whitebox/StressNMethodRelocation.java -Dtest.verbose=Verbose[p=FULL,f=FULL,e=FULL,t=false,m=false] -Dtest.file=/workplace/chadrako/JDK-8371046/test/hotspot/jtreg/compiler/whitebox/StressNMethodRelocation.java -Dtest.main.class=compiler.whitebox.StressNMethodRelocation -Dtest.src=/workplace/chadrako/JDK-8371046/test/hotspot/jtreg/compiler/whitebox -Dtest.src.path=/workplace/chadrako/JDK-8371046/test/hotspot/jtreg/compiler/whitebox:/workplace/chadrako/JDK-8371046/test/lib:/workplace/chadrako/JDK-8371046/test/hotspot/jtreg -Dtest.classes=/workplace/chadrako/JDK-8371046/output/session_5/JTwork/classes/compiler/whitebox/StressNMethodRelocation.d -Dtest.class.path=/workplace/chadrako/JDK-8371046/output/session_5/JTwork/classes/compiler/whitebox/StressNMethodRelocation.d:/workplace/chadrako/JDK-8371046/output/session_5/JTwork/classes/compiler/whitebox/StressNMethodRelocation.d/test/lib:/workplace/chadrako/JDK-8371046/output/session_5/JTwork/classes/compiler/whitebox/StressNMethodRelocation.d -Dtest.modules=java.base/jdk.internal.misc java.management --add-modules=java.base,java.management --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED -XX:ReservedCodeCacheSize=32m -XX:+UseZGC -XX:ErrorFile=hs_err_pid%p.log -XX:LogFile=/dev/null -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+NMethodRelocation com.sun.javatest.regtest.agent.MainWrapper /workplace/chadrako/JDK-8371046/output/session_5/JTwork/compiler/whitebox/StressNMethodRelocation.d/main.1.jta

      Host: AArch64, 64 cores, 246G, Amazon Linux release 2 (Karoo)
      Time: Sat Nov 8 01:11:19 2025 UTC elapsed time: 33.781248 seconds (0d 0h 0m 33s)

      --------------- T H R E A D ---------------

      Current thread (0x0000ffff94125400): WorkerThread "ZWorkerOld#8" [id=27105, stack(0x0000ffff983a7000,0x0000ffff985a5000) (2040K)]

      Stack: [0x0000ffff983a7000,0x0000ffff985a5000], sp=0x0000ffff985a3560, free space=2033k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x67987c] CodeBlob::is_nmethod() const+0xc (codeBlob.hpp:189)
      V [libjvm.so+0x95fb70] CompiledDirectCall::verify()+0xf8 (compiledIC_aarch64.cpp:138)
      V [libjvm.so+0x1340af8] CompiledDirectCall::at(unsigned char*)+0x54 (compiledIC.hpp:201)
      V [libjvm.so+0x1340b20] CompiledDirectCall::at(Relocation*)+0x18 (compiledIC.hpp:206)
      V [libjvm.so+0x1331d40] nmethod::cleanup_inline_caches_impl(bool, bool)+0x168 (nmethod.cpp:872)
      V [libjvm.so+0x1331a58] nmethod::unload_nmethod_caches(bool)+0x3c (nmethod.cpp:815)
      V [libjvm.so+0x191f2b0] ZNMethodUnlinkClosure::do_nmethod(nmethod*)+0x248 (zNMethod.cpp:390)
      V [libjvm.so+0x1923504] ZNMethodTableIteration::nmethods_do(NMethodClosure*)+0xe8 (zNMethodTableIteration.cpp:71)
      V [libjvm.so+0x1921c2c] ZNMethodTable::nmethods_do(bool, NMethodClosure*)+0x20 (zNMethodTable.cpp:230)
      V [libjvm.so+0x191f36c] ZNMethodUnlinkTask::work()+0x20 (zNMethod.cpp:410)
      V [libjvm.so+0x1966bd0] ZTask::Task::work(unsigned int)+0x2c (zTask.cpp:31)
      V [libjvm.so+0x18bdee8] WorkerTaskDispatcher::worker_run_task()+0x70 (workerThread.cpp:69)
      V [libjvm.so+0x18be6a4] WorkerThread::run()+0x24 (workerThread.cpp:200)
      V [libjvm.so+0x177f8f0] Thread::call_run()+0x1c4 (thread.cpp:242)
      V [libjvm.so+0x13b2958] thread_native_entry(Thread*)+0x184 (os_linux.cpp:877)
      C [libpthread.so.0+0x7230] start_thread+0xb0

            Assignee:
            Chad Rakoczy
            Reporter:
            Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: