activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Fisher-Ogden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-465) deadlock when using VM transport and Jencks...
Date Tue, 14 Nov 2006 21:00:02 GMT
    [ https://issues.apache.org/activemq/browse/AMQ-465?page=comments#action_37452 ] 
            
Philip Fisher-Ogden commented on AMQ-465:
-----------------------------------------

I'm still getting deadlock (in a similar spot as the original poster) even though I'm running
ActiveMQ version 4.0.1 (on Linux, using Sun's JVM 1.5.0_04-b05).  Below is the deadlock that
occurs between the Jencks consumer and the message producer.

h4. Configuration
For reference, here are parts of my ActiveMQ broker and the Jencks configurations:
   * broker (named "my-broker")
   {code} <transportConnectors> <transportConnector uri="vm://localhost?jms.dispatchAsync=true"/>
</transportConnectors>
   {code}
   * Jencks connection factory
   {code}<bean id="jmsFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
		<property name="connectionFactory">
			<bean class="org.apache.activemq.ActiveMQConnectionFactory">
				<property name="brokerURL" value ="vm://my-broker"/>
				<property name="asyncDispatch" value="true"/>
		    </bean>
		</property>
	</bean>
   {code}

h4. Deadlock information
{code}
Found one Java-level deadlock:
=============================
"Thread-76":
  waiting to lock monitor 0x085e13ac (object 0x53a665c8, a org.apache.activemq.broker.region.QueueSubscription),
  which is held by "http-8080-Processor18"
"http-8080-Processor18":
  waiting to lock monitor 0x085e132c (object 0x538216d8, a java.lang.Object),
  which is held by "Thread-76"

Java stack information for the threads listed above:
===================================================
"Thread-76":
        at org.apache.activemq.broker.region.PrefetchSubscription$1.afterCommit(PrefetchSubscription.java:113)
        - waiting to lock <0x53a665c8> (a org.apache.activemq.broker.region.QueueSubscription)
        at org.apache.activemq.transaction.Transaction.fireAfterCommit(Transaction.java:82)
        at org.apache.activemq.transaction.LocalTransaction.commit(LocalTransaction.java:70)
        at org.apache.activemq.broker.TransactionBroker.commitTransaction(TransactionBroker.java:153)
        at org.apache.activemq.broker.BrokerFilter.commitTransaction(BrokerFilter.java:81)
        at org.apache.activemq.broker.BrokerFilter.commitTransaction(BrokerFilter.java:81)
        at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(MutableBrokerFilter.java:94)
        at org.apache.activemq.broker.AbstractConnection.processCommitTransactionOnePhase(AbstractConnection.java:302)
        at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:98)
        at org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
        at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:76)
        at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:44)
        - locked <0x538216d8> (a java.lang.Object)
        at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:68)
        at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:73)
        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1112)
        at org.apache.activemq.TransactionContext.commit(TransactionContext.java:259)
        at org.apache.activemq.ra.LocalAndXATransaction.commit(LocalAndXATransaction.java:57)
        at org.jencks.LocalTransactionEndpoint.afterDelivery(LocalTransactionEndpoint.java:52)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.afterDelivery(MessageEndpointProxy.java:125)
        at org.apache.activemq.ra.MessageEndpointProxy.afterDelivery(MessageEndpointProxy.java:64)
        at org.apache.activemq.ra.ServerSessionImpl.afterDelivery(ServerSessionImpl.java:214)
        at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:751)
        at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
        - locked <0x53496de0> (a org.apache.activemq.ra.ServerSessionImpl)
        at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)

"http-8080-Processor18":
        at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:44)
        - waiting to lock <0x538216d8> (a java.lang.Object)
        at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
        at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1092)
        at org.apache.activemq.ActiveMQSession.<init>(ActiveMQSession.java:227)
        at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:274)
        at org.apache.activemq.ra.ServerSessionPoolImpl.createServerSessionImpl(ServerSessionPoolImpl.java:60)
        at org.apache.activemq.ra.ServerSessionPoolImpl.getServerSession(ServerSessionPoolImpl.java:113)
        - locked <0x537f1868> (a org.apache.activemq.ra.ServerSessionPoolImpl)
        at org.apache.activemq.ActiveMQConnectionConsumer.dispatch(ActiveMQConnectionConsumer.java:135)
        at org.apache.activemq.ActiveMQConnection.onCommand(ActiveMQConnection.java:1403)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
        at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:76)
        at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:44)
        - locked <0x53821110> (a java.lang.Object)
        at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
        at org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:211)
        at org.apache.activemq.broker.AbstractConnection.processDispatch(AbstractConnection.java:581)
        at org.apache.activemq.broker.AbstractConnection.dispatchSync(AbstractConnection.java:559)
        at org.apache.activemq.broker.region.PrefetchSubscription.dispatch(PrefetchSubscription.java:307)
        at org.apache.activemq.broker.region.QueueSubscription.dispatch(QueueSubscription.java:151)
        at org.apache.activemq.broker.region.PrefetchSubscription.add(PrefetchSubscription.java:64)
        - locked <0x53a665c8> (a org.apache.activemq.broker.region.QueueSubscription)
        at org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy.dispatch(RoundRobinDispatchPolicy.java:53)
        - locked <0x53a66208> (a edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList)
        at org.apache.activemq.broker.region.Queue.dispatch(Queue.java:462)
        at org.apache.activemq.broker.region.Queue.send(Queue.java:265)
        at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:225)
        at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:342)
        at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:192)
        at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:113)
        at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:97)
        at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:126)
        at org.apache.activemq.broker.AbstractConnection.processMessage(AbstractConnection.java:351)
        at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:590)
        at org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
        at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:76)
        at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:44)
        - locked <0x537e8a38> (a java.lang.Object)
        at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:68)
        at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:73)
        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1112)
        at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1555)
        at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:462)
        at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:74)
        - locked <0x53e94f88> (a org.apache.activemq.ActiveMQMessageProducer)
        at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:63)
        at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:587)
        at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:572)
        at org.springframework.jms.core.JmsTemplate$3.doInJms(JmsTemplate.java:557)
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:504)
        at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:554)
        at a.b.c.d.e.f(e.java:123)
        at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)
{code}

> deadlock when using VM transport and Jencks...
> ----------------------------------------------
>
>                 Key: AMQ-465
>                 URL: https://issues.apache.org/activemq/browse/AMQ-465
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 4.0 M4
>            Reporter: james strachan
>         Assigned To: Hiram Chirino
>             Fix For: 4.0 RC2
>
>
> Background here: http://forums.logicblaze.com/posts/list/146.page
> It seems to be VM protocol specific

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message