You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (JIRA)" <ji...@apache.org> on 2018/07/17 21:19:00 UTC

[jira] [Updated] (CASSANDRA-14574) Racy incorrect handling of incoming messages

     [ https://issues.apache.org/jira/browse/CASSANDRA-14574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-14574:
------------------------------------------
    Description: 
{{MessageInHandler.decode()}} occasionally reads the payload incorrectly, passing the full message to {{MessageIn.read()}} instead of just the payload bytes.

You can see the stack trace in the logs from this [CI run|https://circleci.com/gh/iamaleksey/cassandra/437#tests/containers/38].

{code}
Caused by: java.lang.AssertionError: null
	at org.apache.cassandra.db.Mutation$MutationSerializer.deserialize(Mutation.java:351)
	at org.apache.cassandra.db.Mutation$MutationSerializer.deserialize(Mutation.java:371)
	at org.apache.cassandra.db.Mutation$MutationSerializer.deserialize(Mutation.java:335)
	at org.apache.cassandra.net.MessageIn.read(MessageIn.java:158)
	at org.apache.cassandra.net.async.MessageInHandler.decode(MessageInHandler.java:132)
{code}

Reconstructed, truncated stream passed to {{MessageIn.read()}}:
{{0000000b000743414c5f42414301002a01e1a5c9b089fd11e8b517436ee1243007040000005d10fc50ec}}
You can clearly see parameters in there encoded before the payload:
{{[43414c5f424143 - CAL_BAC] [01 - ONE_BYTE] [002a - 42, payload size] 01 e1 a5 c9 b0 89 fd 11 e8 b5 17 43 6e e1 24 30 07 04 00 00 00 1d 10 fc 50 ec}}


  was:
{{MessageInHandler.decode()}} occasionally reads the payload incorrectly, passing the full message to {{MessageIn.read()}} instead of just the payload bytes.

You can see the stack trace in the logs from this [CI run|https://circleci.com/gh/iamaleksey/cassandra/437#tests/containers/38].

{code}
Caused by: java.lang.AssertionError: null
	at org.apache.cassandra.db.Mutation$MutationSerializer.deserialize(Mutation.java:351)
	at org.apache.cassandra.db.Mutation$MutationSerializer.deserialize(Mutation.java:371)
	at org.apache.cassandra.db.Mutation$MutationSerializer.deserialize(Mutation.java:335)
	at org.apache.cassandra.net.MessageIn.read(MessageIn.java:158)
	at org.apache.cassandra.net.async.MessageInHandler.decode(MessageInHandler.java:132)
{code}

Reconstructed, truncated stream passed to {{MessageIn.read()}}:
{{0000000b000743414c5f42414301002a01e1a5c9b089fd11e8b517436ee1243007040000005d10fc50ec}}
You can clearly see parameters in there encoded before the payload:
{{[43414c5f424143 - CAL_BAC] [01 - ONE_BYTE] [002a - 42, payload size] 01 e1 a5 c9 b0 89 fd 11 e8 b5 17 43 6e e1 24 30 07 04 00 00 00 1d 10 fc 50 ec}}}



> Racy incorrect handling of incoming messages 
> ---------------------------------------------
>
>                 Key: CASSANDRA-14574
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14574
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Streaming and Messaging
>            Reporter: Aleksey Yeschenko
>            Priority: Major
>             Fix For: 4.0
>
>
> {{MessageInHandler.decode()}} occasionally reads the payload incorrectly, passing the full message to {{MessageIn.read()}} instead of just the payload bytes.
> You can see the stack trace in the logs from this [CI run|https://circleci.com/gh/iamaleksey/cassandra/437#tests/containers/38].
> {code}
> Caused by: java.lang.AssertionError: null
> 	at org.apache.cassandra.db.Mutation$MutationSerializer.deserialize(Mutation.java:351)
> 	at org.apache.cassandra.db.Mutation$MutationSerializer.deserialize(Mutation.java:371)
> 	at org.apache.cassandra.db.Mutation$MutationSerializer.deserialize(Mutation.java:335)
> 	at org.apache.cassandra.net.MessageIn.read(MessageIn.java:158)
> 	at org.apache.cassandra.net.async.MessageInHandler.decode(MessageInHandler.java:132)
> {code}
> Reconstructed, truncated stream passed to {{MessageIn.read()}}:
> {{0000000b000743414c5f42414301002a01e1a5c9b089fd11e8b517436ee1243007040000005d10fc50ec}}
> You can clearly see parameters in there encoded before the payload:
> {{[43414c5f424143 - CAL_BAC] [01 - ONE_BYTE] [002a - 42, payload size] 01 e1 a5 c9 b0 89 fd 11 e8 b5 17 43 6e e1 24 30 07 04 00 00 00 1d 10 fc 50 ec}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org