Hadoop Common
  1. Hadoop Common
  2. HADOOP-8397

NPE thrown when IPC layer gets an EOF reading a response

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.0.0-alpha, 3.0.0
    • Fix Version/s: None
    • Component/s: ipc
    • Labels:
      None
    • Target Version/s:

      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.

      1. HADOOP-8397.patch
        4 kB
        Vinayakumar B

        Issue Links

          Activity

            People

            • Assignee:
              Vinayakumar B
              Reporter:
              Todd Lipcon
            • Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development