[ 
http://jira.jboss.com/jira/browse/JBCACHE-94?page=comments#action_12315987 ]
     
Bela Ban commented on JBCACHE-94:
---------------------------------

T0 is under tx to do removeObject("/aop", ...) of which has many sub-cache 
operations. But first thing, it does a write on, say, /aop. Therefore, it put a 
WL on /aop.

Meanwhile T1 comes in (also under another Tx) to do putObject("/aop",...). So 
since T0 is not done, it somehow enter CreateNodeIfNoExist interceptor and 
insert /aop fqn into put-list. But then it blocks since "/aop" is under WL.

Later on, T0 is trying to remove the node, but now it has to wait since /aop is 
in the put-list.

So this is a deadlock. Eventually T1 will timeout and T0 proceeds.


Bela: this is documented in TxDeadlockUnitTestCase in 
testCreateIfNotExistsLogic().
We will fix this for 1.2.1, but move to a different solution in 1.2.2 
(LockTable) --> JBCACHE-107

> Incorrect synchronization between threads (CreateIfNotExistsInterceptor and 
> LockInterceptor)
> --------------------------------------------------------------------------------------------
>
>          Key: JBCACHE-94
>          URL: http://jira.jboss.com/jira/browse/JBCACHE-94
>      Project: JBoss Cache
>         Type: Bug
>     Reporter: Bela Ban
>     Assignee: Bela Ban
>     Priority: Blocker
>      Fix For: 1.2.1

>
>
> Example (assumes RPE-READ (R/W lock) semantics):
> - TX1 does a put(/a/b/c)
> - TX1 acquires lock1 in CreateIfNotExistsInterceptor
> - TX1 creates /a/b (RL) and /a/b/c (WL), locking those nodes
> - TX2 does a put(/a/b/c/d), waits on CINE-Int
> - TX1 releases lock1
> - TX2 acquires lock1 and blocks on lock acquisition for /a/b/c (WL-ed by TX1)
> - TX1 does a remove(/a/b/c, key)
> - TX1 blocks on lock1 (held by TX2)
> - TX2 times out, rolls back changes and releases lock1
> - TX1 acquires lock1, makes the change, commits TX and releases all locks
> SOLUTION: we need to fine-grained synchronization in 
> CreateIfNotExistsInterceptor

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to