[
https://issues.apache.org/jira/browse/AMQ-6157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15132333#comment-15132333
]
Erik commented on AMQ-6157:
---------------------------
Attached by ActiveMQ configuration and full dump from jstack
> 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)