Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08107184B5 for ; Tue, 8 Dec 2015 16:33:14 +0000 (UTC) Received: (qmail 44131 invoked by uid 500); 8 Dec 2015 16:33:12 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 43882 invoked by uid 500); 8 Dec 2015 16:33:12 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 43535 invoked by uid 99); 8 Dec 2015 16:33:12 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2015 16:33:12 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 678DB2C1F79 for ; Tue, 8 Dec 2015 16:33:12 +0000 (UTC) Date: Tue, 8 Dec 2015 16:33:12 +0000 (UTC) From: "Joshua McKenzie (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-7330) Infinite loop in StreamReader.read during exception condition while running repair MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-7330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joshua McKenzie updated CASSANDRA-7330: --------------------------------------- Component/s: Streaming and Messaging > Infinite loop in StreamReader.read during exception condition while running repair > ---------------------------------------------------------------------------------- > > Key: CASSANDRA-7330 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7330 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging > Environment: 2.0.8+ > Reporter: Joshua McKenzie > Assignee: Joshua McKenzie > Priority: Minor > Labels: Core > Fix For: 2.0.9 > > Attachments: 7330_v1.txt > > > InputStream.skip is returning -1 during exception conditions which leads the following logic to infinite loop: > {code:title=loop} > protected void drain(InputStream dis, long bytesRead) throws IOException > { > long toSkip = totalSize() - bytesRead; > toSkip = toSkip - dis.skip(toSkip); > while (toSkip > 0) > toSkip = toSkip - dis.skip(toSkip); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)