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

Check groupEntryIndex and throw a helpful exception on failures when removing ACL.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: namenode
    • Labels:
      None

      Description

      We only have the logs to the exception but not the metadata, so hard to reproduce. The log is:

      ERROR org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader: Encountered exception on operation org.apache.hadoop.hdfs.server.namenode.FSEditLogOp$SetAclOp@7aad3f7d 
      java.lang.IndexOutOfBoundsException: index (-4) must not be negative 
      at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:301) 
      at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:280) 
      at com.google.common.collect.RegularImmutableList.get(RegularImmutableList.java:91) 
      at org.apache.hadoop.hdfs.server.namenode.AclStorage.removeINodeAcl(AclStorage.java:267) 
      at org.apache.hadoop.hdfs.server.namenode.FSDirectory.unprotectedRemoveAcl(FSDirectory.java:2720) 
      at org.apache.hadoop.hdfs.server.namenode.FSDirectory.unprotectedSetAcl(FSDirectory.java:2737) 
      at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:827) 
      at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:231) 
      at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadFSEdits(FSEditLogLoader.java:140) 
      at org.apache.hadoop.hdfs.server.namenode.FSImage.loadEdits(FSImage.java:846) 
      

      Let's use this jira to add more information to the exception, to hopefully help the next reoccurrence. (Have not failed again in the past week)

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11056 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11056/)
        HDFS-11275. Check groupEntryIndex and throw a helpful exception on (xiao: rev e76995755629579c7f83fbb417afde20ea747980)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11056 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11056/ ) HDFS-11275 . Check groupEntryIndex and throw a helpful exception on (xiao: rev e76995755629579c7f83fbb417afde20ea747980) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
        Hide
        xiaochen Xiao Chen added a comment -

        Committed to trunk, thanks Wei-Chiu Chuang for the review!

        Show
        xiaochen Xiao Chen added a comment - Committed to trunk, thanks Wei-Chiu Chuang for the review!
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        +1 thanks Xiao Chen!

        Show
        jojochuang Wei-Chiu Chuang added a comment - +1 thanks Xiao Chen !
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 12s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s 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 mvninstall 12m 30s trunk passed
        +1 compile 0m 46s trunk passed
        +1 checkstyle 0m 26s trunk passed
        +1 mvnsite 0m 51s trunk passed
        +1 mvneclipse 0m 12s trunk passed
        +1 findbugs 1m 43s trunk passed
        +1 javadoc 0m 39s trunk passed
        +1 mvninstall 0m 45s the patch passed
        +1 compile 0m 43s the patch passed
        +1 javac 0m 43s the patch passed
        +1 checkstyle 0m 23s the patch passed
        +1 mvnsite 0m 48s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 47s the patch passed
        +1 javadoc 0m 36s the patch passed
        +1 unit 66m 40s hadoop-hdfs in the patch passed.
        +1 asflicense 0m 19s The patch does not generate ASF License warnings.
        90m 40s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HDFS-11275
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12844811/HDFS-11275.01.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 39ceac0dce79 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / e297be7
        Default Java 1.8.0_111
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17969/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17969/console
        Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 12s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s 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 mvninstall 12m 30s trunk passed +1 compile 0m 46s trunk passed +1 checkstyle 0m 26s trunk passed +1 mvnsite 0m 51s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 43s trunk passed +1 javadoc 0m 39s trunk passed +1 mvninstall 0m 45s the patch passed +1 compile 0m 43s the patch passed +1 javac 0m 43s the patch passed +1 checkstyle 0m 23s the patch passed +1 mvnsite 0m 48s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 47s the patch passed +1 javadoc 0m 36s the patch passed +1 unit 66m 40s hadoop-hdfs in the patch passed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 90m 40s Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HDFS-11275 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12844811/HDFS-11275.01.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 39ceac0dce79 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / e297be7 Default Java 1.8.0_111 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17969/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17969/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        xiaochen Xiao Chen added a comment -

        Patch 1 to add the check, don't think unit test is necessary.
        Manually checked output by running TestFSImageWithAcl and changed the check to always throw: Invalid group entry index after binary-searching inode: /p(16386) with featureEntries:[user:foo:r-x, group::r--]

        Show
        xiaochen Xiao Chen added a comment - Patch 1 to add the check, don't think unit test is necessary. Manually checked output by running TestFSImageWithAcl and changed the check to always throw: Invalid group entry index after binary-searching inode: /p(16386) with featureEntries: [user:foo:r-x, group::r--]

          People

          • Assignee:
            xiaochen Xiao Chen
            Reporter:
            xiaochen Xiao Chen
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development