Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-7080

NPE in CacheNotifierImpl by LIRS eviction listener

    Details

    • Steps to Reproduce:
      Hide
      • Update testSimpleEvictionMaxEntries method of org.infinispan.eviction.impl.BaseEvictionFunctionalTest like below:
          public void testSimpleEvictionMaxEntries() throws Exception {
             // inserting 20 keys - values in a 10 sized cache ( keys from key-1 to key-20)
             for (int i = 0; i < CACHE_SIZE*2; i++) {
                cache.put("key-" + (i + 1), "value-" + (i + 1), 1, TimeUnit.MINUTES);
             }
             Thread.sleep(1000); // sleep long enough to allow the thread to wake-up
             assert CACHE_SIZE >= cache.size() : "cache size too big: " + cache.size();
        
             // and then reinsert the first 10 keys (key-1 to key-10)
             for (int i = 0; i < CACHE_SIZE; i++) {
                cache.put("key-" + (i + 1), "value-" + (i + 1), 1, TimeUnit.MINUTES);
             }
          }
        
      • Run the test method:
        mvn -Dtest=org.infinispan.eviction.impl.LIRSEvictionFunctionalTest#testSimpleEvictionMaxEntries test
        
      • Error stack trace:
        -------------------------------------------------------
         T E S T S
        -------------------------------------------------------
        Running org.infinispan.eviction.impl.LIRSEvictionFunctionalTest
        Configuring TestNG with: TestNG652Configurator
        [TestSuiteProgress] Test starting: org.infinispan.eviction.impl.LIRSEvictionFunctionalTest.testSimpleEvictionMaxEntries
        LIRS
        15:33:05,286 ERROR (testng-LIRSEvictionFunctionalTest) [InvocationContextInterceptor] ISPN000136: Error executing command PutKeyValueCommand, writing keys [key-10]
        java.lang.NullPointerException
        	at org.infinispan.notifications.cachelistener.CacheNotifierImpl$1$1.getKey(CacheNotifierImpl.java:506)
        	at org.infinispan.commons.util.InfinispanCollections.transformCollectionToMap(InfinispanCollections.java:109)
        	at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntriesEvicted(CacheNotifierImpl.java:499)
        	at org.infinispan.eviction.impl.EvictionManagerImpl.onEntryEviction(EvictionManagerImpl.java:43)
        	at org.infinispan.container.DefaultDataContainer$DefaultEvictionListener.onEntryEviction(DefaultDataContainer.java:360)
        	at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.notifyEvictionListener(BoundedEquivalentConcurrentHashMapV8.java:375)
        	at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.compute(BoundedEquivalentConcurrentHashMapV8.java:3682)
        	at org.infinispan.container.DefaultDataContainer.put(DefaultDataContainer.java:234)
        	at org.infinispan.container.entries.ReadCommittedEntry.commit(ReadCommittedEntry.java:175)[TestSuiteProgress] Test failed: org.infinispan.eviction.impl.LIRSEvictionFunctionalTest.testSimpleEvictionMaxEntries
        15:33:05,292 ERROR (testng-LIRSEvictionFunctionalTest) [TestSuiteProgress] Test failed: org.infinispan.eviction.impl.LIRSEvictionFunctionalTest.testSimpleEvictionMaxEntries
        org.infinispan.commons.CacheException: java.lang.NullPointerException
        	at org.infinispan.interceptors.impl.InvocationContextInterceptor.rethrowException(InvocationContextInterceptor.java:140)
        	at org.infinispan.interceptors.impl.InvocationContextInterceptor.access$000(InvocationContextInterceptor.java:46)
        	at org.infinispan.interceptors.impl.InvocationContextInterceptor$1.apply(InvocationContextInterceptor.java:62)
        	at org.infinispan.interceptors.impl.ExceptionStage.exceptionally(ExceptionStage.java:62)
        	at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:107)
        	at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:245)
        	at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1518)
        	at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1125)
        	at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1115)[TestSuiteProgress] Tests succeeded: 0, failed: 1, skipped: 0
        Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.276 sec <<< FAILURE! - in org.infinispan.eviction.impl.LIRSEvictionFunctionalTest
        testSimpleEvictionMaxEntries(org.infinispan.eviction.impl.LIRSEvictionFunctionalTest)  Time elapsed: 1.085 sec  <<< FAILURE!
        org.infinispan.commons.CacheException: java.lang.NullPointerException
        	at org.infinispan.interceptors.impl.InvocationContextInterceptor.rethrowException(InvocationContextInterceptor.java:140)
        	at org.infinispan.interceptors.impl.InvocationContextInterceptor.access$000(InvocationContextInterceptor.java:46)
        	at org.infinispan.interceptors.impl.InvocationContextInterceptor$1.apply(InvocationContextInterceptor.java:62)
        	at org.infinispan.interceptors.impl.ExceptionStage.exceptionally(ExceptionStage.java:62)
        	at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:107)
        	at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:245)
        	at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1518)
        	at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1125)
        	at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1115)
        	at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1108)
        	at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:248)
        	at org.infinispan.eviction.impl.BaseEvictionFunctionalTest.testSimpleEvictionMaxEntries(BaseEvictionFunctionalTest.java:58)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:498)
        	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
        	at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
        	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
        	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
        	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
        	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
        	at org.testng.TestRunner.privateRun(TestRunner.java:767)
        	at org.testng.TestRunner.run(TestRunner.java:617)
        	at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
        	at org.testng.SuiteRunner.access$000(SuiteRunner.java:38)
        	at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:382)
        	at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
        	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        	at java.lang.Thread.run(Thread.java:745)
        	Suppressed: java.lang.NullPointerException
        		at org.infinispan.notifications.cachelistener.CacheNotifierImpl$1$1.getKey(CacheNotifierImpl.java:506)
        		at org.infinispan.commons.util.InfinispanCollections.transformCollectionToMap(InfinispanCollections.java:109)
        		at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntriesEvicted(CacheNotifierImpl.java:499)
        		at org.infinispan.eviction.impl.EvictionManagerImpl.onEntryEviction(EvictionManagerImpl.java:43)
        		at org.infinispan.container.DefaultDataContainer$DefaultEvictionListener.onEntryEviction(DefaultDataContainer.java:360)
        		at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.notifyEvictionListener(BoundedEquivalentConcurrentHashMapV8.java:375)
        		at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.compute(BoundedEquivalentConcurrentHashMapV8.java:3682)
        		at org.infinispan.container.DefaultDataContainer.put(DefaultDataContainer.java:234)
        		at org.infinispan.container.entries.ReadCommittedEntry.commit(ReadCommittedEntry.java:175)
        		at org.infinispan.statetransfer.CommitManager.commit(CommitManager.java:100)
        		at org.infinispan.interceptors.locking.ClusteringDependentLogic$LocalLogic.commitSingleEntry(ClusteringDependentLogic.java:301)
        		at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.commitEntry(ClusteringDependentLogic.java:117)
        		at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitContextEntry(EntryWrappingInterceptor.java:580)
        		at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitEntryIfNeeded(EntryWrappingInterceptor.java:746)
        		at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitContextEntries(EntryWrappingInterceptor.java:557)
        		at org.infinispan.interceptors.impl.EntryWrappingInterceptor.applyChanges(EntryWrappingInterceptor.java:614)
        		at org.infinispan.interceptors.impl.EntryWrappingInterceptor.lambda$setSkipRemoteGetsAndInvokeNextForDataCommand$5(EntryWrappingInterceptor.java:649)
        		at org.infinispan.interceptors.impl.ReturnValueStage.thenAccept(ReturnValueStage.java:46)
        		at org.infinispan.interceptors.impl.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:646)
        		at org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:296)
        		at org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:84)
        		at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
        		at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49)
        		at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:52)
        		at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:116)
        		at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:38)
        		at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:77)
        		at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:45)
        		at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
        		at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49)
        		at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:52)
        		at org.infinispan.interceptors.impl.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:165)
        		at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:154)
        		at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:41)
        		at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
        		at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49)
        		at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:52)
        		at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:106)
        		... 27 more
        	[CIRCULAR REFERENCE:java.lang.NullPointerException]
        
        
        Results :
        
        Failed tests: 
          LIRSEvictionFunctionalTest>BaseEvictionFunctionalTest.testSimpleEvictionMaxEntries:58 » Cache
        
        Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
        
      Show
      Update testSimpleEvictionMaxEntries method of org.infinispan.eviction.impl.BaseEvictionFunctionalTest like below: public void testSimpleEvictionMaxEntries() throws Exception { // inserting 20 keys - values in a 10 sized cache ( keys from key-1 to key-20) for ( int i = 0; i < CACHE_SIZE*2; i++) { cache.put( "key-" + (i + 1), "value-" + (i + 1), 1, TimeUnit.MINUTES); } Thread .sleep(1000); // sleep long enough to allow the thread to wake-up assert CACHE_SIZE >= cache.size() : "cache size too big: " + cache.size(); // and then reinsert the first 10 keys (key-1 to key-10) for ( int i = 0; i < CACHE_SIZE; i++) { cache.put( "key-" + (i + 1), "value-" + (i + 1), 1, TimeUnit.MINUTES); } } Run the test method: mvn -Dtest=org.infinispan.eviction.impl.LIRSEvictionFunctionalTest#testSimpleEvictionMaxEntries test Error stack trace: ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.infinispan.eviction.impl.LIRSEvictionFunctionalTest Configuring TestNG with: TestNG652Configurator [TestSuiteProgress] Test starting: org.infinispan.eviction.impl.LIRSEvictionFunctionalTest.testSimpleEvictionMaxEntries LIRS 15:33:05,286 ERROR (testng-LIRSEvictionFunctionalTest) [InvocationContextInterceptor] ISPN000136: Error executing command PutKeyValueCommand, writing keys [key-10] java.lang.NullPointerException at org.infinispan.notifications.cachelistener.CacheNotifierImpl$1$1.getKey(CacheNotifierImpl.java:506) at org.infinispan.commons.util.InfinispanCollections.transformCollectionToMap(InfinispanCollections.java:109) at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntriesEvicted(CacheNotifierImpl.java:499) at org.infinispan.eviction.impl.EvictionManagerImpl.onEntryEviction(EvictionManagerImpl.java:43) at org.infinispan.container.DefaultDataContainer$DefaultEvictionListener.onEntryEviction(DefaultDataContainer.java:360) at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.notifyEvictionListener(BoundedEquivalentConcurrentHashMapV8.java:375) at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.compute(BoundedEquivalentConcurrentHashMapV8.java:3682) at org.infinispan.container.DefaultDataContainer.put(DefaultDataContainer.java:234) at org.infinispan.container.entries.ReadCommittedEntry.commit(ReadCommittedEntry.java:175)[TestSuiteProgress] Test failed: org.infinispan.eviction.impl.LIRSEvictionFunctionalTest.testSimpleEvictionMaxEntries 15:33:05,292 ERROR (testng-LIRSEvictionFunctionalTest) [TestSuiteProgress] Test failed: org.infinispan.eviction.impl.LIRSEvictionFunctionalTest.testSimpleEvictionMaxEntries org.infinispan.commons.CacheException: java.lang.NullPointerException at org.infinispan.interceptors.impl.InvocationContextInterceptor.rethrowException(InvocationContextInterceptor.java:140) at org.infinispan.interceptors.impl.InvocationContextInterceptor.access$000(InvocationContextInterceptor.java:46) at org.infinispan.interceptors.impl.InvocationContextInterceptor$1.apply(InvocationContextInterceptor.java:62) at org.infinispan.interceptors.impl.ExceptionStage.exceptionally(ExceptionStage.java:62) at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:107) at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:245) at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1518) at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1125) at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1115)[TestSuiteProgress] Tests succeeded: 0, failed: 1, skipped: 0 Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.276 sec <<< FAILURE! - in org.infinispan.eviction.impl.LIRSEvictionFunctionalTest testSimpleEvictionMaxEntries(org.infinispan.eviction.impl.LIRSEvictionFunctionalTest) Time elapsed: 1.085 sec <<< FAILURE! org.infinispan.commons.CacheException: java.lang.NullPointerException at org.infinispan.interceptors.impl.InvocationContextInterceptor.rethrowException(InvocationContextInterceptor.java:140) at org.infinispan.interceptors.impl.InvocationContextInterceptor.access$000(InvocationContextInterceptor.java:46) at org.infinispan.interceptors.impl.InvocationContextInterceptor$1.apply(InvocationContextInterceptor.java:62) at org.infinispan.interceptors.impl.ExceptionStage.exceptionally(ExceptionStage.java:62) at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:107) at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:245) at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1518) at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1125) at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1115) at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1108) at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:248) at org.infinispan.eviction.impl.BaseEvictionFunctionalTest.testSimpleEvictionMaxEntries(BaseEvictionFunctionalTest.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84) at org.testng.internal.Invoker.invokeMethod(Invoker.java:714) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:617) at org.testng.SuiteRunner.runTest(SuiteRunner.java:348) at org.testng.SuiteRunner.access$000(SuiteRunner.java:38) at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:382) at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang. Thread .run( Thread .java:745) Suppressed: java.lang.NullPointerException at org.infinispan.notifications.cachelistener.CacheNotifierImpl$1$1.getKey(CacheNotifierImpl.java:506) at org.infinispan.commons.util.InfinispanCollections.transformCollectionToMap(InfinispanCollections.java:109) at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntriesEvicted(CacheNotifierImpl.java:499) at org.infinispan.eviction.impl.EvictionManagerImpl.onEntryEviction(EvictionManagerImpl.java:43) at org.infinispan.container.DefaultDataContainer$DefaultEvictionListener.onEntryEviction(DefaultDataContainer.java:360) at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.notifyEvictionListener(BoundedEquivalentConcurrentHashMapV8.java:375) at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.compute(BoundedEquivalentConcurrentHashMapV8.java:3682) at org.infinispan.container.DefaultDataContainer.put(DefaultDataContainer.java:234) at org.infinispan.container.entries.ReadCommittedEntry.commit(ReadCommittedEntry.java:175) at org.infinispan.statetransfer.CommitManager.commit(CommitManager.java:100) at org.infinispan.interceptors.locking.ClusteringDependentLogic$LocalLogic.commitSingleEntry(ClusteringDependentLogic.java:301) at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.commitEntry(ClusteringDependentLogic.java:117) at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitContextEntry(EntryWrappingInterceptor.java:580) at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitEntryIfNeeded(EntryWrappingInterceptor.java:746) at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitContextEntries(EntryWrappingInterceptor.java:557) at org.infinispan.interceptors.impl.EntryWrappingInterceptor.applyChanges(EntryWrappingInterceptor.java:614) at org.infinispan.interceptors.impl.EntryWrappingInterceptor.lambda$setSkipRemoteGetsAndInvokeNextForDataCommand$5(EntryWrappingInterceptor.java:649) at org.infinispan.interceptors.impl.ReturnValueStage.thenAccept(ReturnValueStage.java:46) at org.infinispan.interceptors.impl.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:646) at org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:296) at org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:84) at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49) at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:52) at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:116) at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:38) at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:77) at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:45) at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49) at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:52) at org.infinispan.interceptors.impl.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:165) at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:154) at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:41) at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49) at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:52) at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:106) ... 27 more [CIRCULAR REFERENCE:java.lang.NullPointerException] Results : Failed tests: LIRSEvictionFunctionalTest>BaseEvictionFunctionalTest.testSimpleEvictionMaxEntries:58 » Cache Tests run: 1, Failures: 1, Errors: 0, Skipped: 0

      Description

      The LIRSEvictionFunctionalTest.testSimpleEvictionMaxEntries unit test method in core module fails and throws NPE in CacheNotifierImpl.notifyCacheEntriesEvicted method when trying to reinsert the first keys again.
      https://github.com/infinispan/infinispan/blob/master/core/src/test/java/org/infinispan/eviction/impl/LIRSEvictionFunctionalTest.java
      It reproduces only with LIRS eviction strategy and eviction listener.
      However, LRU and UNORDERED eviction strategies are working properly.
      It makes impossible the use of eviction listeners with LIRS eviction strategy.

      It's able to reproduce by:

      • inserting 20 keys - values in a 10 sized cache ( keys from key-1 to key-20),
      • and then reinsert the first 10 keys (key-1 to key-10)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  william.burns Will Burns
                  Reporter:
                  rhn-support-jwon Ted Won
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: