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

VMOperationQueue::oops_do() is not thread-safe

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
      None

      Description

      The VMOperationQueue::oops_do() function runs without the VMOperationQueue_lock. It walks lists of VM_Operations to find VM_Operations that need to perform oops_do during GC root processing.

      However, since the VMOperationQueue_lock is not held while walking this list, a non-Java thread that is not stopped during safepoints (e.g. EnableBiasedLocking from the periodic task thread, or an eager concurrent marking thread) might enqueue a new VM_Operation concurrently. If that happens, elements could temporarily disappear from the list as observed by the GC during root scanning, and VM_Operations with naked oops might find themselves pointing to dead memory.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                eosterlund Erik Ă–sterlund
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: