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

Avoid NullPointerException errors in the core test suite logs

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 8.2.0.Final
    • 8.2.0.Beta2
    • Test Suite
    • None

      Some tests log NullPointerException-caused error messages when they pass, which makes it hard to tell if it's a real problem or not.

      CacheManagerTest: cluster executor tests throw NullPointerException explicitly.

      11:20:04,030 WARN  (remote-thread-CacheManagerTest-NodeN-p1091-t1:) [GlobalInboundInvocationHandler] ISPN000071: Caught exception when handling command org.infinispan.manager.impl.ReplicableCommandRunnable@6c20c6c7
      java.lang.NullPointerException
      	at org.infinispan.manager.CacheManagerTest$13.lambda$call$81c80a4a$1(CacheManagerTest.java:594) ~[test-classes/:?]
      	at org.infinispan.manager.impl.ReplicableCommandRunnable.perform(ReplicableCommandRunnable.java:33) ~[classes/:?]
      	at org.infinispan.remoting.inboundhandler.GlobalInboundInvocationHandler$2.run(GlobalInboundInvocationHandler.java:158) [classes/:?]
      	at org.infinispan.util.concurrent.BlockingTaskAwareExecutorServiceImpl$RunnableWrapper.run(BlockingTaskAwareExecutorServiceImpl.java:199) [classes/:?]
      

      Various tests, during cluster shutdown: an incoming CacheTopologyControlCommand can re-create the ClusterTopologyManager component, and call handleRebalanceCompleted() without start().

      11:21:24,637 WARN  (remote-thread-NumOwnersNodeStopInSequenceTest-NodeY-p8288-t6:) [CacheTopologyControlCommand] ISPN000071: Caught exception when handling command CacheTopologyControlCommand{cache=___defaultcache, type=REBALANCE_CONFIRM, sender=NumOwnersNodeStopInSequenceTest-NodeAB-56593, joinInfo=null, topologyId=9, rebalanceId=0, currentCH=null, pendingCH=null, availabilityMode=null, actualMembers=null, throwable=null, viewId=3}
      java.lang.NullPointerException
      	at org.infinispan.topology.ClusterTopologyManagerImpl.handleRebalanceCompleted(ClusterTopologyManagerImpl.java:219) ~[classes/:?]
      	at org.infinispan.topology.CacheTopologyControlCommand.doPerform(CacheTopologyControlCommand.java:176) ~[classes/:?]
      	at org.infinispan.topology.CacheTopologyControlCommand.perform(CacheTopologyControlCommand.java:153) [classes/:?]
      	at org.infinispan.remoting.inboundhandler.GlobalInboundInvocationHandler$2.run(GlobalInboundInvocationHandler.java:158) [classes/:?]
      	at org.infinispan.util.concurrent.BlockingTaskAwareExecutorServiceImpl$RunnableWrapper.run(BlockingTaskAwareExecutorServiceImpl.java:199) [classes/:?]
      

      InitialClusterSizeTest: stops the cache manager after if failed to start, and DefaultCacheManager.stop() throws an exception because the internal cache registry was not registered.

      11:21:29,827 WARN  (testng-InitialClusterSizeTest:) [TestingUtil] Problems killing cache manager org.infinispan.manager.DefaultCacheManager@1d9fdcf9@Address:null
      java.lang.NullPointerException
      	at org.infinispan.manager.DefaultCacheManager.stop(DefaultCacheManager.java:684) ~[classes/:?]
      	at org.infinispan.test.TestingUtil.killCacheManagers(TestingUtil.java:643) [test-classes/:?]
      	at org.infinispan.test.MultipleCacheManagersTest.clearContent(MultipleCacheManagersTest.java:101) [test-classes/:?]
      

      DistributedExecutorTest: testCancelAndGet uses a LongRunningCallable, but never registers the barrier it needs in the cache.

      11:22:41,320 WARN  (remote-thread-ReplSyncDistributedExecutorTest-NodeX-p15029-t5:) [NonTotalOrderPerCacheInboundInvocationHandler] ISPN000071: Caught exception when handling command DistributedExecuteCommand [cache=Cache 'DistributedExecutorTest-REPL_SYNC'@ReplSyncDistributedExecutorTest-NodeX-55556, keys=[], callable=org.infinispan.distexec.DistributedExecutorTest$LongRunningCallable@78655960]
      java.lang.NullPointerException
      	at org.infinispan.distexec.DistributedExecutorTest$LongRunningCallable.call(DistributedExecutorTest.java:346) ~[test-classes/:?]
      	at org.infinispan.distexec.DistributedExecutorTest$LongRunningCallable.call(DistributedExecutorTest.java:331) ~[test-classes/:?]
      	at org.infinispan.commands.read.DistributedExecuteCommand.perform(DistributedExecuteCommand.java:107) ~[classes/:?]
      	at org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler.invokePerform(BasePerCacheInboundInvocationHandler.java:92) [classes/:?]
      	at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.run(BaseBlockingRunnable.java:34) [classes/:?]
      

      NonTxStateTransferOverwritingValue2Test: ClusteringDependentLogicDelegator.commitEntry() doesn't handle ClearCacheEntry correctly (used for ClearCommand).

      11:27:16,565 ERROR (remote-thread-NonTxStateTransferOverwritingValue2Test-NodeB-p39829-t5:) [InvocationContextInterceptor] ISPN000136: Error executing command ClearCommand, writing keys []
      java.lang.NullPointerException
      	at org.infinispan.commons.hash.MurmurHash3.hash(MurmurHash3.java:397) ~[infinispan-commons-8.2.0-SNAPSHOT.jar:8.2.0-SNAPSHOT]
      	at org.infinispan.distribution.ch.impl.HashFunctionPartitioner.getSegment(HashFunctionPartitioner.java:51) ~[classes/:?]
      	at org.infinispan.distribution.group.PartitionerConsistentHash.getSegment(PartitionerConsistentHash.java:47) ~[classes/:?]
      	at org.infinispan.distribution.group.PartitionerConsistentHash.isKeyLocalToNode(PartitionerConsistentHash.java:87) ~[classes/:?]
      	at org.infinispan.distribution.impl.DistributionManagerImpl.getLocality(DistributionManagerImpl.java:71) ~[classes/:?]
      	at org.infinispan.interceptors.locking.ClusteringDependentLogic$DistributionLogic.localNodeIsOwner(ClusteringDependentLogic.java:469) ~[classes/:?]
      	at org.infinispan.interceptors.locking.ClusteringDependentLogic$DistributionLogic.commitSingleEntry(ClusteringDependentLogic.java:500) ~[classes/:?]
      	at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.commitEntry(ClusteringDependentLogic.java:115) ~[classes/:?]
      	at org.infinispan.test.fwk.ClusteringDependentLogicDelegator.commitEntry(ClusteringDependentLogicDelegator.java:49) ~[test-classes/:?]
      	at org.infinispan.distribution.rehash.NonTxStateTransferOverwritingValue2Test$3.commitEntry(NonTxStateTransferOverwritingValue2Test.java:212) ~[test-classes/:?]
      	at org.infinispan.interceptors.EntryWrappingInterceptor.commitContextEntry(EntryWrappingInterceptor.java:479) ~[classes/:?]
      	at org.infinispan.interceptors.EntryWrappingInterceptor.commitEntryIfNeeded(EntryWrappingInterceptor.java:655) ~[classes/:?]
      	at org.infinispan.interceptors.EntryWrappingInterceptor.commitContextEntries(EntryWrappingInterceptor.java:465) ~[classes/:?]
      

      StateResponseOrderingTest: test was calling PerCacheInboundInvocationHandler.handle(command) without first calling StateResponseCommand.init()

      11:27:18,781 WARN  (testng-StateResponseOrderingTest:) [NonTotalOrderTxPerCacheInboundInvocationHandler] ISPN000071: Caught exception when handling command StateResponseCommand{cache=___defaultcache, stateChunks=[StateChunk{segmentId=0, cacheEntries=1, isLastChunk=true}, StateChunk{segmentId=1, cacheEntries=1, isLastChunk=true}], origin=StateResponseOrderingTest-NodeD-39668, topologyId=6}
      java.lang.NullPointerException
      	at org.infinispan.statetransfer.StateResponseCommand.perform(StateResponseCommand.java:67) ~[classes/:?]
      	at org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler.invokePerform(BasePerCacheInboundInvocationHandler.java:92) [classes/:?]
      	at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.run(BaseBlockingRunnable.java:34) [classes/:?]
      	at org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler.handleRunnable(BasePerCacheInboundInvocationHandler.java:132) [classes/:?]
      	at org.infinispan.remoting.inboundhandler.NonTotalOrderTxPerCacheInboundInvocationHandler.handle(NonTotalOrderTxPerCacheInboundInvocationHandler.java:99) [classes/:?]
      	at org.infinispan.distribution.rehash.StateResponseOrderingTest.testSimulatedOldStateResponse(StateResponseOrderingTest.java:113) [test-classes/:?]
      

      ParserOverrideTest, XmlFileParsingTest: ClusterTopologyManagerImpl view handler can execute after JGroupsTransport was stopped and dispatcher was set to null.

      11:25:46,357 WARN  (transport-thread-ParserOverrideTest-NodeA-p30089-t1:) [ClusterTopologyManagerImpl] ISPN000197: Error updating cluster member list
      java.lang.NullPointerException
      	at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotelyAsync(JGroupsTransport.java:612) ~[classes/:?]
      	at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:533) ~[classes/:?]
      	at org.infinispan.topology.ClusterTopologyManagerImpl.confirmMembersAvailable(ClusterTopologyManagerImpl.java:444) ~[classes/:?]
      	at org.infinispan.topology.ClusterTopologyManagerImpl.updateCacheMembers(ClusterTopologyManagerImpl.java:431) ~[classes/:?]
      	at org.infinispan.topology.ClusterTopologyManagerImpl.handleClusterView(ClusterTopologyManagerImpl.java:354) ~[classes/:?]
      	at org.infinispan.topology.ClusterTopologyManagerImpl.lambda$start$0(ClusterTopologyManagerImpl.java:132) ~[classes/:?]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_74]
      	at org.infinispan.executors.SemaphoreCompletionService$QueueingTask.runInternal(SemaphoreCompletionService.java:173) [classes/:?]
      	at org.infinispan.executors.SemaphoreCompletionService$QueueingTask.run(SemaphoreCompletionService.java:151) [classes/:?]
      

              dberinde@redhat.com Dan Berindei (Inactive)
              dberinde@redhat.com Dan Berindei (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: