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

Monitor synchronization could lead to deadlock

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • core-svc
    • b55
    • generic
    • generic

      The synchronization in the javax.management.monitor classes is too broad. A single lock is used per monitor, to control read and write access to e.g. the list of ObjectNames to monitor and the state of the monitor. This lock is held while the monitor calls getAttribute on a monitored MBean, and while it dispatches a notification to a listener. Both of these can involve executing arbitrary user code, including code that triggers an action from another thread such as changing the list of ObjectNames or stopping the monitor. No locks should be held while user code is being executed.

            lmalvent Luis-Miguel Alventosa (Inactive)
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: