[jira] [Commented] (YARN-2526) Scheduler Load Simulator may enter deadlock if lots of applications submitted to the RM at the same time

2014-09-09 Thread Karthik Kambatla (JIRA)

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

Karthik Kambatla commented on YARN-2526:


Thanks for reporting and fixing this, Wei.

+1. Committing this. 

> Scheduler Load Simulator may enter deadlock if lots of applications submitted 
> to the RM at the same time
> 
>
> Key: YARN-2526
> URL: https://issues.apache.org/jira/browse/YARN-2526
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Wei Yan
>Assignee: Wei Yan
>Priority: Minor
> Attachments: YARN-2526-1.patch
>
>
> The simulation may enter deadlock if all application simulators hold all 
> threads provided by the thread pool, and all wait for AM container 
> allocation. In that case, all AM simulators wait for NM simulators to do 
> heartbeat to allocate resource, and all NM simulators wait for AM simulators 
> to release some threads. The simulator is deadlocked.
> To solve this deadlock, need to remove the while() loop in the MRAMSimulator.
> {code}
> // waiting until the AM container is allocated
> while (true) {
>   if (response != null && ! response.getAllocatedContainers().isEmpty()) {
> // get AM container
> .
> break;
>   }
>   // this sleep time is different from HeartBeat
>   Thread.sleep(1000);
>   // send out empty request
>   sendContainerRequest();
>   response = responseQueue.take();
> }
> {code}



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


[jira] [Commented] (YARN-2526) Scheduler Load Simulator may enter deadlock if lots of applications submitted to the RM at the same time

2014-09-09 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on YARN-2526:
-

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12667440/YARN-2526-1.patch
  against trunk revision 90c8ece.

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in 
hadoop-tools/hadoop-sls.

{color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-YARN-Build/4857//testReport/
Console output: https://builds.apache.org/job/PreCommit-YARN-Build/4857//console

This message is automatically generated.

> Scheduler Load Simulator may enter deadlock if lots of applications submitted 
> to the RM at the same time
> 
>
> Key: YARN-2526
> URL: https://issues.apache.org/jira/browse/YARN-2526
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Wei Yan
>Assignee: Wei Yan
>Priority: Minor
> Attachments: YARN-2526-1.patch
>
>
> The simulation may enter deadlock if all application simulators hold all 
> threads provided by the thread pool, and all wait for AM container 
> allocation. In that case, all AM simulators wait for NM simulators to do 
> heartbeat to allocate resource, and all NM simulators wait for AM simulators 
> to release some threads. The simulator is deadlocked.
> To solve this deadlock, need to remove the while() loop in the MRAMSimulator.
> {code}
> // waiting until the AM container is allocated
> while (true) {
>   if (response != null && ! response.getAllocatedContainers().isEmpty()) {
> // get AM container
> .
> break;
>   }
>   // this sleep time is different from HeartBeat
>   Thread.sleep(1000);
>   // send out empty request
>   sendContainerRequest();
>   response = responseQueue.take();
> }
> {code}



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