Parallel: Crash iterating over unloaded classes for ObjectCountAfterGC event

XMLWordPrintable

    • gc

      One of our teams at Datadog recently encountered a crash in Parallel GC's heap/object-iterator:

      Stack: [0x00007fffcb530000,0x00007fffcb630000], sp=0x00007fffcb62ec90, free space=1019k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xf0f789] PSOldGen::object_iterate_block(ObjectClosure*, unsigned long)+0x179
      V [libjvm.so+0xec1583] ParallelScavengeHeap::object_iterate_parallel(ObjectClosure*, HeapBlockClaimer*)+0x63
      V [libjvm.so+0x9e8882] ParHeapInspectTask::work(unsigned int)+0xe2
      V [libjvm.so+0x11a04e0] WorkerThread::run()+0x80
      V [libjvm.so+0x10c603f] Thread::call_run()+0x9f
      V [libjvm.so+0xe9cca6] thread_native_entry(Thread*)+0xc6

      As far as I can tell, the only thing that they do that relates to this is to enable ObjectCountAfterGC JFR events. The crash happens reliably with JDK 26, but not with JDK 25.

      I am trying to make a reproducer, but no success so far. I am attaching the hs_err, maybe there's something useful in it. Let me know if you want me to try something out. I'll also investigate further.

            Assignee:
            Thomas Schatzl
            Reporter:
            Roman Kennke
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: