Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 18828183CA for ; Sat, 18 Jul 2015 05:00:17 +0000 (UTC) Received: (qmail 82634 invoked by uid 500); 18 Jul 2015 05:00:17 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 82595 invoked by uid 500); 18 Jul 2015 05:00:17 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 82569 invoked by uid 99); 18 Jul 2015 05:00:16 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Jul 2015 05:00:16 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 5CC05BD4EC; Sat, 18 Jul 2015 05:00:15 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0617864330857704719==" MIME-Version: 1.0 Subject: Re: Review Request 36587: Ambari server deadlock causing cluster create to be stuck From: "Sid Wagle" To: "Alejandro Fernandez" , "Mahadev Konar" , "Myroslav Papirkovskyy" , "Sumit Mohanty" , "Jonathan Hurley" Cc: "Sid Wagle" , "Ambari" Date: Sat, 18 Jul 2015 05:00:15 -0000 Message-ID: <20150718050015.17362.88561@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Sid Wagle" X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/36587/ X-Sender: "Sid Wagle" References: <20150718045411.17363.75531@reviews.apache.org> In-Reply-To: <20150718045411.17363.75531@reviews.apache.org> Reply-To: "Sid Wagle" X-ReviewRequest-Repository: ambari --===============0617864330857704719== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On July 18, 2015, 4:54 a.m., Sumit Mohanty wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java, line 722 > > > > > > Did these get missed in the new code? I did not see the new HashMap<> calls. Intentionally left out, old was re-initializing for no good reason. There was no point in clear all the maps since we replace the values anyways. Although please make sure you also put it through the scanner. - Sid ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/36587/#review92165 ----------------------------------------------------------- On July 18, 2015, 4:44 a.m., Sid Wagle wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/36587/ > ----------------------------------------------------------- > > (Updated July 18, 2015, 4:44 a.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Mahadev Konar, Myroslav Papirkovskyy, and Sumit Mohanty. > > > Bugs: AMBARI-12453 > https://issues.apache.org/jira/browse/AMBARI-12453 > > > Repository: ambari > > > Description > ------- > > The high level picture seems to be: Requests made from the UI for host metrics trying to figure out the actual metrics service and the code that updates in-memory maps which hold information of where that service is and what ports to use to connect to it etc. These property maps are update by Observers on important events like Cluster/Service/Host CRUD by resetting a volatile variable. > > The contention occurs due the thread that actually enters the monitor protecting the volatile var and asks for another lock on the cluster which is held by some other thread which also needs a value from the in-memory maps and waits on the object monitor that it cannot enter. > > Note: Web based deployments get away because not a lot of CRUD ops happen in parallel to Reads like the use case of monitoring the Blueprint deploy as the cluster is being provisioned. > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java 380a0fe > > Diff: https://reviews.apache.org/r/36587/diff/ > > > Testing > ------- > > All unit test passed. > > > Thanks, > > Sid Wagle > > --===============0617864330857704719==--