Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13052

ChecksumFileSystem mishandles crc file permissions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.8.0, 2.7.3, 2.6.5, 3.0.0-alpha1
    • Component/s: fs
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      CheckFileSystem does not override permission related calls to apply those operations to the hidden crc files. Clients may be unable to read the crcs if the file is created with strict permissions and then relaxed.

      The checksum fs is designed to work with or w/o crcs present, so it silently ignores FNF exceptions. The java file stream apis unfortunately may only throw FNF, so permission denied becomes FNF resulting in this bug going silently unnoticed.

      (Problem discovered via public localizer. Files are downloaded as user-readonly and then relaxed to all-read. The crc remains user-readonly)

        Issue Links

          Activity

          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 13s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 6m 34s trunk passed
          +1 compile 5m 39s trunk passed with JDK v1.8.0_77
          +1 compile 6m 30s trunk passed with JDK v1.7.0_95
          +1 checkstyle 0m 21s trunk passed
          +1 mvnsite 0m 57s trunk passed
          +1 mvneclipse 0m 13s trunk passed
          +1 findbugs 1m 34s trunk passed
          +1 javadoc 0m 53s trunk passed with JDK v1.8.0_77
          +1 javadoc 1m 6s trunk passed with JDK v1.7.0_95
          +1 mvninstall 0m 41s the patch passed
          +1 compile 5m 32s the patch passed with JDK v1.8.0_77
          +1 javac 5m 32s the patch passed
          +1 compile 6m 32s the patch passed with JDK v1.7.0_95
          +1 javac 6m 32s the patch passed
          +1 checkstyle 0m 21s hadoop-common-project/hadoop-common: patch generated 0 new + 35 unchanged - 3 fixed = 35 total (was 38)
          +1 mvnsite 0m 55s the patch passed
          +1 mvneclipse 0m 14s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 1m 46s the patch passed
          +1 javadoc 0m 54s the patch passed with JDK v1.8.0_77
          +1 javadoc 1m 4s the patch passed with JDK v1.7.0_95
          -1 unit 7m 17s hadoop-common in the patch failed with JDK v1.8.0_77.
          -1 unit 7m 35s hadoop-common in the patch failed with JDK v1.7.0_95.
          +1 asflicense 0m 22s Patch does not generate ASF License warnings.
          58m 18s



          Reason Tests
          JDK v1.8.0_77 Failed junit tests hadoop.net.TestDNS
          JDK v1.7.0_95 Failed junit tests hadoop.net.TestDNS



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:fbe3e86
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12800225/HADOOP-13052.patch
          JIRA Issue HADOOP-13052
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 784572e7c058 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 19f0f96
          Default Java 1.7.0_95
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_77 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_77.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt
          unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_77.txt https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt
          JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/console
          Powered by Apache Yetus 0.2.0 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 13s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 6m 34s trunk passed +1 compile 5m 39s trunk passed with JDK v1.8.0_77 +1 compile 6m 30s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 21s trunk passed +1 mvnsite 0m 57s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 34s trunk passed +1 javadoc 0m 53s trunk passed with JDK v1.8.0_77 +1 javadoc 1m 6s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 41s the patch passed +1 compile 5m 32s the patch passed with JDK v1.8.0_77 +1 javac 5m 32s the patch passed +1 compile 6m 32s the patch passed with JDK v1.7.0_95 +1 javac 6m 32s the patch passed +1 checkstyle 0m 21s hadoop-common-project/hadoop-common: patch generated 0 new + 35 unchanged - 3 fixed = 35 total (was 38) +1 mvnsite 0m 55s the patch passed +1 mvneclipse 0m 14s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 46s the patch passed +1 javadoc 0m 54s the patch passed with JDK v1.8.0_77 +1 javadoc 1m 4s the patch passed with JDK v1.7.0_95 -1 unit 7m 17s hadoop-common in the patch failed with JDK v1.8.0_77. -1 unit 7m 35s hadoop-common in the patch failed with JDK v1.7.0_95. +1 asflicense 0m 22s Patch does not generate ASF License warnings. 58m 18s Reason Tests JDK v1.8.0_77 Failed junit tests hadoop.net.TestDNS JDK v1.7.0_95 Failed junit tests hadoop.net.TestDNS Subsystem Report/Notes Docker Image:yetus/hadoop:fbe3e86 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12800225/HADOOP-13052.patch JIRA Issue HADOOP-13052 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 784572e7c058 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 19f0f96 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_77 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_77.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_77.txt https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/9151/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
          Hide
          kihwal Kihwal Lee added a comment -

          +1 lgtm

          Show
          kihwal Kihwal Lee added a comment - +1 lgtm
          Hide
          kihwal Kihwal Lee added a comment -

          Committed to trunk through 2.7. Thanks for fixing this Daryn.

          Show
          kihwal Kihwal Lee added a comment - Committed to trunk through 2.7. Thanks for fixing this Daryn.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #9657 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9657/)
          HADOOP-13052. ChecksumFileSystem mishandles crc file permissions. (kihwal: rev 9dbdc8e12d009e76635b2d20ce940851725cb069)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFileSystem.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestChecksumFileSystem.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9657 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9657/ ) HADOOP-13052 . ChecksumFileSystem mishandles crc file permissions. (kihwal: rev 9dbdc8e12d009e76635b2d20ce940851725cb069) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFileSystem.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestChecksumFileSystem.java
          Hide
          ctrezzo Chris Trezzo added a comment -

          Adding 2.6.5 to the target versions with the intention of backporting this to branch-2.6. Please let me know if you think otherwise. Thanks!

          Show
          ctrezzo Chris Trezzo added a comment - Adding 2.6.5 to the target versions with the intention of backporting this to branch-2.6. Please let me know if you think otherwise. Thanks!
          Hide
          vinodkv Vinod Kumar Vavilapalli added a comment -

          Closing the JIRA as part of 2.7.3 release.

          Show
          vinodkv Vinod Kumar Vavilapalli added a comment - Closing the JIRA as part of 2.7.3 release.
          Hide
          sjlee0 Sangjin Lee added a comment -

          Cherry-picked it to 2.6.5 (trivial).

          Show
          sjlee0 Sangjin Lee added a comment - Cherry-picked it to 2.6.5 (trivial).
          Hide
          ctrezzo Chris Trezzo added a comment -

          Thanks!

          Show
          ctrezzo Chris Trezzo added a comment - Thanks!

            People

            • Assignee:
              daryn Daryn Sharp
              Reporter:
              daryn Daryn Sharp
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development