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 45D8C18E65 for ; Mon, 31 Aug 2015 03:15:46 +0000 (UTC) Received: (qmail 85443 invoked by uid 500); 31 Aug 2015 03:15:46 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 85390 invoked by uid 500); 31 Aug 2015 03:15:46 -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 85375 invoked by uid 99); 31 Aug 2015 03:15:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Aug 2015 03:15:46 +0000 Date: Mon, 31 Aug 2015 03:15:46 +0000 (UTC) From: "Hudson (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-2945) FSLeafQueue#assignContainer - document the reason for using both write and read locks 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-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14721915#comment-14721915 ] Hudson commented on YARN-2945: ------------------------------ FAILURE: Integrated in Hadoop-trunk-Commit #8371 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/8371/]) YARN-2945. Fixing the CHANGES.txt to have the right JIRA number. (vinodkv: rev cf831565e8344523e1bd0eaf686ed56a2b48b920) * hadoop-yarn-project/CHANGES.txt > FSLeafQueue#assignContainer - document the reason for using both write and read locks > ------------------------------------------------------------------------------------- > > Key: YARN-2945 > URL: https://issues.apache.org/jira/browse/YARN-2945 > Project: Hadoop YARN > Issue Type: Bug > Reporter: Tsuyoshi Ozawa > Assignee: Tsuyoshi Ozawa > Fix For: 2.7.0 > > Attachments: YARN-2945.001.patch, YARN-2945.002.patch > > > After YARN-2910, assignContainer hold WriteLock while sorting and ReadLock while referencing runnableApps. This can cause interrupted assignment of containers regardless of the policy. > {code} > writeLock.lock(); > try { > Collections.sort(runnableApps, comparator); > } finally { > writeLock.unlock(); > } > readLock.lock(); > try { > for (FSAppAttempt sched : runnableApps) { > if (SchedulerAppUtils.isBlacklisted(sched, node, LOG)) { > continue; > } > assigned = sched.assignContainer(node); > if (!assigned.equals(Resources.none())) { > break; > } > } > } finally { > readLock.unlock(); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)