Return-Path: X-Original-To: apmail-curator-dev-archive@minotaur.apache.org Delivered-To: apmail-curator-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8D60710227 for ; Thu, 27 Jun 2013 19:28:44 +0000 (UTC) Received: (qmail 8791 invoked by uid 500); 27 Jun 2013 19:28:44 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 8753 invoked by uid 500); 27 Jun 2013 19:28:44 -0000 Mailing-List: contact dev-help@curator.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.incubator.apache.org Delivered-To: mailing list dev@curator.incubator.apache.org Received: (qmail 8745 invoked by uid 99); 27 Jun 2013 19:28:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jun 2013 19:28:44 +0000 X-ASF-Spam-Status: No, hits=-2001.1 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 27 Jun 2013 19:28:41 +0000 Received: (qmail 7357 invoked by uid 99); 27 Jun 2013 19:28:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jun 2013 19:28:20 +0000 Date: Thu, 27 Jun 2013 19:28:19 +0000 (UTC) From: "Shevek (JIRA)" To: dev@curator.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CURATOR-45) LeaderSelector threw exception, but still created ephemeral node, breaking everything MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CURATOR-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13694974#comment-13694974 ] Shevek commented on CURATOR-45: ------------------------------- The extra doDelete flag cleans up messes from LockInternals.internalLockLoop() but does not clean up if the initial attemptLock() fails. It may be a false assumption in curator that ZooKeeper either succeeds OR throws an exception. In this case, ZooKeeper did both, leaving the client in some doubt about the server's state. > LeaderSelector threw exception, but still created ephemeral node, breaking everything > ------------------------------------------------------------------------------------- > > Key: CURATOR-45 > URL: https://issues.apache.org/jira/browse/CURATOR-45 > Project: Apache Curator > Issue Type: Bug > Reporter: Shevek > Assignee: Jordan Zimmerman > > ZooKeeper hiccupped, and then this happened: > 2013-06-19 02:23:35,561 DEBUG [LeaderSelector-1] com.netflix.curator.RetryLoop.takeException (RetryLoop.java:184) - Retry-able exception received > org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /[REMOVED]/election/_c_1ccdb2b9-7f9a-4570-9555-201c91ec2dcb-lock- > at org.apache.zookeeper.KeeperException.create(KeeperException.java:99) ~[zookeeper-3.5.0.jar:3.5.0--1] > at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) ~[zookeeper-3.5.0.jar:3.5.0--1] > at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:876) ~[zookeeper-3.5.0.jar:3.5.0--1] > at com.netflix.curator.framework.imps.CreateBuilderImpl$10.call(CreateBuilderImpl.java:625) ~[curator-framework-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.framework.imps.CreateBuilderImpl$10.call(CreateBuilderImpl.java:609) ~[curator-framework-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.RetryLoop.callWithRetry(RetryLoop.java:106) [curator-client-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:605) [curator-framework-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:428) [curator-framework-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:41) [curator-framework-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:218) [curator-recipes-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:218) [curator-recipes-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:74) [curator-recipes-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.framework.recipes.leader.LeaderSelector.doWork(LeaderSelector.java:314) [curator-recipes-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.framework.recipes.leader.LeaderSelector.doWorkLoop(LeaderSelector.java:373) [curator-recipes-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.framework.recipes.leader.LeaderSelector.access$100(LeaderSelector.java:46) [curator-recipes-1.3.5-SNAPSHOT.jar:?] > at com.netflix.curator.framework.recipes.leader.LeaderSelector$2.call(LeaderSelector.java:195) [curator-recipes-1.3.5-SNAPSHOT.jar:?] > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [?:1.6.0_27] > at java.util.concurrent.FutureTask.run(FutureTask.java:166) [?:1.6.0_27] > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) [?:1.6.0_27] > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.6.0_27] > at java.lang.Thread.run(Thread.java:679) [?:1.6.0_27] > However, the ephemeral node got created, and this hung leader election for this path. > I'm investigating to work out where to put an extra guaranteed-delete. I see the case in LockInternals, which sometimes triggers to do this cleanup, but it didn't trigger in this case. > You must really love our bugs by now. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira