Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1.13 KB

HDFS-14372.md

File metadata and controls

23 lines (16 loc) · 1.13 KB

HDFS-14372

Scenario

HDFS-14372
  1. DN start to register to NN, but shutdown command comes, so recovery will reset the shouldRun.
  2. DN is ready to register, but it found it should not run(code#3), so it will skip initialize the bpRegistration.
  3. Following code will use the bpRegistration without check, hence exception happens and shutdown aborts.

Trigger analysis

class BPOfferService {
    private final DataNode dn;
}
  1. 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.
  2. 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.