You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2008/10/21 16:17:44 UTC

[jira] Created: (HADOOP-4476) NPE in datanode.handshake()

NPE in datanode.handshake()
---------------------------

                 Key: HADOOP-4476
                 URL: https://issues.apache.org/jira/browse/HADOOP-4476
             Project: Hadoop Core
          Issue Type: Bug
          Components: dfs
    Affects Versions: 0.20.0
            Reporter: Steve Loughran
            Priority: Minor


It appears possible to raise an NPE in DataNode.handshake() if the startup protocol gets interrupted or fails in some manner

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4476) NPE in datanode.handshake()

Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641388#action_12641388 ] 

Steve Loughran commented on HADOOP-4476:
----------------------------------------

stack trace

{code}
[sf-startdaemon-debug]         java.lang.NullPointerException
[sf-startdaemon-debug]  at org.apache.hadoop.hdfs.server.datanode.DataNode.handshake(DataNode.java:443)
[sf-startdaemon-debug]  at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:302)

{code}

The line at fault is 
{code}
if( ! nsInfo.getBuildVersion().equals( Storage.getBuildVersion() )) 
{code} 
At a guess, the getBuildVersion() value is null, which implies the handshaking failed; the datanode was still handshaking when shouldRun was set to false, it stopped spinning trying to talk to the namenode, and instead of checking for shouldRun==true and bailing out, it assumed the handshake information had been correctly received.

> NPE in datanode.handshake()
> ---------------------------
>
>                 Key: HADOOP-4476
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4476
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.20.0
>            Reporter: Steve Loughran
>            Priority: Minor
>
> It appears possible to raise an NPE in DataNode.handshake() if the startup protocol gets interrupted or fails in some manner

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4476) NPE in datanode.handshake()

Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641393#action_12641393 ] 

Steve Loughran commented on HADOOP-4476:
----------------------------------------

Also, at this point in datanode startup, the nameNodeAddr value hasnt been assigned to the static field {{DataNode.nameNodeAddr = nameNodeAddr;}}, so getNameNodeAddr() returns null; not so good for logging/error messages that exist in this method.

> NPE in datanode.handshake()
> ---------------------------
>
>                 Key: HADOOP-4476
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4476
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.20.0
>            Reporter: Steve Loughran
>            Priority: Minor
>
> It appears possible to raise an NPE in DataNode.handshake() if the startup protocol gets interrupted or fails in some manner

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.