hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-10353) FsUrlStreamHandlerFactory is not thread safe
Date Thu, 27 Feb 2014 19:19:20 GMT

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

Chris Nauroth updated HADOOP-10353:

       Resolution: Fixed
    Fix Version/s: 2.4.0
           Status: Resolved  (was: Patch Available)

I committed this to trunk, branch-2 and branch-2.4.  Tudor, thank you for reporting the bug
and contributing a patch.

> FsUrlStreamHandlerFactory is not thread safe
> --------------------------------------------
>                 Key: HADOOP-10353
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10353
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.3.0
>            Reporter: Tudor Scurtu
>            Assignee: Tudor Scurtu
>              Labels: race-condition
>             Fix For: 3.0.0, 2.4.0
>         Attachments: HADOOP-10353.patch, HADOOP-10353.v2.patch
> The {{FsUrlStreamHandlerFactory}} class uses a plain {{HashMap}} for caching.
> When the number of inserted values exceeds the the map's load threshold, it triggers
a rehash. During this time, a different thread that performs a get operation on a previously
inserted key can obtain a null value instead of the actual value associated with that key.
> The result is a NPE potentially being thrown when calling {{FsUrlStreamHandlerFactory#createURLStreamHandler(String
protocol)}} concurrently.

This message was sent by Atlassian JIRA

View raw message