hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-10182) Hedged read might overwrite user's buf
Date Mon, 28 Mar 2016 08:22:25 GMT

    [ https://issues.apache.org/jira/browse/HDFS-10182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15213951#comment-15213951

Hudson commented on HDFS-10182:

FAILURE: Integrated in Hadoop-trunk-Commit #9510 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/9510/])
HDFS-10182. Hedged read might overwrite user's buf. Contributed by (waltersu4549: rev d8383c687c95dbb37effa307ab2d41497da1cfc2)
* hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java

> Hedged read might overwrite user's buf
> --------------------------------------
>                 Key: HDFS-10182
>                 URL: https://issues.apache.org/jira/browse/HDFS-10182
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: zhouyingchao
>            Assignee: zhouyingchao
>             Fix For: 2.7.3
>         Attachments: HDFS-10182-001.patch
> In DFSInputStream::hedgedFetchBlockByteRange, during the first attempt, the passed-in
buf from the caller is passed to another thread to fill.  If the first attempt is timed out,
the second attempt would be issued with another temp ByteBuffer. Now  suppose the second attempt
wins and the first attempt is blocked somewhere in the IO path. The second attempt's result
would be copied to the buf provided by the caller and then caller would think the pread is
all set. Later the caller might use the buf to do something else (for e.g. read another chunk
of data), however, the first attempt in earlier hedgedFetchBlockByteRange might get some data
and fill into the buf ...     
> If this happens, the caller's buf would then be corrupted.
> To fix the issue, we should allocate a temp buf for the first attempt too.

This message was sent by Atlassian JIRA

View raw message