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

VM crash during heap dump after JDK-8287061



    • b25
    • Verified


      The release VM crashes with SEGV during the heap dump, highly intermittently.

      Manifests like this in release builds:

      $ build/macosx-aarch64-server-release/images/jdk/bin/java -XX:+UseParallelGC -XX:+HeapDumpAfterFullGC -Xms256m -Xmx256m -jar dacapo-23.11-chopin.jar kafka

      Heap dump file created [219361950 bytes in 0.108 secs]
      Dumping heap to java_pid12474.hprof.9 ...
      # A fatal error has been detected by the Java Runtime Environment:
      # SIGSEGV (0xb) at pc=0x000000010399a1a0, pid=12474, tid=20995
      # JRE version: OpenJDK Runtime Environment (22.0) (build 22-internal-adhoc.shipilev.shipilev-jdk)
      # Java VM: OpenJDK 64-Bit Server VM (22-internal-adhoc.shipilev.shipilev-jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, parallel gc, bsd-aarch64)
      # Problematic frame:
      # V [libjvm.dylib+0x2e61a0] ObjectMergeValue::value() const+0xc

      And it catches the assert in debug builds:

      $ build/macosx-aarch64-server-fastdebug/images/jdk/bin/java -XX:+UseParallelGC -XX:+HeapDumpAfterFullGC -Xms256m -Xmx256m -jar dacapo-23.11-chopin.jar kafka
      Heap dump file created [237306088 bytes in 0.746 secs]
      Dumping heap to java_pid13476.hprof.78 ...
      # A fatal error has been detected by the Java Runtime Environment:
      # Internal Error (/Users/shipilev/Work/shipilev-jdk/src/hotspot/share/code/debugInfo.hpp:235), pid=13476, tid=16899
      # assert(_selected != nullptr) failed: Should call select() first.

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

      Command Line: -XX:+UseParallelGC -XX:+HeapDumpAfterFullGC -Xms256m -Xmx256m /Users/shipilev/Work/dacapo-23.11-chopin.jar kafka

      Host: bcd074129a52, "MacBookPro18,3" arm64, 10 cores, 32G, Darwin 22.6.0, macOS 13.5.2 (22G91)
      Time: Thu Nov 9 12:19:19 2023 CET elapsed time: 65.902768 seconds (0d 0h 1m 5s)

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

      Current thread (0x000000012a709bb0): VMThread "VM Thread" [id=16899, stack(0x000000016e300000,0x000000016e503000) (2060K)]

      Stack: [0x000000016e300000,0x000000016e503000], sp=0x000000016e501690, free space=2053k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.dylib+0x12378e8] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x554 (debugInfo.hpp:235)
      V [libjvm.dylib+0x12380f4] VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*)+0x0
      V [libjvm.dylib+0x57170c] print_error_for_unit_test(char const*, char const*, char*)+0x0
      V [libjvm.dylib+0x577400] ObjectMergeValue::set_value(oop)+0x0
      V [libjvm.dylib+0x108c508] StackValue* StackValue::create_stack_value<RegisterMap>(ScopeValue*, unsigned char*, RegisterMap const*)+0x388
      V [libjvm.dylib+0x122371c] compiledVFrame::create_stack_value(ScopeValue*) const+0x140
      V [libjvm.dylib+0x1223344] compiledVFrame::locals() const+0xac
      V [libjvm.dylib+0x7ee5e8] ThreadDumper::dump_stack_refs(AbstractDumpWriter*)+0x2a4
      V [libjvm.dylib+0x7efbc0] VM_HeapDumper::dump_threads()+0x70
      V [libjvm.dylib+0x7f037c] VM_HeapDumper::work(unsigned int)+0x2b4
      V [libjvm.dylib+0x7eff2c] VM_HeapDumper::doit()+0x17c
      V [libjvm.dylib+0x123eee8] VM_Operation::evaluate()+0xf4
      V [libjvm.dylib+0x126172c] VMThread::evaluate_operation(VM_Operation*)+0x114
      V [libjvm.dylib+0x12621b4] VMThread::inner_execute(VM_Operation*)+0x1d0
      V [libjvm.dylib+0x7f124c] HeapDumper::dump(char const*, outputStream*, int, bool, unsigned int)+0x194
      V [libjvm.dylib+0x7f1a4c] HeapDumper::dump_heap(bool)+0x22c
      V [libjvm.dylib+0x4ba624] CollectedHeap::full_gc_dump(GCTimer*, bool)+0x178
      V [libjvm.dylib+0xedcc0c] PSParallelCompact::invoke_no_policy(bool)+0x810
      V [libjvm.dylib+0xef50ac] PSScavenge::invoke()+0x198


        Issue Links



              cslucas Cesar Soares
              shade Aleksey Shipilev
              0 Vote for this issue
              7 Start watching this issue