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

Namenode crash caused by NPE in BlockPlacementPolicyDefault when dynamically change logger to debug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0, 3.1.4, 3.2.2, 2.10.1
    • None
    • None
    • Reviewed
    • Patch

    Description

      To get debug info, we dynamically change the logger of BlockPlacementPolicyDefault to debug when namenode is running. However, the Namenode crashs. From the log, we find some NPE in BlockPlacementPolicyDefault.chooseRandom. Because StringBuilder builder will be used 4 times in BlockPlacementPolicyDefault.chooseRandom method. While the builder only initializes in the first time of this method. If we change the logger of BlockPlacementPolicyDefault to debug after the part, the builder in remaining part is NULL and cause NPE

      Attachments

        1. HDFS-15115.001.patch
          1 kB
          wangzhixiang
        2. HDFS-15115.2.patch
          1 kB
          David Mollitor
        3. HDFS-15115.003.patch
          5 kB
          wangzhixiang
        4. HDFS-15115.004.patch
          5 kB
          wangzhixiang
        5. HDFS-15115.005.patch
          5 kB
          wangzhixiang

        Issue Links

          Activity

            People

              wzx513 wangzhixiang
              wzx513 wangzhixiang
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: