Karthik Kambatla commented on YARN-3464:

Discussed this with Zhihai offline. 

Firstly, responding with a DIE when {{LocalizerRunner#pending}} is empty seems 
wrong. I don't think synchronizing that check is really going to help if 
someone can add a request to {{pending}} after that. We see two alternatives:
# If we are going to leave the ContainerLocalizer around, why do we even bother 
issuing a DIE action? Can we just let it LIVE forever.
# If there is merit to killing the ContainerLocalizer, we could have a sentinel 
sent for each localizer. DIE action is to be sent only when either of the two 
conditions are met:
## One of the localizations failed. Since the container can't be launched, kill 
the localizer and fail the container.
## The sentinel has been received *and* all previously scheduled localizations 
have been fetched successfully ({{LocalizerRunner#scheduled.isEmpty()}}) 

While we make these changes, I see how YARN-3465 could be useful in reducing 
the likelihood of this issue in the interim. 

> Race condition in LocalizerRunner causes container localization timeout.
> ------------------------------------------------------------------------
>                 Key: YARN-3464
>                 URL: https://issues.apache.org/jira/browse/YARN-3464
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>            Reporter: zhihai xu
>            Assignee: zhihai xu
>            Priority: Critical
> Race condition in LocalizerRunner causes container localization timeout.
> Currently LocalizerRunner will kill the ContainerLocalizer when pending list 
> for LocalizerResourceRequestEvent is empty.
> {code}
>       } else if (pending.isEmpty()) {
>         action = LocalizerAction.DIE;
>       }
> {code}
> If a LocalizerResourceRequestEvent is added after LocalizerRunner kill the 
> ContainerLocalizer due to empty pending list, this 
> LocalizerResourceRequestEvent will never be handled.
> Without ContainerLocalizer, LocalizerRunner#update will never be called.
> The container will stay at LOCALIZING state, until the container is killed by 

This message was sent by Atlassian JIRA

Reply via email to