HBase
  1. HBase
  2. HBASE-4980

Null pointer exception in HBaseClient receiveResponse

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.92.0
    • Fix Version/s: 0.92.0
    • Component/s: Client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Relevant Stack trace:

      2011-11-30 13:10:26,557 [IPC Client (47) connection to xx.xx.xx/172.22.4.68:60020 from an unknown user] WARN org.apache.hadoop.ipc.HBaseClient - Unexpected exception receiving call responses
      java.lang.NullPointerException
      >-at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.receiveResponse(HBaseClient.java:583)
      >-at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.run(HBaseClient.java:511)

        if (LOG.isDebugEnabled())
                LOG.debug(getName() + " got value #" + id);
              Call call = calls.remove(id);
              // Read the flag byte
              byte flag = in.readByte();
              boolean isError = ResponseFlag.isError(flag);
              if (ResponseFlag.isLength(flag)) {
                // Currently length if present is unused.
                in.readInt();
              }
              int state = in.readInt(); // Read the state.  Currently unused.
              if (isError) {
                //noinspection ThrowableInstanceNeverThrown
                call.setException(new RemoteException( WritableUtils.readString(in),
                    WritableUtils.readString(in)));
              } else {
      

      This line

      Call call = calls.remove(id);

      may return a null 'call'. It is so because if you have rpc timeout enable, we proactively clean up other calls which have expired their lifetime along with the call for which socket timeout exception happend.

        Activity

        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-security #26 (See https://builds.apache.org/job/HBase-TRUNK-security/26/)
        HBASE-4980 Null pointer exception in HBaseClient receiveResponse

        stack :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-security #26 (See https://builds.apache.org/job/HBase-TRUNK-security/26/ ) HBASE-4980 Null pointer exception in HBaseClient receiveResponse stack : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92-security #34 (See https://builds.apache.org/job/HBase-0.92-security/34/)
        HBASE-4980 Null pointer exception in HBaseClient receiveResponse
        HBASE-4980 Null pointer exception in HBaseClient receiveResponse

        stack :
        Files :

        • /hbase/branches/0.92/CHANGES.txt

        stack :
        Files :

        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
        Show
        Hudson added a comment - Integrated in HBase-0.92-security #34 (See https://builds.apache.org/job/HBase-0.92-security/34/ ) HBASE-4980 Null pointer exception in HBaseClient receiveResponse HBASE-4980 Null pointer exception in HBaseClient receiveResponse stack : Files : /hbase/branches/0.92/CHANGES.txt stack : Files : /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2532 (See https://builds.apache.org/job/HBase-TRUNK/2532/)
        HBASE-4980 Null pointer exception in HBaseClient receiveResponse

        stack :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2532 (See https://builds.apache.org/job/HBase-TRUNK/2532/ ) HBASE-4980 Null pointer exception in HBaseClient receiveResponse stack : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92 #179 (See https://builds.apache.org/job/HBase-0.92/179/)
        HBASE-4980 Null pointer exception in HBaseClient receiveResponse
        HBASE-4980 Null pointer exception in HBaseClient receiveResponse

        stack :
        Files :

        • /hbase/branches/0.92/CHANGES.txt

        stack :
        Files :

        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
        Show
        Hudson added a comment - Integrated in HBase-0.92 #179 (See https://builds.apache.org/job/HBase-0.92/179/ ) HBASE-4980 Null pointer exception in HBaseClient receiveResponse HBASE-4980 Null pointer exception in HBaseClient receiveResponse stack : Files : /hbase/branches/0.92/CHANGES.txt stack : Files : /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
        Hide
        stack added a comment -

        Committed trunk and branch. Thanks for the patch Shrjeet.

        Show
        stack added a comment - Committed trunk and branch. Thanks for the patch Shrjeet.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12506636/0003-HBASE-4980-Fix-NPE-in-HBaseClient-receiveResponse.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 javadoc. The javadoc tool appears to have generated -160 warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        -1 findbugs. The patch appears to introduce 74 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in .

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/475//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/475//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/475//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12506636/0003-HBASE-4980-Fix-NPE-in-HBaseClient-receiveResponse.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 javadoc. The javadoc tool appears to have generated -160 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 74 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/475//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/475//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/475//console This message is automatically generated.
        Hide
        stack added a comment -

        If you see nothing in next hour, yes.

        Show
        stack added a comment - If you see nothing in next hour, yes.
        Hide
        Shrijeet Paliwal added a comment -

        Done attaching, should I click cancel patch and then click submit patch again?

        Show
        Shrijeet Paliwal added a comment - Done attaching, should I click cancel patch and then click submit patch again?
        Hide
        Ted Yu added a comment -

        Please use --no-prefix to generate patch.

        Show
        Ted Yu added a comment - Please use --no-prefix to generate patch.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12506577/0002-HBASE-4980-Fix-NPE-in-HBaseClient-receiveResponse.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/473//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12506577/0002-HBASE-4980-Fix-NPE-in-HBaseClient-receiveResponse.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/473//console This message is automatically generated.
        Hide
        Ted Yu added a comment - - edited

        +1 if tests pass.

        Show
        Ted Yu added a comment - - edited +1 if tests pass.
        Hide
        Shrijeet Paliwal added a comment -

        Based on Ted's comment. Also generated this on top of trunk

        Show
        Shrijeet Paliwal added a comment - Based on Ted's comment. Also generated this on top of trunk
        Hide
        Shrijeet Paliwal added a comment -

        Will attach another patch based on Ted's comment.

        Show
        Shrijeet Paliwal added a comment - Will attach another patch based on Ted's comment.
        Hide
        Ted Yu added a comment -

        The patch changes the semantics of original error handling.
        I think we shouldn't leave data unread in the input stream.

        Show
        Ted Yu added a comment - The patch changes the semantics of original error handling. I think we shouldn't leave data unread in the input stream.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12506575/0001-HBASE-4980-Fix-NPE-in-HBaseClient-receiveResponse.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/472//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12506575/0001-HBASE-4980-Fix-NPE-in-HBaseClient-receiveResponse.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/472//console This message is automatically generated.
        Hide
        Shrijeet Paliwal added a comment -

        Attached is the patch.

        Show
        Shrijeet Paliwal added a comment - Attached is the patch.

          People

          • Assignee:
            Shrijeet Paliwal
            Reporter:
            Shrijeet Paliwal
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development