You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Junping Du (JIRA)" <ji...@apache.org> on 2015/04/04 05:17:33 UTC

[jira] [Commented] (YARN-375) FIFO scheduler may crash due to bugg app

    [ https://issues.apache.org/jira/browse/YARN-375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14395503#comment-14395503 ] 

Junping Du commented on YARN-375:
---------------------------------

This won't happen because after AM sending resource requests to RM (via ApplicationMasterProtocol) in allocate(AllocateRequest request), the RM will do sanity check against it which include checking memory > 0.
Related code pieces:
In ApplicationMasterService.java,
{code}
        RMServerUtils.validateResourceRequests(ask,
            rScheduler.getMaximumResourceCapability());
{code}

In RMServerUtils.java,
{code}
 public static void validateResourceRequest(ResourceRequest resReq,
      Resource maximumResource) throws InvalidResourceRequestException {
    if (resReq.getCapability().getMemory() < 0 ||
        resReq.getCapability().getMemory() > maximumResource.getMemory()) {
      throw new InvalidResourceRequestException("Invalid resource request"
          + ", requested memory < 0"
          + ", or requested memory > max configured"
          + ", requestedMemory=" + resReq.getCapability().getMemory()
          + ", maxMemory=" + maximumResource.getMemory());
    }
...
{code}
Will resolve this JIRA as not a problem.

> FIFO scheduler may crash due to bugg app  
> ------------------------------------------
>
>                 Key: YARN-375
>                 URL: https://issues.apache.org/jira/browse/YARN-375
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Arun C Murthy
>            Priority: Critical
>
> The following code should check for a 0 return value rather than crash!
> {code}
>     int availableContainers = 
>       node.getAvailableResource().getMemory() / capability.getMemory(); // TODO: A buggy
>                                                                         // application
>                                                                         // with this
>                                                                         // zero would
>                                                                         // crash the
>                                                                         // scheduler.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)