Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-2866

Cluster: Node type register/unregister deadlock

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2.2
    • clustering
    • None

    Description

      A deadlock can occur when two cluster nodes concurrently register or unregister node types.

      Reason:

      NodeTypeRegistry.registerNodeTypes is synchronized, and calls eventChannel.registered(ntDefs), which calls AbstractJournal.lockAndSync(), which tries to lock AbstractJournal.rwLock.

      On the other hand, AbstractJournal.sync() locks AbstractJournal.rwLock, then calls NodeTypeRecord.process, which calls NodeTypeRegistry.unregisterNodeTypes, which is also synchronized.

      Possible solutions: Either

      • NodeTypeRegistry doesn't synchronize on the object when calling a eventChannel method,
      • or NodeTypeRegistry locks AbstractJournal.rwLock before synchronizing.

      There might be other solutions.

      Attachments

        1. jcr-2866-a.patch
          13 kB
          Thomas Mueller

        Issue Links

          Activity

            People

              thomasm Thomas Mueller
              thomasm Thomas Mueller
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: