Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 94D3F200BFF for ; Tue, 3 Jan 2017 04:26:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 937FB160B30; Tue, 3 Jan 2017 03:26:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DC78E160B22 for ; Tue, 3 Jan 2017 04:25:59 +0100 (CET) Received: (qmail 56173 invoked by uid 500); 3 Jan 2017 03:25:58 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 56154 invoked by uid 99); 3 Jan 2017 03:25:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2017 03:25:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 945942C1F54 for ; Tue, 3 Jan 2017 03:25:58 +0000 (UTC) Date: Tue, 3 Jan 2017 03:25:58 +0000 (UTC) From: "Tao Yang (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-6029) CapacityScheduler deadlock when ParentQueue#getQueueUserAclInfo is called by Thread_A at the moment that Thread_B calls LeafQueue#assignContainers to release a reserved container MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 Jan 2017 03:26:00 -0000 [ https://issues.apache.org/jira/browse/YARN-6029?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D15794= 011#comment-15794011 ]=20 Tao Yang commented on YARN-6029: -------------------------------- Hi=EF=BC=8C[~Naganarasimha] I thought the application could be finished in another thread which is call= ing LQ#finishApplicationAttempt meanwhile. Perhaps app will still assign co= ntainer after finished. > CapacityScheduler deadlock when ParentQueue#getQueueUserAclInfo is called= by Thread_A at the moment that Thread_B calls LeafQueue#assignContainers t= o release a reserved container > -------------------------------------------------------------------------= ---------------------------------------------------------------------------= ------------------------------ > > Key: YARN-6029 > URL: https://issues.apache.org/jira/browse/YARN-6029 > Project: Hadoop YARN > Issue Type: Bug > Components: capacityscheduler > Affects Versions: 2.8.0 > Reporter: Tao Yang > Assignee: Wangda Tan > Priority: Critical > Attachments: YARN-6029-branch-2.8.001.patch, YARN-6029.001.patch,= YARN-6029.002.patch, deadlock.jstack > > > When ParentQueue#getQueueUserAclInfo is called (e.g. a client calls YarnC= lient#getQueueAclsInfo) just at the moment that LeafQueue#assignContainers = is called and before notifying parent queue to release resource (should rel= ease a reserved container), then ResourceManager can deadlock. I found this= problem on our testing environment for hadoop2.8. > Reproduce the deadlock in chronological order > * 1. Thread A (ResourceManager Event Processor) calls synchronized LeafQu= eue#assignContainers (got LeafQueue instance lock of queue root.a) > * 2. Thread B (IPC Server handler) calls synchronized ParentQueue#getQueu= eUserAclInfo (got ParentQueue instance lock of queue root), iterates over c= hildren queue acls and is blocked when calling synchronized LeafQueue#getQu= eueUserAclInfo (the LeafQueue instance lock of queue root.a is hold by Thre= ad A) > * 3. Thread A wants to inform the parent queue that a container is being = completed and is blocked when invoking synchronized ParentQueue#internalRel= easeResource method (the ParentQueue instance lock of queue root is hold by= Thread B) > I think the synchronized modifier of LeafQueue#getQueueUserAclInfo can be= removed to solve this problem, since this method appears to not affect fie= lds of LeafQueue instance. > Attach patch with UT for review. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org