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

Suspend during block transition may deadlock if lock held

    XMLWordPrintable

Details

    • 17
    • b33
    • Verified

    Backports

      Description

        Some locks allow a JavaThread to enter a blocked state.
        If the JavaThread owning the lock is suspended on the back edge when returning to the VM state,
        it may cause a deadlock.

        An example of this is a JavaThread having the Compile_lock and then grabbing the VMOperation_lock,
        the JavaThread may transition to a blocked state due to contentions or if the JavaThread waits on the
        VMOperation_lock.

        The resumer might call a path which needs the Compile_lock before it resumes the suspended JavaThread.
        But since the Compile_lock will not be unlocked until the suspended JavaThread is resumed, we deadlock.

        Attachments

          Issue Links

            Activity

              People

                pchilanomate Patricio Chilano Mateo
                rehn Robbin Ehn
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: