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

TestFsDatasetImpl missing null check when cleaning up

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • test
    • Reviewed

    Description

      What happened

      I turned on dfs.namenode.quota.init-threads=1468568631 and then the test org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl#testMoveBlockFailurefails with null pointer.

      Where's the problem

      In the clean up part of the test:

          } finally {
            if (cluster.isClusterUp()) {
              cluster.shutdown();
            }
          }

      if cluster is null, the test would directly fail with a null pointer exception and hiding potentially the actual failure.

      How to reproduce

      1. set dfs.namenode.quota.init-threads=1468568631 {}
      2. run org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl#testMoveBlockFailure
        you should observe
        java.lang.NullPointerException
            at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl.testMoveBlockFailure(TestFsDatasetImpl.java:1005)

        For an easy reproduction, run the reproduce.sh in the attachment.

      We are happy to provide a patch if this issue is confirmed.

      Attachments

        1. reproduce.sh
          0.7 kB
          ConfX

        Issue Links

          Activity

            People

              FuzzingTeam ConfX
              FuzzingTeam ConfX
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: