lujie created HBASE-22050:
-----------------------------

             Summary: NPE happens while RS shutdown, due to atomic violation
                 Key: HBASE-22050
                 URL: https://issues.apache.org/jira/browse/HBASE-22050
             Project: HBase
          Issue Type: Bug
            Reporter: lujie


while RS shutdown, the RS#abort are called due to
{code:java}
handler.AssignRegionHandler: Fatal error occured while opening region 
hbase:meta,,1.1588230740, aborting...
{code}
And in abort:
{code:java}
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 }
{code}
2428-2434 are assumed to be atomic, but if it step in the 2429-2433, meanwhile 
RS#run:
{code:java}
1149 // Make sure the proxy is down.
1150 if (this.rssStub != null) {
1151    this.rssStub = null;
1152 }
{code}
So the rssStub == null and NPE happens
{code:java}
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)

{code}
I think we should avoid the NPE.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to