-
HMaster is opening RS, shutdown comes, hence open fails and RS start to 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
- Actually, this is a atomic violation bugs, CrashTuner can trigger it has three reasons:
- First, CrashTuner Identify the RegionInfo as meta-info, and RS open the region based on the RegionInfo, so it can inject shutdown before open region and cause abort.
- Second, CrashTuner inject sleep after shutdown, so it can make the above code snippet execute concurrently.
- Third, We are so lucky to make the code snippet 2 comes in the middle of code snippet1.