[infinispan-issues] [JBoss JIRA] (ISPN-2381) Lock can be removed from map even when unlocked from non-owner
Radim Vansa (JIRA)
jira-events at lists.jboss.org
Thu Oct 11 08:13:03 EDT 2012
[ https://issues.jboss.org/browse/ISPN-2381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725562#comment-12725562 ]
Radim Vansa commented on ISPN-2381:
-----------------------------------
The reason why the lock was unlocked by non-owner is that TxCompletionNotificationCommand was executed in parallel with RollbackCommand. As both these two commands do unlock for all locks closed within the transaction, when the lock is acquired by another transaction prior to the second unlock, the lock can be removed from the map, effectively unlocking it in the middle of the other transaction.
> Lock can be removed from map even when unlocked from non-owner
> --------------------------------------------------------------
>
> Key: ISPN-2381
> URL: https://issues.jboss.org/browse/ISPN-2381
> Project: Infinispan
> Issue Type: Bug
> Components: Locking and Concurrency
> Affects Versions: 5.2.0.Beta1
> Reporter: Radim Vansa
> Assignee: Manik Surtani
> Priority: Blocker
> Fix For: 5.2.0.CR1, 5.2.0.Final, 5.1.8.Final
>
>
> In OwnableReentrantLock:
> If in the tryRelease(int) the owner != requestor the lock is not unlocked, it is still removed from AbstractPerEntryLockContainer.locks causing that is effectively unlocked.
> https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/util/concurrent/locks/containers/AbstractPerEntryLockContainer.java#L102
> https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/util/concurrent/locks/OwnableReentrantLock.java#L154
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list