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

Heap dump contains duplicate thread records for mounted virtual threads

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 23
    • None
    • hotspot
    • svc
    • b05
    • generic
    • generic

    Backports

      Description

        For mounted virtual threads HeapDumper dumps 2 HPROF_GC_ROOT_THREAD_OBJ subrecord.
        One of them refers to actual stack trace/stack references, another one has empty stack trace.

        test/hotspot/jtreg/serviceability/jvmti/vthread/HeapDump/VThreadInHeapDump.java output contains:
        thread 0x8141dda0, 6 frames
          - [0] VThreadInHeapDumpTarg$VthreadMounted.run()V (VThreadInHeapDump.java:108)
              Java Local Reference: VThreadInHeapDumpTarg$VthreadMounted
              Java Local Reference: VThreadInHeapDumpTarg$VThreadMountedReferenced
          - [1] java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V (Thread.java:1583)
              Java Local Reference: java.lang.VirtualThread
              Java Local Reference: java.lang.Class
              Java Local Reference: VThreadInHeapDumpTarg$VthreadMounted
          - [2] java.lang.VirtualThread.run(Ljava/lang/Runnable;)V (VirtualThread.java:321)
              Java Local Reference: java.lang.VirtualThread
              Java Local Reference: VThreadInHeapDumpTarg$VthreadMounted
              Java Local Reference: java.lang.Class
          - [3] java.lang.VirtualThread$VThreadContinuation$1.run()V (VirtualThread.java:201)
              Java Local Reference: java.lang.VirtualThread$VThreadContinuation$1
          - [4] jdk.internal.vm.Continuation.enter0()V (Continuation.java:320)
              Java Local Reference: java.lang.VirtualThread$VThreadContinuation
          - [5] jdk.internal.vm.Continuation.enter(Ljdk/internal/vm/Continuation;Z)V (Continuation.java:312)
              Java Local Reference: java.lang.VirtualThread$VThreadContinuation
        ...
        thread 0x8141dda0, 0 frames

        Attachments

          Issue Links

            Activity

              People

                amenkov Alex Menkov
                amenkov Alex Menkov
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: