[ https://issues.apache.org/jira/browse/JCR-2866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987722#action_12987722 ]
Sergiy Shyrkov commented on JCR-2866: ------------------------------------- Hello Thomas, does this patch also addresses the issue, reported in JCR-2623 , i.e. is it the same problem? Thank you in advance! Kind regards Sergiy > 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.