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 2D353D6CB for ; Wed, 17 Oct 2012 11:54:07 +0000 (UTC) Received: (qmail 41469 invoked by uid 500); 17 Oct 2012 11:54:06 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 41353 invoked by uid 500); 17 Oct 2012 11:54:05 -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 41304 invoked by uid 99); 17 Oct 2012 11:54:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2012 11:54:04 +0000 Date: Wed, 17 Oct 2012 11:54:04 +0000 (UTC) From: "Devaraj K (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: <1765133087.57171.1350474844521.JavaMail.jiratomcat@arcas> In-Reply-To: <1111278586.57162.1350474603317.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (YARN-164) Race condition in Fair Scheduler 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-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Devaraj K updated YARN-164: --------------------------- Attachment: YARN-164.patch Attaching the straightforward patch to fix this issue. > Race condition in Fair Scheduler > -------------------------------- > > Key: YARN-164 > URL: https://issues.apache.org/jira/browse/YARN-164 > Project: Hadoop YARN > Issue Type: Bug > Components: scheduler > Affects Versions: 2.0.2-alpha > Reporter: Devaraj K > Assignee: Devaraj K > Priority: Critical > Attachments: YARN-164.patch > > > {code:xml} > Thread updateThread = new Thread(new UpdateThread()); > updateThread.start(); > initialized = true; > {code} > In the above code, making the initialized as true after starting the UpdateThread. > {code:xml} > private class UpdateThread implements Runnable { > public void run() { > while (initialized) { > try { > Thread.sleep(UPDATE_INTERVAL); > update(); > preemptTasksIfNecessary(); > } catch (Exception e) { > LOG.error("Exception in fair scheduler UpdateThread", e); > } > } > } > } > {code} > In this run method of UpdateThread, it is checking for the initialized and exiting if it is not true. Here most of the times initialized is getting true after exiting the UpdateThread and the thread functionality is missing, due to that all the submitted applications are hanging without making any progress. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira