[JBoss JIRA] (ISPN-4732) Can't acquire locks with lockAcquisitionTimeout = 0 immediately after topology change
by Dan Berindei (JIRA)
Dan Berindei created ISPN-4732:
----------------------------------
Summary: Can't acquire locks with lockAcquisitionTimeout = 0 immediately after topology change
Key: ISPN-4732
URL: https://issues.jboss.org/browse/ISPN-4732
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 7.0.0.Beta2
Reporter: Dan Berindei
Assignee: Pedro Ruivo
Priority: Blocker
Fix For: 7.0.0.CR1
After a topology change, as long as there are still transactions from the previous topology, it's not possible to acquire locks with a lockAcquisitionTimeout of 0. {{AbstractTxLockingInterceptor}} first checks for backup locks, and throws a TimeoutException if the remaining time is <= 0. But {{waitForTransactionsToComplete}} already throws a TimeoutException if the timeout was exceeded, so the additional check is not needed.
This caused a random failure in SyncDistTxClusterExtendedStatisticLogicTest.testConditionalPutTxAndReadOnlyTx:
{noformat}
20:43:28,771 ERROR (testng-SyncDistTxClusterExtendedStatisticLogicTest:) [UnitTestTestNGListener] Test testConditionalPutTxAndReadOnlyTx(org.infinispan.stats.logic.SyncDistTxClusterExtendedStatisticLogicTest) failed.
javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1177)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
at org.infinispan.stats.BaseTxClusterExtendedStatisticLogicTest.testStats(BaseTxClusterExtendedStatisticLogicTest.java:242)
at org.infinispan.stats.BaseTxClusterExtendedStatisticLogicTest.testConditionalPutTxAndReadOnlyTx(BaseTxClusterExtendedStatisticLogicTest.java:104)
Caused by: org.infinispan.commons.CacheException: Could not prepare.
at org.infinispan.transaction.synchronization.SynchronizationAdapter.beforeCompletion(SynchronizationAdapter.java:46)
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
... 23 more
Caused by: javax.transaction.xa.XAException
at org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:141)
at org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:104)
at org.infinispan.transaction.synchronization.SynchronizationAdapter.beforeCompletion(SynchronizationAdapter.java:44)
... 28 more
Caused by: org.infinispan.util.concurrent.TimeoutException: Could not acquire lock on MagicKey#KEY_38{b4f7313c@NodeA-6769/0} on behalf of transaction GlobalTransaction:<NodeA-6769>:418:local.Lock is being held by null
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.newTimeoutException(AbstractTxLockingInterceptor.java:200)
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockKeyAndCheckOwnership(AbstractTxLockingInterceptor.java:158)
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockAndRegisterBackupLock(AbstractTxLockingInterceptor.java:98)
at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.acquireAllLocks(OptimisticLockingInterceptor.java:262)
at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitPrepareCommand(OptimisticLockingInterceptor.java:84)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:36)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at org.infinispan.stats.wrappers.ExtendedStatisticInterceptor.visitPrepareCommand(ExtendedStatisticInterceptor.java:122)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:124)
at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:111)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:97)
at org.infinispan.statetransfer.TransactionSynchronizerInterceptor.visitPrepareCommand(TransactionSynchronizerInterceptor.java:42)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:217)
at org.infinispan.statetransfer.StateTransferInterceptor.handleTxCommand(StateTransferInterceptor.java:147)
at org.infinispan.statetransfer.StateTransferInterceptor.visitPrepareCommand(StateTransferInterceptor.java:75)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:97)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:108)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:71)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:97)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at org.infinispan.util.TransactionTrackInterceptor.visitPrepareCommand(TransactionTrackInterceptor.java:81)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:333)
at org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:121)
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (ISPN-4732) Can't acquire locks with lockAcquisitionTimeout = 0 immediately after topology change
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-4732?page=com.atlassian.jira.plugin.... ]
Dan Berindei reassigned ISPN-4732:
----------------------------------
Assignee: Dan Berindei (was: Pedro Ruivo)
> Can't acquire locks with lockAcquisitionTimeout = 0 immediately after topology change
> -------------------------------------------------------------------------------------
>
> Key: ISPN-4732
> URL: https://issues.jboss.org/browse/ISPN-4732
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 7.0.0.Beta2
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Blocker
> Labels: testsuite_stability
> Fix For: 7.0.0.CR1
>
>
> After a topology change, as long as there are still transactions from the previous topology, it's not possible to acquire locks with a lockAcquisitionTimeout of 0. {{AbstractTxLockingInterceptor}} first checks for backup locks, and throws a TimeoutException if the remaining time is <= 0. But {{waitForTransactionsToComplete}} already throws a TimeoutException if the timeout was exceeded, so the additional check is not needed.
> This caused a random failure in SyncDistTxClusterExtendedStatisticLogicTest.testConditionalPutTxAndReadOnlyTx:
> {noformat}
> 20:43:28,771 ERROR (testng-SyncDistTxClusterExtendedStatisticLogicTest:) [UnitTestTestNGListener] Test testConditionalPutTxAndReadOnlyTx(org.infinispan.stats.logic.SyncDistTxClusterExtendedStatisticLogicTest) failed.
> javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
> at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1177)
> at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
> at org.infinispan.stats.BaseTxClusterExtendedStatisticLogicTest.testStats(BaseTxClusterExtendedStatisticLogicTest.java:242)
> at org.infinispan.stats.BaseTxClusterExtendedStatisticLogicTest.testConditionalPutTxAndReadOnlyTx(BaseTxClusterExtendedStatisticLogicTest.java:104)
> Caused by: org.infinispan.commons.CacheException: Could not prepare.
> at org.infinispan.transaction.synchronization.SynchronizationAdapter.beforeCompletion(SynchronizationAdapter.java:46)
> at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
> at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
> at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
> at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
> at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
> ... 23 more
> Caused by: javax.transaction.xa.XAException
> at org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:141)
> at org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:104)
> at org.infinispan.transaction.synchronization.SynchronizationAdapter.beforeCompletion(SynchronizationAdapter.java:44)
> ... 28 more
> Caused by: org.infinispan.util.concurrent.TimeoutException: Could not acquire lock on MagicKey#KEY_38{b4f7313c@NodeA-6769/0} on behalf of transaction GlobalTransaction:<NodeA-6769>:418:local.Lock is being held by null
> at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.newTimeoutException(AbstractTxLockingInterceptor.java:200)
> at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockKeyAndCheckOwnership(AbstractTxLockingInterceptor.java:158)
> at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockAndRegisterBackupLock(AbstractTxLockingInterceptor.java:98)
> at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.acquireAllLocks(OptimisticLockingInterceptor.java:262)
> at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitPrepareCommand(OptimisticLockingInterceptor.java:84)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:36)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.stats.wrappers.ExtendedStatisticInterceptor.visitPrepareCommand(ExtendedStatisticInterceptor.java:122)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:124)
> at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:111)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112)
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:97)
> at org.infinispan.statetransfer.TransactionSynchronizerInterceptor.visitPrepareCommand(TransactionSynchronizerInterceptor.java:42)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:217)
> at org.infinispan.statetransfer.StateTransferInterceptor.handleTxCommand(StateTransferInterceptor.java:147)
> at org.infinispan.statetransfer.StateTransferInterceptor.visitPrepareCommand(StateTransferInterceptor.java:75)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112)
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:97)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:108)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:71)
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:97)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.util.TransactionTrackInterceptor.visitPrepareCommand(TransactionTrackInterceptor.java:81)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:333)
> at org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:121)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (ISPN-4579) SingleNodeJdbcStoreIT.cleanup NPE after test failure
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-4579?page=com.atlassian.jira.plugin.... ]
Dan Berindei commented on ISPN-4579:
------------------------------------
Sorry Galder, I can't find the build. There are a few more recent failures in SingleNodeJdbcStoreIT, but with different failure modes - e.g. http://ci.infinispan.org/viewLog.html?buildId=11408&tab=buildResultsDiv&b...
I didn't think the build log was relevant, since we were just moving the PR builds to the OS1 agents, and we were getting all kinds of weird errors at the time. Feel free to mark the test as unstable, but all I wanted was a null check in the cleanup method :)
> SingleNodeJdbcStoreIT.cleanup NPE after test failure
> ----------------------------------------------------
>
> Key: ISPN-4579
> URL: https://issues.jboss.org/browse/ISPN-4579
> Project: Infinispan
> Issue Type: Bug
> Components: Test Suite - Server
> Affects Versions: 7.0.0.Alpha5
> Reporter: Dan Berindei
> Assignee: Galder Zamarreño
> Labels: testsuite_stability
> Fix For: 7.0.0.CR1
>
>
> After a failure in {{SingleNodeJdbcStoreIT.testForcedShutdown}}, it seems not all the test stores are properly initialized, and cleanup fails with a NullPointerException:
> {noformat}
> [00:57:07] : [testForcedShutdown] java.lang.AssertionError: null
> at org.junit.Assert.fail(Assert.java:86)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at org.junit.Assert.assertNotNull(Assert.java:621)
> at org.junit.Assert.assertNotNull(Assert.java:631)
> at org.infinispan.server.test.cs.jdbc.SingleNodeJdbcStoreIT.testRestartStringStoreBefore(SingleNodeJdbcStoreIT.java:223)
> at org.infinispan.server.test.cs.jdbc.SingleNodeJdbcStoreIT.testForcedShutdown(SingleNodeJdbcStoreIT.java:163)
> ...
> [00:57:07]W: [org.infinispan.server:test-suite] java.lang.NullPointerException
> at org.infinispan.server.test.cs.jdbc.SingleNodeJdbcStoreIT.cleanup(SingleNodeJdbcStoreIT.java:82)
> {noformat}
> This bug is only about the NPE, the test failure is agent-specific (probably caused by the low open files/user processes limits).
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (ISPN-4563) Race condition in JCache creation for interceptors
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-4563?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño commented on ISPN-4563:
----------------------------------------
Sebastian, the TCK is correct, {{createCache}} should throw a CacheException if the cache is already known, as indicated in the Javadoc. The problem here is that this kind of API forces you to do this in the cache resolver implementation:
{code}
Cache ... = getCache();
if (c != null) return c;
else ... createCache
{code}
However, this kind of code will only work if it's synchronized somehow to deal with concurrent environments. The RI follows this pattern too, but it does not synchronize stuff.
> Race condition in JCache creation for interceptors
> --------------------------------------------------
>
> Key: ISPN-4563
> URL: https://issues.jboss.org/browse/ISPN-4563
> Project: Infinispan
> Issue Type: Bug
> Components: CDI Integration
> Affects Versions: 6.0.2.Final
> Reporter: Elias Ross
> Assignee: Sebastian Łaskawiec
> Fix For: 7.0.0.Final
>
>
> Intercepted methods, annotated like @CacheResult, if called from multiple threads, can attempt to create multiple caches.
> Work-around is to create the cache in a @PostContruct block.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months