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

NFS: readdir/readdirplus return null directory attribute on failure

    Details

    • Hadoop Flags:
      Reviewed

      Description

      NFS readdir and readdirplus operations return a null directory attribute on some failure paths. This causes clients to get a 'Stale file handle' error which can only be fixed by unmounting and remounting the share.

      The issue can be reproduced by running 'ls' against a large directory which is being actively modified, triggering the 'cookie mismatch' failure path.

              } else {
                LOG.error("cookieverf mismatch. request cookieverf: " + cookieVerf
                    + " dir cookieverf: " + dirStatus.getModificationTime());
                return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_BAD_COOKIE);
              }
      

      Thanks to Brandon Li for catching the issue.

        Activity

        Hide
        arpitagarwal Arpit Agarwal added a comment -

        Attaching a fix. I verified it manually. I don't think it is straightforward to add a unit test but open to suggestions.

        Show
        arpitagarwal Arpit Agarwal added a comment - Attaching a fix. I verified it manually. I don't think it is straightforward to add a unit test but open to suggestions.
        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12696346/HDFS-7733.01.patch
        against trunk revision b73e776.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs-nfs.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9424//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9424//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12696346/HDFS-7733.01.patch against trunk revision b73e776. +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs-nfs. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9424//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9424//console This message is automatically generated.
        Hide
        brandonli Brandon Li added a comment -

        +1. The patch looks good to me. Thank you, Arpit, for the fix.

        Show
        brandonli Brandon Li added a comment - +1. The patch looks good to me. Thank you, Arpit, for the fix.
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        Thanks for the review and helping debug this Brandon!

        I committed it to trunk through branch-2.6.

        Show
        arpitagarwal Arpit Agarwal added a comment - Thanks for the review and helping debug this Brandon! I committed it to trunk through branch-2.6.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-trunk-Commit #7010 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7010/)
        HDFS-7733. NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #7010 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7010/ ) HDFS-7733 . NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #95 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/95/)
        HDFS-7733. NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2)

        • hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #95 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/95/ ) HDFS-7733 . NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2) hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #829 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/829/)
        HDFS-7733. NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #829 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/829/ ) HDFS-7733 . NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Hdfs-trunk #2027 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2027/)
        HDFS-7733. NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk #2027 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2027/ ) HDFS-7733 . NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Hdfs-trunk-Java8 #92 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/92/)
        HDFS-7733. NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk-Java8 #92 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/92/ ) HDFS-7733 . NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #96 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/96/)
        HDFS-7733. NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2)

        • hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #96 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/96/ ) HDFS-7733 . NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2) hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2046 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2046/)
        HDFS-7733. NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2046 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2046/ ) HDFS-7733 . NFS: readdir/readdirplus return null directory attribute on failure. (Contributed by Arpit Agarwal) (arp: rev c6f20007ebda509b39a7e4098b99e9b43d73d5b2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java

          People

          • Assignee:
            arpitagarwal Arpit Agarwal
            Reporter:
            arpitagarwal Arpit Agarwal
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development