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

Deadlock in leakprofiler::emit_events during shutdown

    XMLWordPrintable

Details

    • jfr
    • b03
    • b06

    Backports

      Description

        We've observed a deadlock in leakprofiler::emit_events when the JVM is shut down with Runtime.getRuntime().halt().

        Suggestion for resolution:
        During investigation, [~egahlin] has commented that JfrEmergencyDump::on_vm_shutdown didn't seem to be designed for being run from Java. Nevertheless, it can be reached from a Java call to Runtime.getRuntime().halt() [1]. To resolve, add a boolean parameter to Jfr::on_vm_shutdown do differentiate the "called from java" case, and in that case to not call JfrEmergencyDump::on_vm_shutdown.

        [1] code path:
        Runtime.getRuntime().halt()
        JVM_Halt
        before_exit
        Jfr::on_vm_shutdown
        JfrEmergencyDump::on_vm_shutdown
        post_events
        LeakProfiler::emit_events

        Attachments

          Issue Links

            Activity

              People

                lujaniuk Ludvig Janiuk
                lujaniuk Ludvig Janiuk
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: