Return-Path: X-Original-To: apmail-activemq-issues-archive@minotaur.apache.org Delivered-To: apmail-activemq-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1D3E718FE3 for ; Fri, 5 Feb 2016 00:18:40 +0000 (UTC) Received: (qmail 86360 invoked by uid 500); 5 Feb 2016 00:18:40 -0000 Delivered-To: apmail-activemq-issues-archive@activemq.apache.org Received: (qmail 86320 invoked by uid 500); 5 Feb 2016 00:18:40 -0000 Mailing-List: contact issues-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list issues@activemq.apache.org Received: (qmail 86276 invoked by uid 99); 5 Feb 2016 00:18:39 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Feb 2016 00:18:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CB6422C14F0 for ; Fri, 5 Feb 2016 00:18:39 +0000 (UTC) Date: Fri, 5 Feb 2016 00:18:39 +0000 (UTC) From: "Timothy Bish (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMQ-6157) Thread leak when failover fails to connect at startup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-6157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15133392#comment-15133392 ] Timothy Bish commented on AMQ-6157: ----------------------------------- I did some trivial testing and cannot reproduce this using the latest codebase, try moving from 5.10.0 to something more current and see how it goes. If you can create a JUnit test that reproduces that problem I'm happy to look into it more. > Thread leak when failover fails to connect at startup > ----------------------------------------------------- > > Key: AMQ-6157 > URL: https://issues.apache.org/jira/browse/AMQ-6157 > Project: ActiveMQ > Issue Type: Bug > Environment: Tomee plus 1.7.2 which includes ActiveMQ 5.10.0 > Linux tomee 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:11:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux > java version "1.8.0_66" > Java(TM) SE Runtime Environment (build 1.8.0_66-b17) > Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) > Reporter: Erik > Attachments: broker-config.xml, jstack.txt, tomee.xml > > > I have configured several brokers and sometimes one of them is not available when the application server is started. > When left running the amount of threads slowly builds up, depending how often reconnect fails, and consumes more and more memory > To reproduce I have deliberately configured failover with a host that is not reachable > {code} > failover:(tcp://host.not.found:1234?keepAlive=true&wireFormat.maxInactivityDuration=0&daemon=true)?maxReconnectAttempts=2&startupMaxReconnectAttempts=1) > {code} > When I start Tomee, AMQ is not able to connect as expected > {code} > Feb 04, 2016 1:13:27 PM org.apache.activemq.transport.failover.FailoverTransport doReconnect > SEVERE: Failed to connect to [tcp://host.not.found:6523?keepAlive=true&wireFormat.maxInactivityDuration=0&daemon=true] after: 1 attempt(s) > {code} > For each reconnect attempt a new thread is created and left waiting for a lock. These threads seem to wait indefinately > {code} > "ActiveMQ Connection Executor: unconnected" #75 daemon prio=5 os_prio=0 tid=0x00007f083c040000 nid=0xfaa waiting on condition [0x00007f0824fc1000] > java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0x00000000c080aa78> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) > at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) > at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) > at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) > at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)