hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Wang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7225) Failed DataNode lookup can crash NameNode with NullPointerException
Date Tue, 04 Nov 2014 01:03:26 GMT

    [ https://issues.apache.org/jira/browse/HDFS-7225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14195492#comment-14195492
] 

Andrew Wang commented on HDFS-7225:
-----------------------------------

Fix looks good, I just have some unit test comments:

* We could break out a @Before method to do the common test setup
* The test is for the uncommon case where we encounter bad work, rather than the standard
case where it's cleared out proactively. It'd be good to cover the standard case too.

> Failed DataNode lookup can crash NameNode with NullPointerException
> -------------------------------------------------------------------
>
>                 Key: HDFS-7225
>                 URL: https://issues.apache.org/jira/browse/HDFS-7225
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 2.6.0
>            Reporter: Zhe Zhang
>            Assignee: Zhe Zhang
>         Attachments: HDFS-7225-v1.patch, HDFS-7225-v2.patch, HDFS-7225-v3.patch
>
>
> {{BlockManager#invalidateWorkForOneNode}} looks up a DataNode by the {{datanodeUuid}}
and passes the resultant {{DatanodeDescriptor}} to {{InvalidateBlocks#invalidateWork}}. However,
if a wrong or outdated {{datanodeUuid}} is used, a null pointer will be passed to {{invalidateWork}}
which will use it to lookup in a {{TreeMap}}. Since the key type is {{DatanodeDescriptor}},
key comparison is based on the IP address. A null key will crash the NameNode with an NPE.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message