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

Bean Context has a deadlock

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • None
    • client-libs
    • generic
    • generic

    Description

      The code in BeanContextSupport.java acquires synchronization objects in different order (once acquires BeanContext.globalHierarchyLock and then children, another time acquires children and then BeanContext.globalHierarchyLock).

      Acquiring synchronization objects in different order can cause circular wait (deadlock).

      Here is the first order: (1) first acquire BeanContext.globalHierarchyLock and then children:

      enter public method remove(Object) at line 481
      call remove(Object, boolean) at line 482
      acquire synchronization on BeanContext.globalHierarchyLock at line 499
      acquire synchronization on children at line 531
      Here is the second order: (2) first acquire children and then BeanContext.globalHierarchyLock:

      enter public method propertyChange() at line 1112
      acquire synchronization on children at line 1116
      call remove(Object, boolean) at line 1123
      acquire synchronization on BeanContext.globalHierarchyLock at line 499

      Attachments

        Issue Links

          Activity

            People

              serb Sergey Bylokhov
              azeemj Azeem Jiva
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: