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 B8576189C8 for ; Sat, 6 Jun 2015 01:03:51 +0000 (UTC) Received: (qmail 71056 invoked by uid 500); 6 Jun 2015 01:03:51 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 71022 invoked by uid 500); 6 Jun 2015 01:03:51 -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 71003 invoked by uid 99); 6 Jun 2015 01:03:51 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Jun 2015 01:03:51 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 9378C1DF70D; Sat, 6 Jun 2015 01:03:50 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2508716141120389681==" MIME-Version: 1.0 Subject: Re: Review Request 35167: Ambari Server deadlocks when adding service / adding host From: "Jonathan Hurley" To: "Yusaku Sako" , "Mahadev Konar" , "Myroslav Papirkovskyy" , "Jonathan Hurley" Cc: "Sid Wagle" , "Ambari" Date: Sat, 06 Jun 2015 01:03:50 -0000 Message-ID: <20150606010350.7996.15572@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Jonathan Hurley" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/35167/ X-Sender: "Jonathan Hurley" References: <20150606002844.7996.91156@reviews.apache.org> In-Reply-To: <20150606002844.7996.91156@reviews.apache.org> Reply-To: "Jonathan Hurley" X-ReviewRequest-Repository: ambari --===============2508716141120389681== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35167/#review86886 ----------------------------------------------------------- ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java See pattern from ServiceComponentHostImpl.persist(); there's no need to lock on the cluster unless there is work to do. This actually can cause a deadlock when persisting already persisted entries. ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java if the local unlock() fails, then the cluster lock will never get unlocked. ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java If the unlock() fails, then the cluster unlock() will never get called ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java The cluster global lock is not necessary here since no cluster data is being read. - Jonathan Hurley On June 5, 2015, 8:28 p.m., Sid Wagle wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35167/ > ----------------------------------------------------------- > > (Updated June 5, 2015, 8:28 p.m.) > > > Review request for Ambari, Jonathan Hurley, Mahadev Konar, Myroslav Papirkovskyy, and Yusaku Sako. > > > Bugs: AMBARI-11744 > https://issues.apache.org/jira/browse/AMBARI-11744 > > > Repository: ambari > > > Description > ------- > > This was observed while adding Ganglia to an existing cluster via Add Services Wizard. > It hung after clicking Deploy at task 2 / 6. > Browser tools showed that it was doing a PUT and this call timed out after 3 mins. > All subsequent API calls hung. Ambari Server was not responsive at all to any API calls after that. > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java 3fcb84b > ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java 9ec0370 > > Diff: https://reviews.apache.org/r/35167/diff/ > > > Testing > ------- > > Verified manually. > > > Thanks, > > Sid Wagle > > --===============2508716141120389681==--