[ 
https://issues.apache.org/jira/browse/IGNITE-20161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17750973#comment-17750973
 ] 

Roman Puchkovskiy commented on IGNITE-20161:
--------------------------------------------

NodeImpl.shutdown() nullifies the stripedExecutor field, but after that 
AppenEntriesRequestProcessor still might process some requests, so it will get 
a null executor and will try to call next() on that null reference.

This is not really a problem in production as the exception gets logged and 
then does not fly anywhere, but our TC is fastidious and fails the build even 
when it just sees a NullPointerException in the logs, so this fix is about 
making TC builds more stable.

> Fix NPE in AppendEntriesRequestProcessor
> ----------------------------------------
>
>                 Key: IGNITE-20161
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20161
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Roman Puchkovskiy
>            Assignee: Roman Puchkovskiy
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> https://ci.ignite.apache.org/buildConfiguration/ApacheIgnite3xGradle_Test_RunAllTests/7408964?hideProblemsFromDependencies=false&hideTestsFromDependencies=false&expandBuildChangesSection=true&expandBuildProblemsSection=true&expandCode+Inspection=true
> 2023-08-03 11:57:25:040 +0300 
> [INFO][%int_tsdlttn_5005%JRaft-FSMCaller-Disruptor-_stripe_0-0][StateMachineAdapter]
>  onStartFollowing: LeaderChangeContext [leaderId=int_tsdlttn_5003, term=2, 
> status=Status[ENEWLEADER<10011>: Follower receives message from new leader 
> with the same term.]].
>   2023-08-03 11:57:25:040 +0300 
> [ERROR][%int_tsdlttn_5004%MessagingService-inbound--0][DefaultMessagingService]
>  onMessage() failed while processing InvokeRequestImpl [correlationId=4, 
> message=AppendEntriesRequestImpl [committedIndex=0, 
> data=org.apache.ignite.raft.jraft.util.ByteString@1, entriesList=null, 
> groupId=unitest, peerId=int_tsdlttn_5004, prevLogIndex=1, prevLogTerm=1, 
> serverId=int_tsdlttn_5003, term=2, timestampLong=110824852359479296]] from 
> int_tsdlttn_5003
>   java.lang.NullPointerException
>     at 
> org.apache.ignite.raft.jraft.rpc.impl.core.AppendEntriesRequestProcessor.getOrCreatePeerRequestContext(AppendEntriesRequestProcessor.java:351)
>     at 
> org.apache.ignite.raft.jraft.rpc.impl.core.AppendEntriesRequestProcessor$PeerExecutorSelector.select(AppendEntriesRequestProcessor.java:72)
>     at 
> org.apache.ignite.raft.jraft.rpc.impl.IgniteRpcServer$RpcMessageHandler.onReceived(IgniteRpcServer.java:182)
>     at 
> org.apache.ignite.network.DefaultMessagingService.onMessage(DefaultMessagingService.java:375)
>     at 
> org.apache.ignite.network.DefaultMessagingService.lambda$onMessage$4(DefaultMessagingService.java:335)
>     at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>     at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>     at java.base/java.lang.Thread.run(Thread.java:834)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to