Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9268

fuse_dfs chown crashes when uid is passed as -1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • None
    • None

    Description

      JVM crashes when users attempt to use vi to update a file on fuse file system with insufficient permission. (I use CDH's hadoop-fuse-dfs wrapper script to generate the bug, but the same bug is reproducible in trunk)

      The root cause is a segfault in a dfs-fuse method

      To reproduce it do as follows:
      mkdir /mnt/fuse
      chmod 777 /mnt/fuse
      ulimit -c unlimited # to enable coredump
      hadoop-fuse-dfs -odebug hdfs://localhost:9000/fuse /mnt/fuse
      touch /mnt/fuse/y
      chmod 600 /mnt/fuse/y
      vim /mnt/fuse/y
      (in vim, :w to save the file)

      #

      1. A fatal error has been detected by the Java Runtime Environment:
        #
      2. SIGSEGV (0xb) at pc=0x0000003b82f27ad6, pid=26606, tid=140079005689600
        #
      3. JRE version: Java(TM) SE Runtime Environment (7.0_79-b15) (build 1.7.0_79-b15)
      4. Java VM: Java HotSpot(TM) 64-Bit Server VM (24.79-b02 mixed mode linux-amd64 compressed oops)
      5. Problematic frame:
      6. C [libc.so.6+0x127ad6] __tls_get_addr@@GLIBC_2.3+0x127ad6
        #
      7. Core dump written. Default location: /home/weichiu/core or core.26606
        #
      8. An error report file with more information is saved as:
      9. /home/weichiu/hs_err_pid26606.log
        #
      10. If you would like to submit a bug report, please visit:
      11. http://bugreport.java.com/bugreport/crash.jsp
      12. The crash happened outside the Java Virtual Machine in native code.
      13. See problematic frame for where to report the bug.
        #
        /usr/bin/hadoop-fuse-dfs: line 29: 26606 Aborted (core dumped) env CLASSPATH="${CLASSPATH}" ${HADOOP_HOME}/bin/fuse_dfs $@

      ===========
      The coredump shows the segfault comes from
      (gdb) bt
      #0 0x0000003b82e328e5 in raise () from /lib64/libc.so.6
      #1 0x0000003b82e340c5 in abort () from /lib64/libc.so.6
      #2 0x00007f66fc924d75 in os::abort(bool) () from /etc/alternatives/jre/jre/lib/amd64/server/libjvm.so
      #3 0x00007f66fcaa76d7 in VMError::report_and_die() () from /etc/alternatives/jre/jre/lib/amd64/server/libjvm.so
      #4 0x00007f66fc929c8f in JVM_handle_linux_signal () from /etc/alternatives/jre/jre/lib/amd64/server/libjvm.so
      #5 <signal handler called>
      #6 0x0000003b82f27ad6 in __strcmp_sse42 () from /lib64/libc.so.6
      #7 0x00000000004039a0 in hdfsConnTree_RB_FIND ()
      #8 0x0000000000403e8f in fuseConnect ()
      #9 0x00000000004046db in dfs_chown ()
      #10 0x00007f66fcf8f6d2 in ?? () from /lib64/libfuse.so.2
      #11 0x00007f66fcf940d1 in ?? () from /lib64/libfuse.so.2
      #12 0x00007f66fcf910ef in ?? () from /lib64/libfuse.so.2
      #13 0x0000003b83207851 in start_thread () from /lib64/libpthread.so.0
      #14 0x0000003b82ee894d in clone () from /lib64/libc.so.6

      Attachments

        1. HDFS-9268.001.patch
          2 kB
          Wei-Chiu Chuang
        2. HDFS-9268.002.patch
          0.9 kB
          Colin McCabe

        Issue Links

          Activity

            People

              cmccabe Colin McCabe
              weichiu Wei-Chiu Chuang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: