cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Burylov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10206) Incorrect handling of end-of stream leading to infinite loop in streaming session
Date Fri, 28 Aug 2015 09:05:45 GMT

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

Alexey Burylov commented on CASSANDRA-10206:
--------------------------------------------

{quote}
 I slightly modified your patch to handle when 0 byte is read, which is normal case
{quote}
As i can see in java-doc is not

|if a channel is in blocking mode and there is at least one byte remaining in the buffer then
this method will block until at least one byte is read.

So read() can  return only -1 or 1.

> Incorrect handling of end-of stream leading to infinite loop in streaming session
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-10206
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10206
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: cassndra 2.1.8 12 nodes cluster in two DC, with enabled ssl encryption.
>            Reporter: Alexey Burylov
>             Fix For: 2.1.x
>
>         Attachments: cassandra-2.1-10206.txt, threaddump-1440601628223.tdump, threaddump-1440602926719.tdump,
threaddump-1440672821181.tdump, threaddump-1440686737505.tdump
>
>
> StreamMessage.deserialize (StreamMessage.java:63) function return null when receive end
of stream for ReadableByteChannel.read () function. IncomingMessageHandler.run (ConnectionHandler.java:257)
interpreting null - as unsupported message and ignore it. It resulting infinite loop when
IncomingMessageHandler try to read message from closed steram, and deserialize always return
null - to indicate close stream.
> It not happen on normal socket, because when normal socket closed it throw IOException.
But happen from time to time when iner-node ssl encryption enabled.
> I'm attach two tread dump from one node with two infinity lopped thread with id 614 and
583



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

Mime
View raw message