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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0, 3.1.4, 3.2.2, 2.10.1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Flags:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: