reference clearing for ConcurrentHashMap can deadlock with receive txn apply
----------------------------------------------------------------------------

                 Key: CDV-596
                 URL: https://jira.terracotta.org/jira//browse/CDV-596
             Project: Community Development
          Issue Type: Bug
    Affects Versions: 2.5.0
            Reporter: Tim Eck
            Assignee: Issue Review Board


I'll attach some thread dumps of this in action, but the problem starts when 
the memory manager in the client calls __tc_clearReferences() on 
ConcurrentHashMap. The memory manager always takes the TCObject resolve lock 
before calling __tc_clearReferences(). In ConcurrentHashMap, 
__tc_clearReference() also takes distributed locks (on the segments), this 
particular nesting is problematic. In order to obtain the segment locks, txns 
from other nodes might need to be applied locally. Those incoming txns will 
need to obtain the resolve lock to apply(), thus you end up with a deadlock. 

The fix is to not take distributed locks on the segments (local only)

This has been making the ConcurrentHashMapSwapingTest fail for quite a while


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to