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

Colin Patrick McCabe resolved HDFS-838.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.0

The call to JNI_CreateJavaVM is now done under the jvmMutex, at least in 
branch-1, branch-2, and trunk.  So this should no longer be an issue.
                
> libhdfs causes a segfault due to race condition
> -----------------------------------------------
>
>                 Key: HDFS-838
>                 URL: https://issues.apache.org/jira/browse/HDFS-838
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: libhdfs
>    Affects Versions: 0.20.1, 0.20.2, 0.21.0, 0.22.0
>            Reporter: Brian Bockelman
>             Fix For: 1.0.0
>
>
> The first libhdfs operation that is performed is not thread-safe; this is 
> because the creation of a JVM is not protected by a mutex.
> We have been able to trigger this by doing the following:
> 1) Start a few GNOME sessions on the box.  Make sure you are running the 
> gnome volume manager.  The volume manager will perform a GETATTR operation on 
> any newly mounted file system.
> 2) Start fuse-dfs in debug mode.  As soon as it starts, you will see two or 
> more GETATTR calls almost instantly.
> 3) fuse-dfs segfaults; if you ran this with GDB, you'll see a stack trace 
> coming from libhdfs starting up a new JVM.
> I imagine you could replicate this more simply by having two threads that 
> call libhdfs simultaneously.
> I have a patch for fuse-dfs which avoids the problem, but we probably need to 
> fix it in libhdfs itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to