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

[8u] ServiceThread::nmethods_do is not called to keep nmethods from being zombied while in the queue

    XMLWordPrintable

Details

    • b01

    Backports

      Description

        Crashes in JvmtiExport::post_compiled_method_load were found in JDK8 of our production environment after one day when users started to receive the JVMTI COMPILED_METHOD_LOAD event.

        This issue behaved similarly to JDK-8173361.
        After debugging, ServiceThread::nmethods_do backported by JDK-8173361 is not called.
        JavaThread::nmethods_do should be a virtual function just like 11u or later, otherwise, the following routine cannot call the correct nmethods_do for ServiceThread.
            ALL_JAVA_THREADS(p) {
                p->nmethods_do(cf);
            }

        Because this issue cannot be easily reproduced, manually adding some delay on purpose in ServiceThread::service_thread_entry to keep more events pending in JvmtiDeferredEventQueue could help reproduce this issue.
        After the fix, various crashes were gone.

        Attachments

          Issue Links

            Activity

              People

                jzhu Joshua Zhu
                jzhu Joshua Zhu
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: