[infinispan-issues] [JBoss JIRA] (ISPN-2458) Double unlock during rollback breaks reference counting
Radim Vansa (JIRA)
jira-events at lists.jboss.org
Wed Oct 31 08:31:18 EDT 2012
[ https://issues.jboss.org/browse/ISPN-2458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730417#comment-12730417 ]
Radim Vansa commented on ISPN-2458:
-----------------------------------
Fine, I have mildly pointed to this behaviour in my comment for ISPN-2381, so this is actually the second bug that allowed ISPN-2381 to reveal.
> Double unlock during rollback breaks reference counting
> -------------------------------------------------------
>
> Key: ISPN-2458
> URL: https://issues.jboss.org/browse/ISPN-2458
> Project: Infinispan
> Issue Type: Bug
> Components: Locking and Concurrency
> Affects Versions: 5.2.0.Beta3
> Reporter: Radim Vansa
> Assignee: Mircea Markus
> Priority: Critical
> Fix For: 5.2.0.CR1
>
>
> Using pessimistic locking, when a transaction is rolled-back, {{RollbackCommand}} and then {{TxCompletionNotification}} commands are sent to the primary owner. When the order of these two changes, the locks are unlocked twice: first by {{TxCompletionNotification}} calling {{LockManagerImpl.unlock(Collection<Object> lockedKeys, Object lockOwner)}} and then by {{AbstractTxLockingInterceptor.visitRollbackCommand}} calling {{LockManagerImpl.unlockAll(...)}}
> When the lock is acquired after the first unlock, the second unlock fails with IllegalMonitorStateException in {{OwnableReentrantLock.tryAcquire(...)}}, but the reference count is still decremented in {{AbstractPerEntryLockContainer.releaseLock(...)}}. This results in further IllegalStateException: Negative reference count for lock
--
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