Created attachment 1207840 [details] reproducer Description of problem: The EvictionListenerNPETest unit test in the attachment fails and throws NPE in CacheNotifierImpl.notifyCacheEntriesEvicted method when trying to reinsert the first keys again. 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) How reproducible: mvn -Dtest=org.infinispan.EvictionListenerNPETest#testEvictionListener test Steps to Reproduce: 1. Download and unzip the reproducer attachement infinispan-eviction-npe.zip 2. cd infinispan-eviction-npe 3. Run "mvn -Dtest=org.infinispan.EvictionListenerNPETest#testEvictionListener test" Actual results: ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.infinispan.EvictionListenerNPETest 2016-10-06 16:57:23,858 (main) [ERROR - org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:124)] ISPN000136: Execution error java.lang.NullPointerException at org.infinispan.notifications.cachelistener.CacheNotifierImpl$1$1.getKey(CacheNotifierImpl.java:340) at org.infinispan.commons.util.InfinispanCollections.transformCollectionToMap(InfinispanCollections.java:242) at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntriesEvicted(CacheNotifierImpl.java:333) at org.infinispan.eviction.EvictionManagerImpl.onEntryEviction(EvictionManagerImpl.java:144) at org.infinispan.container.DefaultDataContainer$DefaultEvictionListener.onEntryEviction(DefaultDataContainer.java:257) at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.notifyEvictionListener(BoundedEquivalentConcurrentHashMapV8.java:285) at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.get(BoundedEquivalentConcurrentHashMapV8.java:2281) at org.infinispan.container.DefaultDataContainer.peek(DefaultDataContainer.java:141) at org.infinispan.container.DefaultDataContainer.get(DefaultDataContainer.java:146) at org.infinispan.container.EntryFactoryImpl.getFromContainer(EntryFactoryImpl.java:266) at org.infinispan.container.EntryFactoryImpl.wrapEntryForPut(EntryFactoryImpl.java:193) at org.infinispan.interceptors.EntryWrappingInterceptor.wrapEntryForPutIfNeeded(EntryWrappingInterceptor.java:173) at org.infinispan.interceptors.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:167) at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:71) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:48) at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:71) 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.visitPutKeyValueCommand(AbstractVisitor.java:34) at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:71) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) at org.infinispan.interceptors.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:148) at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:134) at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:71) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104) at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:73) at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:34) at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:71) at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:336) at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1520) at org.infinispan.CacheImpl.putInternal(CacheImpl.java:998) at org.infinispan.CacheImpl.put(CacheImpl.java:990) at org.infinispan.CacheImpl.put(CacheImpl.java:983) at org.infinispan.CacheImpl.put(CacheImpl.java:250) at org.infinispan.EvictionListenerNPETest.testEvictionListener(EvictionListenerNPETest.java:55) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:242) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:137) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Tests in error: testEvictionListener(org.infinispan.EvictionListenerNPETest) Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 Expected results: It should be passed. Additional info: Same bug exists in infinispan upstream master. https://issues.jboss.org/browse/ISPN-7080
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.