]
Dan Berindei resolved ISPN-9907.
--------------------------------
Fix Version/s: 9.4.16.Final
Assignee: Dan Berindei
Resolution: Done
Fixed with ISPN-10239 in 9.4.x and fixed by removing atomic maps in 10.x
NullPointerException when async operations share a LocalTransaction
-------------------------------------------------------------------
Key: ISPN-9907
URL:
https://issues.jboss.org/browse/ISPN-9907
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 10.0.0.Alpha3, 9.4.6.Final
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Major
Labels: testsuite_stability
Fix For: 9.4.16.Final
Attachments:
ISPN-4075_timestamps_improvements_20190128-1450_DistFineGrainedAtomicMapAPITest-infinispan-core.log.gz
I'm not convinced we should support invoking multiple cache operations bound to the
same TM transaction in parallel, but {{FineGrainedAtomicMapProxyImpl.removeAll()}} calls
{{AdvancedCache.removeAsync()}} for each key in the map and then blocks to wait for all of
them.
Because the {{lookedUpEntries}} map in {{LocalTransaction}} is not synchronized, this
makes {{DistFineGrainedAtomicMapAPITest}} fail randomly with a {{NullPointerException}}:
{noformat}
15:05:36,898 ERROR (testng-Test:[]) [TestSuiteProgress] Test failed:
org.infinispan.atomic.DistFineGrainedAtomicMapAPITest.testReplicationPutAndClearCommit
java.lang.NullPointerException: null
at
org.infinispan.interceptors.impl.CallInterceptor.visitRemoveCommand(CallInterceptor.java:238)
~[classes/:?]
at
org.infinispan.interceptors.impl.CallInterceptor.visitRemoveCommand(CallInterceptor.java:226)
~[classes/:?]
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:51)
~[classes/:?]
at
org.infinispan.interceptors.impl.CallInterceptor.visitCommand(CallInterceptor.java:160)
~[classes/:?]
at
org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndFinally(BaseAsyncInterceptor.java:152)
~[classes/:?]
at
org.infinispan.interceptors.distribution.TxDistributionInterceptor.handleTxWriteCommand(TxDistributionInterceptor.java:427)
~[classes/:?]
at
org.infinispan.interceptors.distribution.TxDistributionInterceptor.visitRemoveCommand(TxDistributionInterceptor.java:138)
~[classes/:?]
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:51)
~[classes/:?]
at
org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenAccept(BaseAsyncInterceptor.java:98)
~[classes/:?]
at
org.infinispan.interceptors.impl.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:671)
~[classes/:?]
at
org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitRemoveCommand(EntryWrappingInterceptor.java:356)
~[classes/:?]
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:51)
~[classes/:?]
at
org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54)
~[classes/:?]
at
org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:53)
~[classes/:?]
at
org.infinispan.interceptors.DDAsyncInterceptor.visitRemoveCommand(DDAsyncInterceptor.java:64)
~[classes/:?]
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:51)
~[classes/:?]
at
org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54)
~[classes/:?]
at
org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:53)
~[classes/:?]
at
org.infinispan.interceptors.DDAsyncInterceptor.visitRemoveCommand(DDAsyncInterceptor.java:64)
~[classes/:?]
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:51)
~[classes/:?]
at
org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54)
~[classes/:?]
at
org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lambda$new$0(AbstractTxLockingInterceptor.java:34)
~[classes/:?]
at
org.infinispan.interceptors.InvocationSuccessFunction.apply(InvocationSuccessFunction.java:25)
~[classes/:?]
at
org.infinispan.interceptors.SyncInvocationStage.addCallback(SyncInvocationStage.java:42)
~[classes/:?]
at org.infinispan.interceptors.InvocationStage.thenApply(InvocationStage.java:45)
~[classes/:?]
at
org.infinispan.interceptors.locking.PessimisticLockingInterceptor.acquireLocalLockAndInvokeNext(PessimisticLockingInterceptor.java:283)
~[classes/:?]
at
org.infinispan.interceptors.locking.PessimisticLockingInterceptor.lambda$visitDataWriteCommand$3(PessimisticLockingInterceptor.java:154)
~[classes/:?]
at
org.infinispan.interceptors.InvocationSuccessFunction.apply(InvocationSuccessFunction.java:25)
~[classes/:?]
at
org.infinispan.interceptors.impl.QueueAsyncInvocationStage.invokeQueuedHandlers(QueueAsyncInvocationStage.java:118)
~[classes/:?]
at
org.infinispan.interceptors.impl.QueueAsyncInvocationStage.accept(QueueAsyncInvocationStage.java:81)
~[classes/:?]
at
org.infinispan.interceptors.impl.QueueAsyncInvocationStage.accept(QueueAsyncInvocationStage.java:30)
~[classes/:?]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
~[?:1.8.0_171]
at
java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
~[?:1.8.0_171]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
~[?:1.8.0_171]
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
~[?:1.8.0_171]
at org.infinispan.remoting.transport.AbstractRequest.complete(AbstractRequest.java:67)
~[classes/:?]
at
org.infinispan.remoting.transport.impl.MultiTargetRequest.onResponse(MultiTargetRequest.java:102)
~[classes/:?]
at
org.infinispan.remoting.transport.impl.RequestRepository.addResponse(RequestRepository.java:52)
~[classes/:?]
at
org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1372)
~[classes/:?]
at
org.infinispan.remoting.transport.jgroups.JGroupsTransport.processMessage(JGroupsTransport.java:1275)
~[classes/:?]
Suppressed: org.infinispan.util.logging.TraceException
at
org.infinispan.interceptors.impl.SimpleAsyncInvocationStage.get(SimpleAsyncInvocationStage.java:41)
~[classes/:?]
at
org.infinispan.interceptors.impl.QueueAsyncInvocationStage.invokeQueuedHandlers(QueueAsyncInvocationStage.java:138)
~[classes/:?]
at
org.infinispan.interceptors.impl.QueueAsyncInvocationStage.accept(QueueAsyncInvocationStage.java:81)
~[classes/:?]
at
org.infinispan.interceptors.impl.QueueAsyncInvocationStage.accept(QueueAsyncInvocationStage.java:30)
~[classes/:?]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
~[?:1.8.0_171]
at
java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
~[?:1.8.0_171]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
~[?:1.8.0_171]
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
~[?:1.8.0_171]
at org.infinispan.remoting.transport.AbstractRequest.complete(AbstractRequest.java:67)
~[classes/:?]
at
org.infinispan.remoting.transport.impl.MultiTargetRequest.onResponse(MultiTargetRequest.java:102)
~[classes/:?]
at
org.infinispan.remoting.transport.impl.RequestRepository.addResponse(RequestRepository.java:52)
~[classes/:?]
at
org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1372)
~[classes/:?]
at
org.infinispan.remoting.transport.jgroups.JGroupsTransport.processMessage(JGroupsTransport.java:1275)
~[classes/:?]
{noformat}