You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "John Doe (JIRA)" <ji...@apache.org> on 2017/12/04 04:05:00 UTC

[jira] [Updated] (HADOOP-15088) BufferedInputStream.skip function can return 0 when the file is corrupted, causing an infinite loop

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

John Doe updated HADOOP-15088:
------------------------------
    Description: 
When a file is corrupted, the skip function can return 0, causing an infinite loop.
Here is the code:

{code:java}
  private boolean slowReadUntilMatch(Pattern markPattern, boolean includePat,
                                     DataOutputBuffer outBufOrNull) throws IOException {
      ...
      for (long skiplen = endPos; skiplen > 0; ) {
        skiplen -= bin_.skip(skiplen); 
      }
      ...
  }
{code}
Similar bugs are [Hadoop-8614|https://issues.apache.org/jira/browse/HADOOP-8614], [Yarn-2905|https://issues.apache.org/jira/browse/YARN-2905], [Yarn-163|https://issues.apache.org/jira/browse/YARN-163], [MAPREDUCE-6990|https://issues.apache.org/jira/browse/MAPREDUCE-6990]

  was:
When a file is corrupted, the skip function can return 0, causing an infinite loop.
Here is the code:

{code:java}
  private boolean slowReadUntilMatch(Pattern markPattern, boolean includePat,
                                     DataOutputBuffer outBufOrNull) throws IOException {
      ...
      for (long skiplen = endPos; skiplen > 0; ) {
        skiplen -= bin_.skip(skiplen); 
      }
      ...
  }
{code}



> BufferedInputStream.skip function can return 0 when the file is corrupted, causing an infinite loop
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-15088
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15088
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: streaming
>    Affects Versions: 2.5.0
>            Reporter: John Doe
>
> When a file is corrupted, the skip function can return 0, causing an infinite loop.
> Here is the code:
> {code:java}
>   private boolean slowReadUntilMatch(Pattern markPattern, boolean includePat,
>                                      DataOutputBuffer outBufOrNull) throws IOException {
>       ...
>       for (long skiplen = endPos; skiplen > 0; ) {
>         skiplen -= bin_.skip(skiplen); 
>       }
>       ...
>   }
> {code}
> Similar bugs are [Hadoop-8614|https://issues.apache.org/jira/browse/HADOOP-8614], [Yarn-2905|https://issues.apache.org/jira/browse/YARN-2905], [Yarn-163|https://issues.apache.org/jira/browse/YARN-163], [MAPREDUCE-6990|https://issues.apache.org/jira/browse/MAPREDUCE-6990]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org