[ 
https://issues.apache.org/jira/browse/HBASE-28452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang resolved HBASE-28452.
-------------------------------
    Fix Version/s: 2.4.18
                   2.7.0
                   3.0.0-beta-2
                   2.6.1
                   2.5.9
     Hadoop Flags: Reviewed
         Assignee: ConfX
       Resolution: Fixed

Pushed to all active branches.

Thanks [~FuzzingTeam] for contributing!

> Missing null check of rpcServer.scheduler.executor causes NPE with invalid 
> value of hbase.client.default.rpc.codec
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-28452
>                 URL: https://issues.apache.org/jira/browse/HBASE-28452
>             Project: HBase
>          Issue Type: Bug
>          Components: IPC/RPC
>            Reporter: ConfX
>            Assignee: ConfX
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.4.18, 2.7.0, 3.0.0-beta-2, 2.6.1, 2.5.9
>
>
> 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 
> {code:java}
> try (AbstractRpcClient<?> client = 
> createRpcClientRTEDuringConnectionSetup(clientConf))
> {       rpcServer.start();       . . .     }
> {code}
>  
> When finally block is executed which contains 
> {code:java}
> finally
> {       rpcServer.stop();     }
> {code}
>  
> 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()`
>  
> {code:java}
> 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){code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to