[ 
https://issues.apache.org/jira/browse/JCR-2866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987997#action_12987997
 ] 

Sergiy Shyrkov commented on JCR-2866:
-------------------------------------

These are good news, thank you!
Any plans perhaps to backport the patch to 1.5 or 1.6 branch (actually, we are 
experiencing it also on our projects with Jackrabbit 1.5.0). Or it was already 
done?

> 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.

Reply via email to