[infinispan-issues] [JBoss JIRA] (ISPN-2361) AbstractTxLockingInterceptor.lockKeyAndCheckOwnership() anomalies: can wait indefinitelly or it can wait too little due to spurious wakeups

Adrian Nistor (JIRA) jira-events at lists.jboss.org
Tue Oct 2 10:09:10 EDT 2012


Adrian Nistor created ISPN-2361:
-----------------------------------

             Summary: AbstractTxLockingInterceptor.lockKeyAndCheckOwnership() anomalies: can wait indefinitelly or it can wait too little due to spurious wakeups
                 Key: ISPN-2361
                 URL: https://issues.jboss.org/browse/ISPN-2361
             Project: Infinispan
          Issue Type: Bug
          Components: Transactions
    Affects Versions: 5.2.0.Alpha4
            Reporter: Adrian Nistor
            Assignee: Adrian Nistor
             Fix For: 5.2.0.Beta1


When waiting for pending locks we can get into 2 cases that are not correctly handled:

1. The check for remaining time (remaining < 0) is incorrect because if remaining == 0 it will try to wait for transactions (waitForLockRelease) with 0 timeout (indefinitely).

2. CacheTransaction.waitForLockRelease() can return earlier than the specified timeout and the transaction might not yet be complete. This happens because the mechanism inside waitForLockRelease() does not protect itself from spurious wakeups leaving this to the caller. AbstractTxLockingInterceptor must be fixed to take care of this.

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