Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-386

RequestCorrelator thread safety issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.4.1 SP1
    • 2.4
    • None
    • Medium

      [Dave Oxley]
      We have had a deadlock issue with JGroups. The same issue affects 2.2.8 and 2.4.0. The call_stack in blocks.RequestCorrelator is a class variable and is set when a message is processed in util.Scheduler with deadlock_detection set to true. However if multiple threads call sendRequest in blocks.RequestCorrelator then they pick up the call_stack that may not be relevant to that request. This is most evident when concurrent_processing is also set to true as the call_stack grows permanently. The attached patch (against the 2.4 branch) makes call_stack a ThreadLocal and is set by the util.ReusableThread used to process the request. I've also changed the setConcurrentProcessing methods so that they work after the various objects have already been constructed.

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: