Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 999 Bytes

MR-7178.md

File metadata and controls

32 lines (22 loc) · 999 Bytes

MR-7178

Scenario

  1. Shutdown command comes while YarnChild is initializing

  2. line#1 is crash point, so we inject shutdown after it.

    YarnChild.taskid = task.getTaskID();
    try{
     logSyncer = TaskLog.createLogSyncer();//line 168
     ....
     taskFinal.run(job, umbilical); //line 178
    }catch (Exception exception) {//line 187
      LOG.warn("Exception running child : "
       + StringUtils.stringifyException(exception));
       .................
       task.taskCleanup(umbilical);// line 200
    }
    
  3. But line168 throw exception:"Shutdown in progress, cannot add a shutdownHook".

  4. Line 187 will catch this exception and do clean up(line 200), code line 200 will use task.committer without null check, hence NPE happens

Trigger analysis

  1. YarnChild.taskid is the meta-info

  2. And it is written, we should crash the YarnChild node, but due to YarnChild.taskid is already on YarnChild node, so crash should change to shutdown.