You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexander Belyak (Jira)" <ji...@apache.org> on 2023/04/19 13:10:00 UTC
[jira] [Created] (IGNITE-19320) NPE on connection close (if there was 0 operation)
Alexander Belyak created IGNITE-19320:
-----------------------------------------
Summary: NPE on connection close (if there was 0 operation)
Key: IGNITE-19320
URL: https://issues.apache.org/jira/browse/IGNITE-19320
Project: Ignite
Issue Type: Bug
Components: sql
Affects Versions: 3.0
Reporter: Alexander Belyak
Exception
{noformat}
WARNING: Exception in client connector pipeline [remoteAddress=/127.0.0.1:51586]: IGN-CMN-65535 TraceId:fb08f569-9e4a-4d15-80a6-dafdcbff7acd
org.apache.ignite.lang.IgniteInternalException: IGN-CMN-65535 TraceId:fb08f569-9e4a-4d15-80a6-dafdcbff7acd
at org.apache.ignite.client.handler.ClientResourceRegistry.close(ClientResourceRegistry.java:130)
at org.apache.ignite.client.handler.ClientInboundMessageHandler.channelInactive(ClientInboundMessageHandler.java:225)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:305)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:274)
at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:411)
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:376)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:305)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:274)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:301)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281)
at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901)
at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:813)
at io.netty.util.concurrent.AbstractEventExecutor.runTask$$$capture(AbstractEventExecutor.java:174)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:167)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NullPointerException{noformat}
on close connection without a single query:
{code:java}
public static void main(String[] args) throws InterruptedException {
try (Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800")) {
// NoOp.
} catch (SQLException e) {
throw new RuntimeException(e);
}
} {code}
Because in
{color:#000000}JdbcQueryEventHandlerImpl.{color}{color:#000000}JdbcConnectionContext{color}.close()
there is no check if connectionId is Null and SessionManager.session(SessionId) tries to get null from its
{color:#0033b3}private final {color}{color:#000000}Map{color}<{color:#000000}SessionId{color}, {color:#000000}Session{color}> {color:#871094}activeSessions {color}= {color:#0033b3}new {color}ConcurrentHashMap<>();
--
This message was sent by Atlassian Jira
(v8.20.10#820010)