[infinispan-issues] [JBoss JIRA] (ISPN-2728) AbstractCacheTransaction.hasLockOrIsLockBackup may cause NPE

Adrian Nistor (JIRA) jira-events at lists.jboss.org
Fri Jan 18 09:05:21 EST 2013


    [ https://issues.jboss.org/browse/ISPN-2728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748925#comment-12748925 ] 

Adrian Nistor commented on ISPN-2728:
-------------------------------------

Isn't this yet another reincarnation of the root cause of ISPN-2578 ? TX commands for same tx are not supposed to be executed in parallel. Mircea's PR for ISPN-2728 should solve that.
                
> AbstractCacheTransaction.hasLockOrIsLockBackup may cause NPE
> ------------------------------------------------------------
>
>                 Key: ISPN-2728
>                 URL: https://issues.jboss.org/browse/ISPN-2728
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Locking and Concurrency, Transactions
>    Affects Versions: 5.2.0.CR1
>            Reporter: Radim Vansa
>            Assignee: Mircea Markus
>
> {{AbstractCacheTransaction.hasLockOrIsLockBackup}} can be called from non-synchronized context (particularly from the {{AbstractTxLockingInterceptor}} when iterating through all transactions from older topology). If the transaction is committed in parallel, {{AbstractCacheTransaction.clearLockedKeys}} is called which nulls the volatile field {{lockedKeys}}.
> {code}
> lockedKeys != null && lockedKeys.contains(key)
> {code}
> Contains a race condition - lockedKey may be nulled between the checks.
> Similar with {{backupKeyLocks}} but these are never nulled.

--
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