Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 036771113B for ; Wed, 10 Sep 2014 14:04:32 +0000 (UTC) Received: (qmail 38768 invoked by uid 500); 10 Sep 2014 14:04:31 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 38711 invoked by uid 500); 10 Sep 2014 14:04:31 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 38592 invoked by uid 99); 10 Sep 2014 14:04:31 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2014 14:04:31 +0000 Date: Wed, 10 Sep 2014 14:04:31 +0000 (UTC) From: "Hudson (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-2526) SLS can deadlock when all the threads are taken by AMSimulators MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14128491#comment-14128491 ] Hudson commented on YARN-2526: ------------------------------ SUCCESS: Integrated in Hadoop-Hdfs-trunk #1867 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1867/]) YARN-2526. SLS can deadlock when all the threads are taken by AMSimulators. (Wei Yan via kasha) (kasha: rev 28d99db99236ff2a6e4a605802820e2b512225f9) * hadoop-yarn-project/CHANGES.txt * hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/appmaster/MRAMSimulator.java > SLS can deadlock when all the threads are taken by AMSimulators > --------------------------------------------------------------- > > Key: YARN-2526 > URL: https://issues.apache.org/jira/browse/YARN-2526 > Project: Hadoop YARN > Issue Type: Bug > Components: scheduler-load-simulator > Affects Versions: 2.5.1 > Reporter: Wei Yan > Assignee: Wei Yan > Priority: Critical > Fix For: 2.6.0 > > 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)