[ https://issues.apache.org/jira/browse/JCR-2866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Mueller resolved JCR-2866. --------------------------------- Resolution: Fixed This problem should be fixed now. > Cluster: Node type register/unregister deadlock > ----------------------------------------------- > > Key: JCR-2866 > URL: https://issues.apache.org/jira/browse/JCR-2866 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: clustering > Reporter: Thomas Mueller > Assignee: Thomas Mueller > Fix For: 2.2.2 > > Attachments: jcr-2866-a.patch > > > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.