Details
-
Improvement
-
Status: Closed
-
High
-
Resolution: Fixed
-
None
-
None
-
None
Description
I've tried to create a deadlock but I think it is currently not possible. However, this seems to be more coincidence than decent design:
Problem:
1) ChannelManagerImpl gets a synchronized method call
2) This method call can invoke HstManager#getVirtualHosts();
3) HstManager#getVirtualHosts() invokes a synchronized method on ChannelManagerImpl
If another request (thread) also already called HstManager#getVirtualHosts() and at the same time the model gets invalidated by a jcr event, a deadlock is easily created. The only reason it now does not happen is that because in the ChannelManagerImpl#load() there is a check whether 'channels == null' which happens to be the only guard currently against a deadlock.
I've been working on stale hst model support which loads the model in a background thread. In that case I directly hit deadlocks in the current setup
Attachments
Issue Links
- relates to
-
HSTTWO-2084 Deadlock on HstManagerImpl.getVirtualHosts
- Closed
-
HSTTWO-2413 Improve hst model reloading by using stale models
- Closed