Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-8397

NPE thrown when IPC layer gets an EOF reading a response

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • 2.0.0-alpha, 3.0.0-alpha1
    • None
    • ipc
    • None

    Description

      When making a call on an IPC connection where the other end has shut down, I see the following exception:
      Caused by: java.lang.NullPointerException
      at org.apache.hadoop.ipc.Client$Connection.receiveResponse(Client.java:852)
      at org.apache.hadoop.ipc.Client$Connection.run(Client.java:781)
      from the lines:

              RpcResponseHeaderProto response = 
                  RpcResponseHeaderProto.parseDelimitedFrom(in);
              int callId = response.getCallId();
      

      This is because parseDelimitedFrom() returns null in the case that the next thing to be read on the stream is an EOF.

      Attachments

        1. HADOOP-8397.patch
          4 kB
          Vinayakumar B

        Issue Links

          Activity

            People

              vinayakumarb Vinayakumar B
              tlipcon Todd Lipcon
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: