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

JFR calls virtual is_Java_thread from ~Thread()

XMLWordPrintable

    • jfr
    • b21
    • generic
    • generic

        is_thread_lock_aversive calls is_Java_thread on the current thread, which is the thread being destroyed by ~Thread below. In this context, because is_Java_thread is virtual with a definition in Thread that returns false, the result will be false, even though the thread used to be a JavaThread; because ~JavaThread has run it's no longer of that type.

        #3 0x0000153ba965cc5f in is_thread_lock_aversive () at ../../src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp:65
        #4 JfrPostBox::post (this=0x153b240bc780, msg=<optimized out>) at ../../src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp:74
        #5 0x0000153ba968bfb0 in JfrThreadLocal::release (thread=0x153b4456b000, buffer=<optimized out>)
            at ../../src/hotspot/share/jfr/support/jfrThreadLocal.cpp:110
        #6 JfrThreadLocal::on_destruct (thread=thread@entry=0x153b4456b000) at ../../src/hotspot/share/jfr/support/jfrThreadLocal.cpp:92
        #7 0x0000153ba95fa6ee in Jfr::on_thread_destruct (thread=thread@entry=0x153b4456b000) at ../../src/hotspot/share/jfr/jfr.cpp:72
        #8 0x0000153ba9eeb353 in Thread::~Thread (this=this@entry=0x153b4456b000, __in_chrg=<optimized out>)
            at ../../src/hotspot/share/runtime/thread.cpp:382
        #9 0x0000153ba9eec4f1 in JavaThread::~JavaThread (this=0x153b4456b000, __in_chrg=<optimized out>)
            at ../../src/hotspot/share/runtime/thread.cpp:1705
        #10 CompilerThread::~CompilerThread (this=0x153b4456b000, __in_chrg=<optimized out>) at ../../src/hotspot/share/runtime/thread.cpp:3359
        #11 CompilerThread::~CompilerThread (this=0x153b4456b000, __in_chrg=<optimized out>) at ../../src/hotspot/share/runtime/thread.cpp:3367
        #12 0x0000153ba9f089a5 in ThreadsSMRSupport::smr_delete (thread=thread@entry=0x153b4456b000) at ../../src/hotspot/share/runtime/threadSMR.cpp:997
        #13 0x0000153ba9efd708 in JavaThread::smr_delete (this=0x153b4456b000) at ../../src/hotspot/share/runtime/thread.cpp:225
        #14 JavaThread::thread_main_inner (this=this@entry=0x153b4456b000) at ../../src/hotspot/share/runtime/thread.cpp:1817
        #15 0x0000153ba9efd9e9 in JavaThread::run (this=0x153b4456b000) at ../../src/hotspot/share/runtime/thread.cpp:1791

              mgronlun Markus Grönlund
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: