[
http://jira.jboss.com/jira/browse/JGRP-386?page=comments#action_12348801 ]
Bela Ban commented on JGRP-386:
-------------------------------
Issues:
#1 Use of ThreadLocals not supported on J2ME
#2 In 2.5, the thread pools require that we disassociate a ThreadLocal from every thread
at the end of the task, so the code probably needs some modifications
We need to port this to 2.5 once it's done
RequestCorrelator thread safety issue
-------------------------------------
Key: JGRP-386
URL:
http://jira.jboss.com/jira/browse/JGRP-386
Project: JGroups
Issue Type: Bug
Affects Versions: 2.4
Reporter: Bela Ban
Assigned To: Bela Ban
Fix For: 2.4.1
Attachments: oxley.diff
[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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira