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

TestBlockManager#testBlockManagerMachinesArray sometimes fails with NPE

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-beta1
    • Fix Version/s: 2.9.0, 3.0.0-beta1, 2.8.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      CDH5.12.0

    • Hadoop Flags:
      Reviewed

      Description

      Found the following error:

      java.lang.NullPointerException: null
      at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.testBlockManagerMachinesArray(TestBlockManager.java:1202)

      The NPE suggests corruptStorageDataNode in the following code snippet could be null.

      for(int i=0; i<corruptStorageDataNode.getStorageInfos().length; i++) {
      

      Looking at the code, the test does not wait for file replication to happen, which is why corruptStorageDataNode (the DN of the second replica) is null.

      1. HDFS-12112.001.patch
        1 kB
        Wei-Chiu Chuang

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12016 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12016/)
        HDFS-12112. TestBlockManager#testBlockManagerMachinesArray sometimes (brahma: rev b778887af59d96f1fac30cae14be1cabbdb74c8b)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12016 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12016/ ) HDFS-12112 . TestBlockManager#testBlockManagerMachinesArray sometimes (brahma: rev b778887af59d96f1fac30cae14be1cabbdb74c8b) (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Thanks Brahma Reddy Battula and Kuhu Shukla for review!

        Show
        jojochuang Wei-Chiu Chuang added a comment - Thanks Brahma Reddy Battula and Kuhu Shukla for review!
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        Committed to trunk,branch-2 and branch-2.8. Wei-Chiu Chuang thanks for your contribution.Kuhu Shukla thanks for additional review.

        Show
        brahmareddy Brahma Reddy Battula added a comment - Committed to trunk,branch-2 and branch-2.8. Wei-Chiu Chuang thanks for your contribution. Kuhu Shukla thanks for additional review.
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        +1, committing shortly.

        Show
        brahmareddy Brahma Reddy Battula added a comment - +1, committing shortly.
        Hide
        kshukla Kuhu Shukla added a comment -

        Thanks Wei-Chiu Chuang for the JIRA. The patch looks good to me. (+1 non-binding)

        Show
        kshukla Kuhu Shukla added a comment - Thanks Wei-Chiu Chuang for the JIRA. The patch looks good to me. (+1 non-binding)
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 12s Docker mode activated.
              Prechecks
        +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.
              trunk Compile Tests
        +1 mvninstall 14m 5s trunk passed
        +1 compile 0m 57s trunk passed
        +1 checkstyle 0m 41s trunk passed
        +1 mvnsite 1m 8s trunk passed
        -1 findbugs 2m 7s hadoop-hdfs-project/hadoop-hdfs in trunk has 10 extant Findbugs warnings.
        +1 javadoc 0m 47s trunk passed
              Patch Compile Tests
        +1 mvninstall 1m 2s the patch passed
        +1 compile 1m 1s the patch passed
        +1 javac 1m 1s the patch passed
        +1 checkstyle 0m 38s the patch passed
        +1 mvnsite 1m 5s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 2m 7s the patch passed
        +1 javadoc 0m 42s the patch passed
              Other Tests
        -1 unit 66m 9s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 19s The patch does not generate ASF License warnings.
        94m 38s



        Reason Tests
        Failed junit tests hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:14b5c93
        JIRA Issue HDFS-12112
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12876485/HDFS-12112.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux aea70341ed7d 3.13.0-123-generic #172-Ubuntu SMP Mon Jun 26 18:04:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 09653ea
        Default Java 1.8.0_131
        findbugs v3.1.0-RC1
        findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/20215/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/20215/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/20215/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20215/console
        Powered by Apache Yetus 0.6.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.       Prechecks +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.       trunk Compile Tests +1 mvninstall 14m 5s trunk passed +1 compile 0m 57s trunk passed +1 checkstyle 0m 41s trunk passed +1 mvnsite 1m 8s trunk passed -1 findbugs 2m 7s hadoop-hdfs-project/hadoop-hdfs in trunk has 10 extant Findbugs warnings. +1 javadoc 0m 47s trunk passed       Patch Compile Tests +1 mvninstall 1m 2s the patch passed +1 compile 1m 1s the patch passed +1 javac 1m 1s the patch passed +1 checkstyle 0m 38s the patch passed +1 mvnsite 1m 5s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 2m 7s the patch passed +1 javadoc 0m 42s the patch passed       Other Tests -1 unit 66m 9s hadoop-hdfs in the patch failed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 94m 38s Reason Tests Failed junit tests hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HDFS-12112 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12876485/HDFS-12112.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux aea70341ed7d 3.13.0-123-generic #172-Ubuntu SMP Mon Jun 26 18:04:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 09653ea Default Java 1.8.0_131 findbugs v3.1.0-RC1 findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/20215/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html unit https://builds.apache.org/job/PreCommit-HDFS-Build/20215/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/20215/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20215/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Upload patch rev 001. Added a simple DFSTestUtil#waitForReplication() call to wait for replication.

        Show
        jojochuang Wei-Chiu Chuang added a comment - Upload patch rev 001. Added a simple DFSTestUtil#waitForReplication() call to wait for replication.

          People

          • Assignee:
            jojochuang Wei-Chiu Chuang
            Reporter:
            jojochuang Wei-Chiu Chuang
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development