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: contrib/libhdfs
Affects Versions: 0.20.1, 0.20.2, 0.21.0, 0.22.0
Reporter: Brian Bockelman
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.
-
You can reply to this email to add a comment to the issue online.