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 BC951200CFC for ; Thu, 28 Sep 2017 21:52:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BADD11609CD; Thu, 28 Sep 2017 19:52:10 +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 0A4891609B4 for ; Thu, 28 Sep 2017 21:52:09 +0200 (CEST) Received: (qmail 6278 invoked by uid 500); 28 Sep 2017 19:52:04 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 6064 invoked by uid 99); 28 Sep 2017 19:52:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Sep 2017 19:52:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 9EA741A3C3E for ; Thu, 28 Sep 2017 19:52:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id XfHN3FwTisc1 for ; Thu, 28 Sep 2017 19:52:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 567A060D9C for ; Thu, 28 Sep 2017 19:52:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 08AB0E059C for ; Thu, 28 Sep 2017 19:52:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4A12524296 for ; Thu, 28 Sep 2017 19:52:00 +0000 (UTC) Date: Thu, 28 Sep 2017 19:52:00 +0000 (UTC) From: "Barry Oglesby (JIRA)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (GEODE-3718) The InternalResourceManager fails to shutdown if a redundancy recovery task is scheduled but hasn't fired yet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 28 Sep 2017 19:52:10 -0000 Barry Oglesby created GEODE-3718: ------------------------------------ Summary: The InternalResourceManager fails to shutdown if a redundancy recovery task is scheduled but hasn't fired yet Key: GEODE-3718 URL: https://issues.apache.org/jira/browse/GEODE-3718 Project: Geode Issue Type: Bug Components: core Reporter: Barry Oglesby This happens with recovery-delay or startup-recovery-delay > 0. The thread gets stuck here: {noformat} "Thread-20" #133 prio=10 os_prio=31 tid=0x00007fa85b886000 nid=0x890b waiting on condition [0x000070001269e000] java.lang.Thread.State: TIMED_WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000007bc408900> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) at java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1465) at org.apache.geode.internal.cache.control.InternalResourceManager.stopExecutor(InternalResourceManager.java:375) at org.apache.geode.internal.cache.control.InternalResourceManager.close(InternalResourceManager.java:187) at org.apache.geode.internal.cache.GemFireCacheImpl.close(GemFireCacheImpl.java:2161) - locked <0x00000007bc0bc520> (a java.lang.Class for org.apache.geode.internal.cache.GemFireCacheImpl) at org.apache.geode.distributed.internal.InternalDistributedSystem.disconnect(InternalDistributedSystem.java:1367) - locked <0x00000007bc0bc520> (a java.lang.Class for org.apache.geode.internal.cache.GemFireCacheImpl) at org.apache.geode.distributed.internal.InternalDistributedSystem.disconnect(InternalDistributedSystem.java:1017) at org.apache.geode.management.internal.beans.MemberMBeanBridge$1.run(MemberMBeanBridge.java:986) at java.lang.Thread.run(Thread.java:745) {noformat} The InternalResourceManager is waiting for the termination of its scheduledExecutor. The PRHARedundancyProvider initializes its recoveryExecutor using the InternalResourceManager's scheduledExecutor: {noformat} recoveryExecutor = new OneTaskOnlyExecutor(resourceManager.getExecutor(), new OneTaskOnlyExecutor.ConflatedTaskListener() { public void taskDropped() { InternalResourceManager.getResourceObserver().recoveryConflated(region); } }); {noformat} The scheduleRedundancyRecovery method schedules a RecoveryRunnable if necessary. If that task hasn't fired yet, the InternalResourceManager doesn't close, and the JVM stays up. -- This message was sent by Atlassian JIRA (v6.4.14#64029)