]
RH Bugzilla Integration commented on ISPN-6442:
-----------------------------------------------
Vaclav Dedik <vdedik(a)redhat.com> changed the Status of [bug
NullPointerException in HotRodDecoder.channelActive
---------------------------------------------------
Key: ISPN-6442
URL:
https://issues.jboss.org/browse/ISPN-6442
Project: Infinispan
Issue Type: Bug
Components: Server, Test Suite - Server
Affects Versions: 8.2.0.Final
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Critical
Labels: testsuite_stability
Fix For: 9.0.0.Alpha1, 9.0.0.Final
{{HotRodServer.startInternal}} first starts the Netty transport (with
{{super.startInternal()}}) and only then initializes the {{clientListenerRegistry}} field.
That means the server can accept a request before {{clientListenerRegistry}} is
initialized, causing a NPE in {{HotRodDecoder.channelActive()}}.
Visible as random failures in
{{DistTopologyChangeUnderLoadSingleOwnerTest.testRestartServerWhilePutting}}:
{noformat}
00:10:54,718 ERROR (HotRodServerWorker-408-1) [CacheDecodeContext] ISPN005009: Unexpected
error before any request parameters read java.lang.NullPointerException
at org.infinispan.server.hotrod.HotRodDecoder.channelActive(HotRodDecoder.scala:284)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:183)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:169)
at
io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:817)
at
io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:453)
at
io.netty.channel.AbstractChannel$AbstractUnsafe.access$100(AbstractChannel.java:377)
at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:423)
at
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380)
java.util.concurrent.ExecutionException:
org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=46498
returned server error (status=0x85): java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at
org.infinispan.client.hotrod.DistTopologyChangeUnderLoadSingleOwnerTest.testRestartServerWhilePutting(DistTopologyChangeUnderLoadSingleOwnerTest.java:64)
Caused by: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for
messageId=46498 returned server error (status=0x85): java.lang.NullPointerException
at
org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:343)
at
org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:132)
at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:118)
at
org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:56)
at
org.infinispan.client.hotrod.impl.operations.AbstractKeyValueOperation.sendPutOperation(AbstractKeyValueOperation.java:56)
at
org.infinispan.client.hotrod.impl.operations.PutOperation.executeOperation(PutOperation.java:32)
at
org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:54)
at org.infinispan.client.hotrod.impl.RemoteCacheImpl.put(RemoteCacheImpl.java:268)
at
org.infinispan.client.hotrod.impl.RemoteCacheSupport.put(RemoteCacheSupport.java:79)
at
org.infinispan.client.hotrod.DistTopologyChangeUnderLoadSingleOwnerTest$PutHammer.call(DistTopologyChangeUnderLoadSingleOwnerTest.java:76)
at
org.infinispan.client.hotrod.DistTopologyChangeUnderLoadSingleOwnerTest$PutHammer.call(DistTopologyChangeUnderLoadSingleOwnerTest.java:67)
at
org.infinispan.test.AbstractInfinispanTest$LoggingCallable.call(AbstractInfinispanTest.java:478)
... 4 more
{noformat}