Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-2417

HST model loading combined with Channel manager loading channels is very deadlock error prone

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • High
    • Resolution: Fixed
    • None
    • 2.26.01
    • 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

          Activity

            People

              svoortman Simon Voortman (Inactive)
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: