qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Ritchie <ritch...@apache.org>
Subject Re: Deadlock in java client close
Date Tue, 16 Jun 2009 08:30:04 GMT
2009/6/16 Andrew Wright <atwright@mac.com>:
> Hi all,
>
> Unfortunately we've hit a deadlock in the Java client, stack trace below.
> The connection string we're using looks like this:
>
> property.amqp.connection.url =
> amqp://guest:guest@clientid/test?brokerlist='tcp://amqf001:5672?connectdelay='5000',retries='2';tcp://amqf002:5672?connectdelay='5000',retries='2'',maxprefetch='1',failover='roundrobin?cyclecount='99999''
>
> We're using shared connection factories in a Spring context. I'm wondering
> if a quick workaround may be to run individual factories?
>
> Cheers,
> Andrew
>
>
> Circular (deadlocked) lock chains
> =================================
> Chain 6:
> "hierarchyBuildCacheListenerContainer1-1" id=262140 idx=0x34c tid=13555
> waiting for java/lang/Object@0xf1e9d58 held by:
> "[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default
> (self-tuning)'" id=246 idx=0x3c8 tid=26015 waiting for
> java/lang/Object@0xf1ea030 held by:
> "hierarchyBuildCacheListenerContainer1-1" id=262140 idx=0x34c tid=13555
>
>
> "[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default
> (self-tuning)'" id=246 idx=0x3c8 tid=26015 prio=5 alive, in native, blocked,
> daemon
>    -- Blocked trying to get lock: java/lang/Object@0xf1ea030[thin lock]
>    at jrockit/vm/Threads.sleep(I)V(Native Method)
>    at jrockit/vm/Locks.waitForThinRelease(Locks.java:1208)[optimized]
>    at
> jrockit/vm/Locks.monitorEnterSecondStageHard(Locks.java:1341)[optimized]
>    at jrockit/vm/Locks.monitorEnterSecondStage(Locks.java:1258)[optimized]
>    at jrockit/vm/Locks.monitorEnter(Locks.java:2455)[optimized]
>    at org/apache/qpid/client/AMQConnection.doClose(AMQConnection.java:1002)
>    ^-- Holding lock: java/lang/Object@0xf1ea038[recursive]
>    at org/apache/qpid/client/AMQConnection.doClose(AMQConnection.java:997)
>    ^-- Holding lock: java/lang/Object@0xf1e9d58[thin lock]
>    ^-- Holding lock: java/lang/Object@0xf1ea038[thin lock]
>    at org/apache/qpid/client/AMQConnection.close(AMQConnection.java:981)
>    at org/apache/qpid/client/AMQConnection.close(AMQConnection.java:972)
>    at org/apache/qpid/client/AMQConnection.close(AMQConnection.java:967)
>    at
> org/springframework/jms/connection/SingleConnectionFactory.closeConnection(SingleConnectionFactory.java:427)
>    at
> org/springframework/jms/connection/SingleConnectionFactory.resetConnection(SingleConnectionFactory.java:322)
>    ^-- Holding lock: java/lang/Object@0x13389dd8[thin lock]
>
> "hierarchyBuildCacheListenerContainer1-1" id=262140 idx=0x34c tid=13555
> prio=5 alive, in native, blocked
>    -- Blocked trying to get lock: java/lang/Object@0xf1e9d58[thin lock]
>    at jrockit/vm/Threads.sleep(I)V(Native Method)
>    at jrockit/vm/Locks.waitForThinRelease(Locks.java:1208)[optimized]
>    at
> jrockit/vm/Locks.monitorEnterSecondStageHard(Locks.java:1341)[optimized]
>    at jrockit/vm/Locks.monitorEnterSecondStage(Locks.java:1258)[optimized]
>    at jrockit/vm/Locks.monitorEnter(Locks.java:2455)[optimized]
>    at org/apache/qpid/client/AMQSession.close(AMQSession.java:642)
>    ^-- Holding lock: java/lang/Object@0xf1ea030[thin lock]
>    at org/apache/qpid/client/AMQSession.close(AMQSession.java:489)
>    at
> org/springframework/jms/connection/CachingConnectionFactory$CachedSessionInvocationHandler.physicalClose(CachingConnectionFactory.java:425)
>    at
> org/springframework/jms/connection/CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:305)
>    at $Proxy132.close()V(Unknown Source)
>    at
> org/springframework/jms/support/JmsUtils.closeSession(JmsUtils.java:108)
>    at
> org/springframework/jms/listener/DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1020)
>    ^-- Holding lock: java/lang/Object@0x13389a68[thin lock]
>    at
> org/springframework/jms/listener/DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:927)
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org

What version of the client code are you using? Prior to Qpid 0.5 there
was a race condition in the session close logic:

https://issues.apache.org/jira/browse/QPID-1779

Regards
Martin

-- 
Martin Ritchie

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message