Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 4175 invoked from network); 17 Aug 2010 14:37:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Aug 2010 14:37:12 -0000 Received: (qmail 5285 invoked by uid 500); 17 Aug 2010 14:37:12 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 5154 invoked by uid 500); 17 Aug 2010 14:37:11 -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 5145 invoked by uid 99); 17 Aug 2010 14:37:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Aug 2010 14:37:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Aug 2010 14:37:09 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7HEam8E001873 for ; Tue, 17 Aug 2010 14:36:49 GMT Message-ID: <15550682.8231282055808781.JavaMail.jira@thor> Date: Tue, 17 Aug 2010 10:36:48 -0400 (EDT) From: "Anish Khanzode (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQ-2798) Occaional hangs on ensureConnectionInfoSent In-Reply-To: <7237352.24401277448591849.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61232#action_61232 ] Anish Khanzode commented on AMQ-2798: ------------------------------------- I can reproduce this issue. I am using Master/Slave configuration with Master set to waitForSlave="true" Start Master and then start consumer. Consumer hangs at ensureConnectionInfoSent() does not matter if I am using shared or unshared connection. I added a property syncResponseTimeout in factory and connection and wired it in. Changed syncSendPacket to use timeout and I dont get hung consumer. I am going to attach a patch. > Occaional hangs on ensureConnectionInfoSent > ------------------------------------------- > > Key: AMQ-2798 > URL: https://issues.apache.org/activemq/browse/AMQ-2798 > Project: ActiveMQ > Issue Type: Bug > Components: JMS client > Affects Versions: 5.3.2 > Reporter: Mark Chaimungkalanont > > When connecting to the broker, the client occasionally starts to hang. A thread dump reveals: > {noformat} > "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30] > at sun.misc.Unsafe.park(Native Method) > at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118) > at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767) > at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341) > at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40) > at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80) > at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233) > at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339) > - locked <0x10b9bdf8> (a java.lang.Object) > at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298) > at org.jencks.amqpool.SessionPool.createSession(SessionPool.java:110) > at org.jencks.amqpool.SessionPool.makeObject(SessionPool.java:78) > at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974) > at org.jencks.amqpool.SessionPool.borrowSession(SessionPool.java:53) > at org.jencks.amqpool.ConnectionPool.createSession(ConnectionPool.java:89) > at org.jencks.amqpool.XaConnectionPool.createSession(XaConnectionPool.java:51) > at org.jencks.amqpool.PooledConnection.createSession(PooledConnection.java:132) > at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:200) > {noformat} > Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method: > {code} > public Response syncSendPacket(Command command) throws JMSException { > {code} > which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout. > {code} > public Response syncSendPacket(Command command, int timeout) throws JMSException { > {code} > should / can ensureConnectionInfoSent use the one with the timeout instead? > We're using the failover transport: > failover:(tcp://:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.