]
Dan Berindei updated ISPN-7090:
-------------------------------
Status: Open (was: New)
Asynchronous invocation doesn't work well with multiple futures
---------------------------------------------------------------
Key: ISPN-7090
URL:
https://issues.jboss.org/browse/ISPN-7090
Project: Infinispan
Issue Type: Bug
Components: Core
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Critical
Labels: testsuite_stability
Fix For: 9.0.0.Beta1
ISPN-5469 made some more interceptors properly asynchronous, and that exposed a problem
in {{ComposedAsyncInvocationStage}}: when its future completes, it assumes that the
{{stage}} it receives is also completed, and that's not always the case.
Blocking with {{stage.get()}} is causing {{ManyTxsDuringStateTransferTest.testManyTxs}}
to time out and then actually hang during {{MultipleCacheManagersTest.clearContent}}:
{noformat}
"OOB-1,ManyTxsDuringStateTransferTest-NodeA-17899" #138868 prio=5 os_prio=0
tid=0x00007ffa91ac4000 nid=0x571e waiting on condition [0x00007ffa570f4000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000a379b180> (a
java.util.concurrent.CompletableFuture$Signaller)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1685)
at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3320)
at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1721)
at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1926)
at
org.infinispan.interceptors.impl.ComposedAsyncInvocationStage.get(ComposedAsyncInvocationStage.java:49)
at
org.infinispan.interceptors.impl.ComposedAsyncInvocationStage.apply(ComposedAsyncInvocationStage.java:128)
at
org.infinispan.interceptors.impl.ComposedAsyncInvocationStage.apply(ComposedAsyncInvocationStage.java:25)
at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:822)
at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:797)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1954)
at
org.infinispan.remoting.transport.jgroups.RspListFuture.futureDone(RspListFuture.java:29)
at org.jgroups.blocks.Request.checkCompletion(Request.java:152)
at org.jgroups.blocks.GroupRequest.receiveResponse(GroupRequest.java:116)
"ForkThread-1,ManyTxsDuringStateTransferTest" #139051 prio=5 os_prio=0
tid=0x00007ffa7c1e8000 nid=0x57d5 waiting on condition [0x00007ffa09d6b000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000084609c60> (a
java.util.concurrent.CompletableFuture$Signaller)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1685)
at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3320)
at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1721)
at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1926)
at
org.infinispan.interceptors.impl.ComposedAsyncInvocationStage.get(ComposedAsyncInvocationStage.java:49)
at
org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:246)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:137)
at
org.infinispan.transaction.impl.TransactionCoordinator.rollbackInternal(TransactionCoordinator.java:240)
at
org.infinispan.transaction.impl.TransactionCoordinator.rollback(TransactionCoordinator.java:179)
at
org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:148)
at
org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:113)
at org.infinispan.transaction.xa.XaTransactionTable.commit(XaTransactionTable.java:123)
at
org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:68)
at
com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:698)
"testng-ManyTxsDuringStateTransferTest" #17 prio=5 os_prio=0
tid=0x00007ffaacc82800 nid=0x3022 waiting on condition [0x00007ffa74550000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x000000008460a118> (a
java.util.concurrent.CompletableFuture$Signaller)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1685)
at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3320)
at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1721)
at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1926)
at
org.infinispan.interceptors.impl.ComposedAsyncInvocationStage.get(ComposedAsyncInvocationStage.java:49)
at
org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:246)
at org.infinispan.cache.impl.CacheImpl.clear(CacheImpl.java:569)
at org.infinispan.cache.impl.CacheImpl.clear(CacheImpl.java:561)
at org.infinispan.test.TestingUtil.killCaches(TestingUtil.java:783)
at org.infinispan.test.TestingUtil.killCacheManagers(TestingUtil.java:631)
at
org.infinispan.test.MultipleCacheManagersTest.clearContent(MultipleCacheManagersTest.java:138)
{noformat}