- DN start to register to NN, but shutdown command comes, so recovery will reset the shouldRun.
- DN is ready to register, but it found it should not run(code#3), so it will skip initialize the bpRegistration.
- Following code will use the bpRegistration without check, hence exception happens and shutdown aborts.
class BPOfferService {
private final DataNode dn;
}
- It seems that shouldRun should be the meta-info variable, but shouldRun is Boolean type, so CrashTuner will not identify it as meta-info variable. So how CrashTuner trigger this bug.
- In the code of figure, the type of bpos is BPOfferService, it has a field named as dn whose type is DataNode, and DataNode is meta-info. BPOfferService#dn can only be set in constructor, so BPOfferService is also meta-info. So code#2 is crash point, and is read, so shutdown command will inject and the bug will be triggered.