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

Missing null check of rpcServer.scheduler.executor causes NPE with invalid value of hbase.client.default.rpc.codec

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      When `hbase.client.default.rpc.codec` is set to `org.apache.hadoop.hbase.regionserver.wal.SecureWALCellCodec` the method `createRpcClientRTEDuringConnectionSetup` gives a NoSuchMethodException for the provided default codec value. 
       
      Since there was an exception, the code inside try block is not executed which contained the below code line 

      try (AbstractRpcClient<?> client = createRpcClientRTEDuringConnectionSetup(clientConf))
      {       rpcServer.start();       . . .     }
      

       

      When finally block is executed which contains 

      finally
      {       rpcServer.stop();     }
      

       

      The method `rpcServer.stop()` eventually makes call to `executor.shutdown()`. A null pointer exception is returned as  `rpcServer.scheduler.executor`  was never instantiated, which happens inside `rpcServer.start()`
       

      java.lang.NullPointerException
      at org.apache.hadoop.hbase.ipc.FifoRpcScheduler.stop(FifoRpcScheduler.java:71)
      at org.apache.hadoop.hbase.ipc.SimpleRpcServer.stop(SimpleRpcServer.java:441)
      at org.apache.hadoop.hbase.ipc.AbstractTestIPC.testRTEDuringConnectionSetup(AbstractTestIPC.java:194)

       

      Attachments

        Issue Links

          Activity

            People

              FuzzingTeam ConfX
              FuzzingTeam ConfX
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: