Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8293327

HeapDumpTest.java crashed with SIGSEGV in DependencyContext::add_dependent_nmethod with ZGC

XMLWordPrintable

    • aarch64
    • linux

      The following test failed in the JDK20 CI:

      serviceability/dcmd/gc/HeapDumpTest.java

      Here's a snippet from the log file:

      #section:testng
      ----------messages:(6/264)----------
      command: testng HeapDumpTest
      reason: User specified action: run testng HeapDumpTest
      Mode: agentvm
      Agent id: 8
      Additional exports to unnamed modules from @modules: java.base/jdk.internal.misc jdk.internal.jvmstat/sun.jvmstat.monitor
      elapsed time (seconds): 26.869
      ----------configuration:(18/2242)----------

      <snip>

      ---------------- stdout ----------------
      3521484:
      Dumping heap to /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S78728/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/1316660e-323e-4e32-9d5b-65dca298dd4d/runs/d037bae5-5cbd-47c7-9fa4-0ef3f222b53f/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/scratch/3/jcmd.gc.heap_dump.1662148857496.hprof ...
      Heap dump file created [9395130 bytes in 0.144 secs]

      ---------------- stderr ----------------

      ----------------------------------------

      test HeapDumpTest.pid(): success
      Running DCMD 'GC.heap_dump -overwrite /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S78728/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/1316660e-323e-4e32-9d5b-65dca298dd4d/runs/d037bae5-5cbd-47c7-9fa4-0ef3f222b53f/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/scratch/3/jcmd.gc.heap_dump.1662148863723.hprof' through 'PidJcmdExecutor'
      Executing command '[/opt/mach5/mesos/work_dir/jib-master/install/jdk-20+14-893/linux-aarch64-debug.jdk/jdk-20/fastdebug/bin/jcmd, 3521484, GC.heap_dump -overwrite /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S78728/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/1316660e-323e-4e32-9d5b-65dca298dd4d/runs/d037bae5-5cbd-47c7-9fa4-0ef3f222b53f/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/scratch/3/jcmd.gc.heap_dump.1662148863723.hprof]'
      [2022-09-02T20:01:03.730125128Z] Gathering output for process 3522278
      [2022-09-02T20:01:04.647918244Z] Waiting for completion for process 3522278
      [2022-09-0
      ----------stdout:(21/1773)----------
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x0000fffe4ea00488, pid=3521484, tid=3521529
      #
      # JRE version: Java(TM) SE Runtime Environment (20.0+14) (fastdebug build 20-ea+14-893)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-ea+14-893, mixed mode, tiered, compressed class ptrs, z gc, linux-aarch64)
      # Problematic frame:
      # V [libjvm.so+0xa90488] DependencyContext::add_dependent_nmethod(nmethod*)+0x68
      #
      # 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/0c72054a-24ab-4dbb-944f-97f9341a1b96-S78728/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/1316660e-323e-4e32-9d5b-65dca298dd4d/runs/d037bae5-5cbd-47c7-9fa4-0ef3f222b53f/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/scratch/3/core.3521484)
      #
      # An error report file with more information is saved as:
      # /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S78728/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/1316660e-323e-4e32-9d5b-65dca298dd4d/runs/d037bae5-5cbd-47c7-9fa4-0ef3f222b53f/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/scratch/3/hs_err_pid3521484.log
      #
      # Compiler replay data is saved as:
      # /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S78728/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/1316660e-323e-4e32-9d5b-65dca298dd4d/runs/d037bae5-5cbd-47c7-9fa4-0ef3f222b53f/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/scratch/3/replay_pid3521484.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      result: Error. Agent communication error: java.io.EOFException; check console log for any additional details

      Here's the crashing thread's stack:

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

      Current thread (0x0000fffe482a4280): JavaThread "C1 CompilerThread0" daemon [_thread_in_vm, id=3521529, stack(0x0000fffbf3400000,0x0000fffbf3600000)]


      Current CompileTask:
      C1: 14234 2064 ! 3 jdk.test.lib.hprof.model.JavaClass::resolveSuperclass (109 bytes)

      Stack: [0x0000fffbf3400000,0x0000fffbf3600000], sp=0x0000fffbf35fd6b0, free space=2037k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xa90488] DependencyContext::add_dependent_nmethod(nmethod*)+0x68 (dependencyContext.cpp:309)
      V [libjvm.so+0xe1d904] InstanceKlass::add_dependent_nmethod(nmethod*)+0x64 (instanceKlass.cpp:2341)
      V [libjvm.so+0x144c890] nmethod::new_nmethod(methodHandle const&, int, int, CodeOffsets*, int, DebugInformationRecorder*, Dependencies*, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, CompLevel, char*, int, int, char const*, FailedSpeculation**)+0x370 (nmethod.cpp:580)
      V [libjvm.so+0x83606c] ciEnv::register_method(ciMethod*, int, CodeOffsets*, int, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, bool, bool, bool, int, RTMState)+0x3a8 (ciEnv.cpp:1143)
      V [libjvm.so+0x690fa4] Compilation::install_code(int)+0xf4 (c1_Compilation.cpp:421)
      V [libjvm.so+0x693768] Compilation::compile_method()+0x318 (c1_Compilation.cpp:480)
      V [libjvm.so+0x693f78] Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*, bool, DirectiveSet*)+0x2c8 (c1_Compilation.cpp:598)
      V [libjvm.so+0x695798] Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x148 (c1_Compiler.cpp:251)
      V [libjvm.so+0x997188] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xad8 (compileBroker.cpp:2243)
      V [libjvm.so+0x9979fc] CompileBroker::compiler_thread_loop()+0x39c (compileBroker.cpp:1917)
      V [libjvm.so+0xead458] JavaThread::thread_main_inner()+0x248 (javaThread.cpp:700)
      V [libjvm.so+0x17b9028] Thread::call_run()+0xf8 (thread.cpp:224)
      V [libjvm.so+0x14ced84] thread_native_entry(Thread*)+0x100 (os_linux.cpp:710)
      C [libpthread.so.0+0x7908] start_thread+0x188


      siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0xccccccccccccceb4

            dlong Dean Long
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: