Unattached thread can cause crash during VM exit if it calls wait_if_vm_exited

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: 25
    • Component/s: hotspot
    • b03

      This was discovered in a round-about way with AWT shutdown code that uses JVM RawMonitors. The RawMonitor code checks for VM exit and calls VM_Exit::wait_if_vm_exited, which checks if the current thread is the shutdown-thread else it blocks it by locking the Threads_lock. However, if the current thread is not attached (which RawMonitors allow) then we can't use the Threads_lock (current thread is null). In such a situation we should not attempt to block the unattached thread.

      Credit to [~ihse] for identifying the problem.

            Assignee:
            David Holmes
            Reporter:
            David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: