Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-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 2AB636C79 for ; Tue, 7 Jun 2011 11:32:23 +0000 (UTC) Received: (qmail 61820 invoked by uid 500); 7 Jun 2011 11:32:23 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 61786 invoked by uid 500); 7 Jun 2011 11:32:22 -0000 Mailing-List: contact dev-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 dev@activemq.apache.org Received: (qmail 61778 invoked by uid 99); 7 Jun 2011 11:32:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 11:32:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 11:32:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E99EA9753D for ; Tue, 7 Jun 2011 11:31:58 +0000 (UTC) Date: Tue, 7 Jun 2011 11:31:58 +0000 (UTC) From: "Hiram Chirino (JIRA)" To: dev@activemq.apache.org Message-ID: <1171471740.124.1307446318953.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1076310997.571.1307370898987.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (AMQ-3358) ActiveMQ JMXConnectorFactory is not calling close causing thousands of threads to be created 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/AMQ-3358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045375#comment-13045375 ] Hiram Chirino commented on AMQ-3358: ------------------------------------ Just based on the provided stack trace it looks like it's a bug in the JVM. The JVM provides the JMX connection handling implementation. The ActiveMQ ManagementContext is just registering objects in the JVM's JMX server implementation and that does not use any connections at all. > ActiveMQ JMXConnectorFactory is not calling close causing thousands of threads to be created > -------------------------------------------------------------------------------------------- > > Key: AMQ-3358 > URL: https://issues.apache.org/jira/browse/AMQ-3358 > Project: ActiveMQ > Issue Type: Bug > Components: JMX > Affects Versions: 5.5.0 > Environment: Occurs on RHEL 5 and Mac OS > Reporter: Reid Morrison > Assignee: Dejan Bosanac > > We have run into a problem in production where our ActiveMQ 5.5 Broker eventually uses thousands of threads. Doing a thread stack dump we have thousands of the following entries: > "JMX server connection timeout 127937" daemon prio=10 tid=0x000000001c215000 nid=0x1734 in Object.wait() [0x00002aabd7c97000] > java.lang.Thread.State: TIMED_WAITING (on object monitor) > at java.lang.Object.wait(Native Method) > at com.sun.jmx.remote.internal.ServerCommunicatorAdmin$Timeout.run(ServerCommunicatorAdmin.java:150) > - locked <0x00002b74ffe91938> (a [I) > at java.lang.Thread.run(Thread.java:619) > We are using Hyperic HQ to monitor ActiveMQ remotely over JMX. > To reproduce the problem in a stand-alone environment (without needing Hyperic) : > 1. Start ActiveMQ 5.5 Broker > 2. Connect to ActiveMQ using JConsole and then disconnect > 3. Force a thread dump on the ActiveMQ broker process as follows: > kill -QUIT > 4. After every JConsole connection to the Broker process the following additional thread is created: > "JMX server connection timeout 128" daemon prio=5 tid=1030bd000 nid=0x1108f8000 in Object.wait() [1108f7000] > Under ActiveMQ 5.4.2-Fuse-03-09 we do not see this issue. Is there an existing patch somewhere that has just not been applied to 5.5? > Someone else with the same issue: > http://web.archiveorange.com/archive/v/hXOgqMGA78WNhT5lpmKX > We found more info on closing the JMX connection: > http://forums.oracle.com/forums/thread.jspa?threadID=1665966&tstart=0 > We are willing to make and submit a patch with a little guidance on where we should call the close() on JMXConnectorFactory. > It appears the source file where the change should be made is: > activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java > Any help is appreciated. > Thank you, > Reid -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira