Details
-
Bug
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
3.0.0-alpha-1
-
None
-
None
Description
while RS shutdown, the RS#abort are called due to
handler.AssignRegionHandler: Fatal error occured while opening region hbase:meta,,1.1588230740, aborting...
And in abort:
2428.if (rssStub != null && this.serverName != null) { 2429 ReportRSFatalErrorRequest.Builder builder = 2430. ReportRSFatalErrorRequest.newBuilder(); 2431. builder.setServer(ProtobufUtil.toServerName(this.serverName)); 2432 builder.setErrorMessage(msg); 2433 rssStub.reportRSFatalError(null, builder.build()); 2434 }
2428-2434 are assumed to be atomic, but if it step in the 2429-2433, meanwhile RS#run:
1149 // Make sure the proxy is down. 1150 if (this.rssStub != null) { 1151 this.rssStub = null; 1152 }
So the rssStub == null and NPE happens
2019-03-14 04:49:53,016 WARN [RS_CLOSE_META-regionserver/hadoop12:16020-0] regionserver.HRegionServer: Unable to report fatal error to master java.lang.NullPointerException at org.apache.hadoop.hbase.regionserver.HRegionServer.abort(HRegionServer.java:2433) at org.apache.hadoop.hbase.regionserver.handler.AssignRegionHandler.handleException(AssignRegionHandler.java:154) at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:106) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
I think we should avoid the NPE.