Details

    • Type: Bug
    • Status: New (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 9.2.1.Final
    • Fix Version/s: None
    • Component/s: Clustered Locks
    • Labels:
      None

      Description

      When removing a lock I get an error on the attached listener. This error is not present in 9.2.0.Final. The stack trace is included below. There seems to be a race condition: the lock is already deleted but the listener still tries to access it.

      This is the code, the error is triggered on lockManager.remove(lockName).

      CompletableFuture<Boolean> future = lockManager.remove(lockName);
      try

      { future.get(); }

      catch (InterruptedException | ExecutionException e)

      { logger.error(String.format("Failed to destroy lock %s", lockName)); }

      10:46:05.463 [main] ERROR org.infinispan.lock.impl.lock.ClusteredLockImpl - LOCK[indexSetManagementLock] Exception on lock request LockRequestHolder

      {name=indexSetManagementLock, requestId=22418e27-912f-4ff2-9e8b-41e6d0956638, requestor=infinispan-cache-test-service1-51563 (flags=0), rack-id=test-rack1, machine-id=test-server1), completed=true, completedExceptionally=false}

      org.infinispan.lock.exception.ClusteredLockException: ISPN029001: The lock was deleted.
      at org.infinispan.lock.impl.lock.ClusteredLockImpl$LockReleasedListener.entryRemoved(ClusteredLockImpl.java:248) ~[infinispan-clustered-lock-9.2.1.Final.jar:9.2.1.Final]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
      at org.infinispan.notifications.impl.AbstractListenerImpl$ListenerInvocationImpl.lambda$invoke$1(AbstractListenerImpl.java:382) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:20) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.notifications.impl.AbstractListenerImpl$ListenerInvocationImpl.invoke(AbstractListenerImpl.java:404) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.doRealInvocation(CacheNotifierImpl.java:1567) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.doRealInvocation(CacheNotifierImpl.java:1563) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.invokeNoChecks(CacheNotifierImpl.java:1558) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.invoke(CacheNotifierImpl.java:1537) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryRemoved(CacheNotifierImpl.java:412) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.commands.write.RemoveCommand.notify(RemoveCommand.java:107) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.notifications.cachelistener.NotifyHelper.entryCommitted(NotifyHelper.java:25) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.locking.ClusteringDependentLogic$ReplicationLogic.commitSingleEntry(ClusteringDependentLogic.java:427) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.commitEntry(ClusteringDependentLogic.java:176) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitContextEntry(EntryWrappingInterceptor.java:571) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitEntryIfNeeded(EntryWrappingInterceptor.java:794) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitContextEntries(EntryWrappingInterceptor.java:548) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.impl.EntryWrappingInterceptor.applyChanges(EntryWrappingInterceptor.java:604) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.impl.EntryWrappingInterceptor.lambda$setSkipRemoteGetsAndInvokeNextForDataCommand$7(EntryWrappingInterceptor.java:660) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenAccept(BaseAsyncInterceptor.java:105) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.impl.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:657) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitRemoveCommand(EntryWrappingInterceptor.java:353) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndFinally(BaseAsyncInterceptor.java:150) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lambda$nonTxLockAndInvokeNext$1(AbstractLockingInterceptor.java:285) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.SyncInvocationStage.addCallback(SyncInvocationStage.java:42) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.InvocationStage.andHandle(InvocationStage.java:44) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.locking.AbstractLockingInterceptor.nonTxLockAndInvokeNext(AbstractLockingInterceptor.java:280) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:127) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:40) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitRemoveCommand(AbstractLockingInterceptor.java:102) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:54) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.partitionhandling.impl.PartitionHandlingInterceptor.handleSingleWrite(PartitionHandlingInterceptor.java:91) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.partitionhandling.impl.PartitionHandlingInterceptor.visitRemoveCommand(PartitionHandlingInterceptor.java:64) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndHandle(BaseAsyncInterceptor.java:183) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.statetransfer.StateTransferInterceptor.handleNonTxWriteCommand(StateTransferInterceptor.java:309) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.statetransfer.StateTransferInterceptor.handleWriteCommand(StateTransferInterceptor.java:252) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.statetransfer.StateTransferInterceptor.visitRemoveCommand(StateTransferInterceptor.java:108) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitRemoveCommand(CacheMgmtInterceptor.java:420) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndExceptionally(BaseAsyncInterceptor.java:123) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:90) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:56) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:54) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.DDAsyncInterceptor.visitRemoveCommand(DDAsyncInterceptor.java:65) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:50) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invokeAsync(AsyncInterceptorChainImpl.java:234) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeededAsync(CacheImpl.java:1741) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.cache.impl.CacheImpl.removeAsync(CacheImpl.java:1587) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.cache.impl.DecoratedCache.removeAsync(DecoratedCache.java:426) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.cache.impl.AbstractDelegatingCache.removeAsync(AbstractDelegatingCache.java:229) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.cache.impl.EncoderCache.removeAsync(EncoderCache.java:336) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
      at org.infinispan.lock.impl.manager.EmbeddedClusteredLockManager.remove(EmbeddedClusteredLockManager.java:144) [infinispan-clustered-lock-9.2.1.Final.jar:9.2.1.Final]
      at com.bynubian.cache.implementation.infinispan.base.NonReentrantLock.destroy(NonReentrantLock.java:33) [classes/:?]
      at com.bynubian.elasticsearch.management.IndexSetManagement.exit(IndexSetManagement.java:365) [bynubian-elasticsearch-core-4.2.0-SNAPSHOT.jar:4.2.0-SNAPSHOT-${buildNumber}]
      at com.bynubian.elasticsearch.test.TestSyncElasticSearch.shutdown(TestSyncElasticSearch.java:52) [bynubian-elasticsearch-core-4.2.0-SNAPSHOT.jar:4.2.0-SNAPSHOT-${buildNumber}]
      at com.bynubian.test.cache.infinispan.SyncElasticSearchHandler.exit(SyncElasticSearchHandler.java:34) [test-classes/:?]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108) [testng-6.11.jar:?]
      at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523) [testng-6.11.jar:?]
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224) [testng-6.11.jar:?]
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146) [testng-6.11.jar:?]
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:350) [testng-6.11.jar:?]
      at org.testng.SuiteRunner.run(SuiteRunner.java:289) [testng-6.11.jar:?]
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) [testng-6.11.jar:?]
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) [testng-6.11.jar:?]
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301) [testng-6.11.jar:?]
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1226) [testng-6.11.jar:?]
      at org.testng.TestNG.runSuites(TestNG.java:1144) [testng-6.11.jar:?]
      at org.testng.TestNG.run(TestNG.java:1115) [testng-6.11.jar:?]
      at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:283) [surefire-testng-2.20.jar:2.20]
      at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75) [surefire-testng-2.20.jar:2.20]
      at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:120) [surefire-testng-2.20.jar:2.20]
      at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386) [surefire-booter-2.20.jar:2.20]
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323) [surefire-booter-2.20.jar:2.20]
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143) [surefire-booter-2.20.jar:2.20]

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                frankmontyne Frank Montyne
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: