From yarn-issues-return-74905-apmail-hadoop-yarn-issues-archive=hadoop.apache.org@hadoop.apache.org Sun Dec 6 16:12:27 2015 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 534B4180D9 for ; Sun, 6 Dec 2015 16:12:27 +0000 (UTC) Received: (qmail 17003 invoked by uid 500); 6 Dec 2015 16:12:11 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 16955 invoked by uid 500); 6 Dec 2015 16:12:11 -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 16944 invoked by uid 99); 6 Dec 2015 16:12:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Dec 2015 16:12:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 143CD2C1F5B for ; Sun, 6 Dec 2015 16:12:11 +0000 (UTC) Date: Sun, 6 Dec 2015 16:12:11 +0000 (UTC) From: "Sunil G (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-4416) Deadlock due to synchronised get Methods in AbstractCSQueue 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-4416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15043940#comment-15043940 ] Sunil G commented on YARN-4416: ------------------------------- A typo Almost all api's exposed from LeafQueue is used with Lock from Queue ==> Almost all api's exposed from *AbstractComparatorOrderingPolicy* is used with Lock from Queue > Deadlock due to synchronised get Methods in AbstractCSQueue > ----------------------------------------------------------- > > Key: YARN-4416 > URL: https://issues.apache.org/jira/browse/YARN-4416 > Project: Hadoop YARN > Issue Type: Bug > Components: capacity scheduler, resourcemanager > Affects Versions: 2.7.1 > Reporter: Naganarasimha G R > Assignee: Naganarasimha G R > Priority: Minor > Attachments: YARN-4416.v1.001.patch, YARN-4416.v1.002.patch, deadlock.log > > > While debugging in eclipse came across a scenario where in i had to get to know the name of the queue but every time i tried to see the queue it was getting hung. On seeing the stack realized there was a deadlock but on analysis found out that it was only due to *queue.toString()* during debugging as {{AbstractCSQueue.getAbsoluteUsedCapacity}} was synchronized. > Still i feel {{AbstractCSQueue}}'s getter methods need not be synchronized and better be handled through read and write locks. -- This message was sent by Atlassian JIRA (v6.3.4#6332)