cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-11167) NPE when creating serializing ErrorMessage for Exception with null message
Date Fri, 12 Feb 2016 19:38:18 GMT
Tyler Hobbs created CASSANDRA-11167:
---------------------------------------

             Summary: NPE when creating serializing ErrorMessage for Exception with null message
                 Key: CASSANDRA-11167
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11167
             Project: Cassandra
          Issue Type: Bug
          Components: Coordination
            Reporter: Tyler Hobbs
            Priority: Minor
             Fix For: 2.2.x, 3.0.x, 3.x


In {{ErrorMessage.encode()}} and {{encodedSize()}}, we do not handle the exception having
a {{null}} message.  This can result in an error like the following:

{noformat}
ERROR [SharedPool-Worker-1] 2016-02-10 17:41:29,793  Message.java:611 - Unexpected exception
during request; channel = [id: 0xc2c6499a, /127.0.0.1:53299 => /127.0.0.1:9042]
java.lang.NullPointerException: null
        at org.apache.cassandra.db.TypeSizes.encodedUTF8Length(TypeSizes.java:46) ~[cassandra-all-3.0.3.874.jar:3.0.3.874]
        at org.apache.cassandra.transport.CBUtil.sizeOfString(CBUtil.java:132) ~[cassandra-all-3.0.3.874.jar:3.0.3.874]
        at org.apache.cassandra.transport.messages.ErrorMessage$1.encodedSize(ErrorMessage.java:215)
~[cassandra-all-3.0.3.874.jar:3.0.3.874]
        at org.apache.cassandra.transport.messages.ErrorMessage$1.encodedSize(ErrorMessage.java:44)
~[cassandra-all-3.0.3.874.jar:3.0.3.874]
        at org.apache.cassandra.transport.Message$ProtocolEncoder.encode(Message.java:328)
~[cassandra-all-3.0.3.874.jar:3.0.3.874]
        at org.apache.cassandra.transport.Message$ProtocolEncoder.encode(Message.java:314)
~[cassandra-all-3.0.3.874.jar:3.0.3.874]
        at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:89)
~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:629)
~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:686)
~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:622)
~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at org.apache.cassandra.transport.Message$Dispatcher$Flusher.run(Message.java:445)
~[cassandra-all-3.0.3.874.jar:3.0.3.874]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) ~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_71]
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message