Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20139

NPE in RSRpcServices.get() when getRegion throws an exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.1
    • 1.3.2, 1.4.3
    • None
    • None
    • Reviewed

    Description

      We can get a NPE in RsRpcServices at 

      } finally {
      if (regionServer.metricsRegionServer != null) {
      regionServer.metricsRegionServer.updateGet(
      -> region.getTableDesc().getTableName(), EnvironmentEdgeManager.currentTime() - before);
      }
      if (quota != null) {
      quota.close();
      }

      when region itself is null which might happen when getRegion throws an exception, this is then sent back to the client which is not able to handle this/make sense of it.

      2018-03-06 08:31:25,100 DEBUG [0,queue=4,port=60020] ipc.RpcServer - RpcServer.FifoWFPBQ.default.handler=30,queue=4,port=60020: callId: 5605567 service: ClientService methodName: Get size: 79 connection: xyz:58736 deadline: 9223372036854775807
      java.io.IOException
              at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2431)
              at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124)
              at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:188)
              at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:168)
      Caused by: java.lang.NullPointerException
              at org.apache.hadoop.hbase.regionserver.RSRpcServices.get(RSRpcServices.java:2246)
              at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:35068)
              at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2373)
              ... 3 more

      This has been fixed by stack over at HBASE-18946 for master, backporting the same to branch-1, 1.3 and 1.4

      Attachments

        1. HBASE-20139.branch-1.001.patch
          2 kB
          Abhishek Singh Chouhan
        2. HBASE-20139.branch-1.3.001.patch
          1 kB
          Abhishek Singh Chouhan
        3. HBASE-20139.branch-1.3.001.patch
          1 kB
          Michael Stack

        Activity

          People

            abhishek.chouhan Abhishek Singh Chouhan
            abhishek.chouhan Abhishek Singh Chouhan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: