Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.28 KB

YARN-9248.md

File metadata and controls

41 lines (28 loc) · 1.28 KB

YARN-9248

Scenario

YARN-9248
  1. RMContainer is creating opportunistic container, and it will read ContainerId(line#3 below code)

  2. public static RMContainer createOpportunisticRmContainer(RMContext rmContext,
          Container container, boolean isRemotelyAllocated) {
        appAttempt.addRMContainer(container.getId(), rmContainer);
        node.allocateContainer(rmContainer);
        return rmContainer;
      }
    .....
    handleNewContainers{
        rmContainer.handle(
                new RMContainerEvent(container.getId(),
                    RMContainerEventType.ACQUIRED));
    }
  3. Shutdown command is sent to NM who holds the container, so KILL event will come.

  4. the state of RMContainer changes to KILLED

  5. Then RM will send ACQUIR event to RMContainer(code#9), but it can't handle this event at KILLED state.

Trigger analysis

  1. Inject shutdown command is very important to trigger KILL Event.

Crash Point

pre-read

org.apache.hadoop.yarn.server.resourcemanager.OpportunisticContainerAllocatorAMService$OpportunisticAMSProcessor allocate 182