hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhouyingchao (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-10182) Hedged read might overwrite user's buf
Date Tue, 29 Mar 2016 02:33:25 GMT

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

zhouyingchao updated HDFS-10182:
--------------------------------
    Attachment: HDFS-10182-branch26.patch

Patch of branch-2.6

> 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, HDFS-10182-branch26.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
(v6.3.4#6332)

Mime
View raw message