Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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
Attachments
Issue Links
- is duplicated by
-
JCR-2623 Deadlock in cluster when registering node types
- Closed