You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Dennis Cheung <hk...@gmail.com> on 2007/04/02 15:22:18 UTC

Re: Deadlock in MutexTransport

Hi,

I have similar deadlock issue on MutexTransport.
The transport thread having deadlock with another thread which is doing the
Consumer.close()

Any one can give advise to me?
thanks

On 10/26/06, kristoffer <st...@gmail.com> wrote:
>
>
> Hi,
>
> Im speculating here: is it because the persistent flag is set to false why
> i
> loose all these messages? What is this flags relation to the durable topic
> setting in JMS? As i said in the last post, i get this deadlock if i set
> the
> persistent flag to true. So how to solve this?
>
> I also find it strange that Jencks only uses two threads to process the
> messages?
>
> Another small thing is noticed (not related to this) is that lingo 1.2.1has
> an annoying printout at org.logicblaze.lingo.util.DefaultTimeoutMap line
> 128: System.out.println("Evicting inactive request for correlationID: " +
> entry);
>
> regards,
> -Kristoffer
>
>
> kristoffer wrote:
> >
> > Hi,
> >
> > Thanks for the reply. I did work when i set this URI on the broker
> >
> vm://localhost?marshal=true&broker.useJmx=false&broker.persistent=false&jms.useAsyncSend=true
> >
> > There seem to be some relation to the persistent flag=false, because if
> I
> > remove it, I see the deadlock again?
> >
> > But (with no deadlock), I loose something like 3/5 of messages? And
> there
> > seems to be only two(?) active consumer threads for the topic, even
> though
> > i have assigned 25 threads to the JCA workmanager:
> >
> > <beans>
> >   <bean id="propertyConfigurer"
> > class="
> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> >     <property name="location" value="classpath:global.properties"/>
> >   </bean>
> >
> >   <bean id="consumer" class="org.logicblaze.lingo.jms.JmsServiceExporter
> ">
> >     <property name="service" ref="consumerImpl" />
> >     <property name="serviceInterface"
> > value="se.ericsson.consumer.service.ConsumerService" />
> >     <property name="connectionFactory" ref="jmsFactory" />
> >   </bean>
> >
> >   <bean id="consumerImpl"
> > class="se.ericsson.consumer.impl.ConsumerServiceImpl" singleton="true"
> />
> >
> >   <bean id="jencks" class="org.jencks.JCAContainer">
> >     <property name="bootstrapContext">
> >       <bean class="org.jencks.factory.BootstrapContextFactoryBean">
> >         <property name="threadPoolSize" value="25" />
> >       </bean>
> >     </property>
> >     <property name="resourceAdapter">
> >       <bean id="activeMQResourceAdapter"
> > class="org.apache.activemq.ra.ActiveMQResourceAdapter">
> >         <property name="serverUrl" value="${activemq.brokers}" />
> >       </bean>
> >     </property>
> >   </bean>
> >
> >   <bean id="inboundMessageA" class="org.jencks.JCAConnector">
> >     <property name="jcaContainer" ref="jencks" />
> >     <property name="activationSpec">
> >       <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
> >         <property name="destination" value="ericsson.ConsumerTopic" />
> >         <property name="destinationType" value="javax.jms.Topic" />
> >         <property name="messageSelector" value="EricssonHeader =
> > 'bonka'"/>
> >       </bean>
> >     </property>
> >     <property name="ref" value="consumer" />
> >   </bean>
> >
> >   <bean id="jmsFactory"
> > class="org.apache.activemq.ActiveMQConnectionFactory">
> >     <property name="brokerURL" value="${activemq.brokers}" />
> >   </bean>
> > </bean>
> >
> > Is there some throttling policy which just drops messages if it is
> > overheated? (i applied quite some load)
> >
> > regards,
> > -Kristoffer
> >
> >
> > Hiram Chirino wrote:
> >>
> >> Please enable async dispatch on your connections.. something like:
> >>
> >> vm://localhost?jms.dispatchAsync=true
> >>
> >>
> >> On 10/22/06, kristoffer <st...@gmail.com> wrote:
> >>>
> >>>
> >>> Hi,
> >>>
> >>> I have got an deadlock situation in MutexTransport. The usecase is
> that
> >>> I
> >>> have a broker, producer and consumer all deployed in separate WARs and
> >>> the
> >>> communicate over vm:// transport. I have a servelt which creates the
> >>> producer which produces two messages to the same topic, but with
> >>> different
> >>> message selectors for two consumers. I maybe should mention that i
> have
> >>> a
> >>> lingo, jencks, spring combo setup...
> >>>
> >>> Here's the threaddump from the deadlock
> >>>
> >>> Found one Java-level deadlock:
> >>> =============================
> >>> "Thread-44":
> >>>   waiting to lock monitor 0x00a6b29c (object 0x234e2f48, a
> >>> java.lang.Object),
> >>>   which is held by "http-8080-Processor21"
> >>> "http-8080-Processor21":
> >>>   waiting to lock monitor 0x00a6afbc (object 0x23508c88, a
> >>> java.lang.Object),
> >>>   which is held by "Thread-44"
> >>>
> >>> Java stack information for the threads listed above:
> >>> ===================================================
> >>> "Thread-44":
> >>>         at
> >>> org.apache.activemq.transport.MutexTransport.oneway(
> MutexTransport.java
> >>> :45)
> >>>         - waiting to lock <0x234e2f48> (a java.lang.Object)
> >>>         at
> >>> org.apache.activemq.transport.ResponseCorrelator.oneway(
> >>> ResponseCorrelator.java:59)
> >>>         at
> >>> org.apache.activemq.broker.TransportConnection.dispatch(
> >>> TransportConnection.java:215)
> >>>         at
> >>> org.apache.activemq.broker.TransportConnection$1.onCommand(
> >>> TransportConnection.java:63)
> >>>         at
> >>> org.apache.activemq.transport.ResponseCorrelator.onCommand(
> >>> ResponseCorrelator.java:92)
> >>>         at
> >>> org.apache.activemq.transport.TransportFilter.onCommand(
> >>> TransportFilter.java:67)
> >>>         at
> >>> org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java
> :77)
> >>>         at
> >>> org.apache.activemq.transport.MarshallingTransportFilter.oneway(
> >>> MarshallingTransportFilter.java:37)
> >>>         at
> >>> org.apache.activemq.transport.MutexTransport.oneway(
> MutexTransport.java
> >>> :45)
> >>>         - locked <0x23508c88> (a java.lang.Object)
> >>>         at
> >>> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(
> >>> ResponseCorrelator.java:67)
> >>>         at
> >>> org.apache.activemq.transport.ResponseCorrelator.request(
> >>> ResponseCorrelator.java:72)
> >>>         at
> >>> org.apache.activemq.ActiveMQConnection.syncSendPacket(
> >>> ActiveMQConnection.java:1115)
> >>>         at
> >>> org.apache.activemq.TransactionContext.commit(TransactionContext.java
> :260)
> >>>         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:130)
> >>>         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
> >>> :752)
> >>>         at
> >>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java
> :163)
> >>>         - locked <0x237b68b0> (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-Processor21":
> >>>         at
> >>> org.apache.activemq.transport.MutexTransport.oneway(
> MutexTransport.java
> >>> :45)
> >>>         - waiting to lock <0x23508c88> (a java.lang.Object)
> >>>         at
> >>> org.apache.activemq.transport.ResponseCorrelator.oneway(
> >>> ResponseCorrelator.java:59)
> >>>         at
> >>> org.apache.activemq.ActiveMQConnection.asyncSendPacket(
> >>> ActiveMQConnection.java:1095)
> >>>         at
> >>> org.apache.activemq.ActiveMQSession.<init>(ActiveMQSession.java:228)
> >>>         at
> >>> org.apache.activemq.ActiveMQConnection.createSession(
> >>> ActiveMQConnection.java:275)
> >>>         at
> >>> org.apache.activemq.ra.ServerSessionPoolImpl.createServerSessionImpl(
> >>> ServerSessionPoolImpl.java:60)
> >>>         at
> >>> org.apache.activemq.ra.ServerSessionPoolImpl.getServerSession(
> >>> ServerSessionPoolImpl.java:112)
> >>>         - locked <0x234dc7a0> (a
> >>> org.apache.activemq.ra.ServerSessionPoolImpl)
> >>>         at
> >>> org.apache.activemq.ActiveMQConnectionConsumer.dispatch(
> >>> ActiveMQConnectionConsumer.java:136)
> >>>         at
> >>> org.apache.activemq.ActiveMQConnection.onCommand(
> ActiveMQConnection.java
> >>> :1407)
> >>>         at
> >>> org.apache.activemq.transport.ResponseCorrelator.onCommand(
> >>> ResponseCorrelator.java:92)
> >>>         at
> >>> org.apache.activemq.transport.TransportFilter.onCommand(
> >>> TransportFilter.java:67)
> >>>         at
> >>> org.apache.activemq.transport.MarshallingTransportFilter.onCommand(
> >>> MarshallingTransportFilter.java:42)
> >>>         at
> >>> org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java
> :77)
> >>>         at
> >>> org.apache.activemq.transport.MutexTransport.oneway(
> MutexTransport.java
> >>> :45)
> >>>         - locked <0x234e2f48> (a java.lang.Object)
> >>>         at
> >>> org.apache.activemq.transport.ResponseCorrelator.oneway(
> >>> ResponseCorrelator.java:59)
> >>>         at
> >>> org.apache.activemq.broker.TransportConnection.dispatch(
> >>> TransportConnection.java:215)
> >>>         at
> >>> org.apache.activemq.broker.AbstractConnection.processDispatch(
> >>> AbstractConnection.java:722)
> >>>         at
> >>> org.apache.activemq.broker.AbstractConnection.dispatchSync(
> >>> AbstractConnection.java:699)
> >>>         at
> >>> org.apache.activemq.broker.region.TopicSubscription.dispatch(
> >>> TopicSubscription.java:319)
> >>>         at
> >>> org.apache.activemq.broker.region.TopicSubscription.add(
> >>> TopicSubscription.java:78)
> >>>         at
> >>> org.apache.activemq.broker.region.policy.SimpleDispatchPolicy.dispatch
> (
> >>> SimpleDispatchPolicy.java:51)
> >>>         at org.apache.activemq.broker.region.Topic.dispatch(Topic.java
> >>> :444)
> >>>         at org.apache.activemq.broker.region.Topic.send(Topic.java
> :255)
> >>>         at
> >>> org.apache.activemq.broker.region.AbstractRegion.send(
> AbstractRegion.java
> >>> :226)
> >>>         at
> >>> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java
> :349)
> >>>         at
> >>> org.apache.activemq.broker.TransactionBroker.send(
> TransactionBroker.java
> >>> :193)
> >>>         at
> >>> org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:114)
> >>>         at
> >>> org.apache.activemq.broker.CompositeDestinationBroker.send(
> >>> CompositeDestinationBroker.java:98)
> >>>         at
> >>> org.apache.activemq.broker.MutableBrokerFilter.send(
> >>> MutableBrokerFilter.java:127)
> >>>         at
> >>> org.apache.activemq.broker.AbstractConnection.processMessage(
> >>> AbstractConnection.java:433)
> >>>         at
> >>> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java
> >>> :591)
> >>>         at
> >>> org.apache.activemq.broker.AbstractConnection.service(
> >>> AbstractConnection.java:237)
> >>>         at
> >>> org.apache.activemq.broker.TransportConnection$1.onCommand(
> >>> TransportConnection.java:61)
> >>>         at
> >>> org.apache.activemq.transport.ResponseCorrelator.onCommand(
> >>> ResponseCorrelator.java:92)
> >>>         at
> >>> org.apache.activemq.transport.TransportFilter.onCommand(
> >>> TransportFilter.java:67)
> >>>         at
> >>> org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java
> :77)
> >>>         at
> >>> org.apache.activemq.transport.MarshallingTransportFilter.oneway(
> >>> MarshallingTransportFilter.java:37)
> >>>         at
> >>> org.apache.activemq.transport.MutexTransport.oneway(
> MutexTransport.java
> >>> :45)
> >>>         - locked <0x236fe2d8> (a java.lang.Object)
> >>>         at
> >>> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(
> >>> ResponseCorrelator.java:67)
> >>>         at
> >>> org.apache.activemq.transport.ResponseCorrelator.request(
> >>> ResponseCorrelator.java:72)
> >>>         at
> >>> org.apache.activemq.ActiveMQConnection.syncSendPacket(
> >>> ActiveMQConnection.java:1115)
> >>>         at
> >>> org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1557)
> >>>         at
> >>> org.apache.activemq.ActiveMQMessageProducer.send(
> >>> ActiveMQMessageProducer.java:463)
> >>>         at
> >>> org.logicblaze.lingo.jms.impl.OneWayRequestor.doSend(
> OneWayRequestor.java
> >>> :196)
> >>>         at
> >>> org.logicblaze.lingo.jms.impl.MultiplexingRequestor.doSend(
> >>> MultiplexingRequestor.java:189)
> >>>         - locked <0x236fe448> (a
> >>> org.logicblaze.lingo.jms.impl.MultiplexingRequestor)
> >>>         at
> >>> org.logicblaze.lingo.jms.impl.OneWayRequestor.send(
> OneWayRequestor.java
> >>> :101)
> >>>         at
> >>> org.logicblaze.lingo.jms.impl.OneWayRequestor.send(
> OneWayRequestor.java
> >>> :97)
> >>>         at
> >>> org.logicblaze.lingo.jms.JmsClientInterceptor.invoke(
> >>> JmsClientInterceptor.java:133)
> >>>         at
> >>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> >>> ReflectiveMethodInvocation.java:170)
> >>>         at
> >>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
> >>> JdkDynamicAopProxy.java:176)
> >>>         at $Proxy2.test(Unknown Source)
> >>>         at se.ericsson.producer.LingoServlet.doGet(LingoServlet.java
> :33)
> >>>         - locked <0x231d9c70> (a
> >>> se.ericsson.consumer.service.ConsumerServiceFactory)
> >>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java
> :689)
> >>>         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
> :869)
> >>>         at
> >>>
> >>>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> >>> (Http11BaseProtocol.java:664)
> >>>         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)
> >>>
> >>> Found 1 deadlock.
> >>>
> >>>
> >>> Is my setup incorrect in some way or is this a real problem that i
> >>> found?
> >>>
> >>> Thanks,
> >>> -Kristoffer
> >>> --
> >>> View this message in context:
> >>>
> http://www.nabble.com/Deadlock-in-MutexTransport-tf2490020.html#a6942040
> >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >>
> >> --
> >> Regards,
> >> Hiram
> >>
> >> Blog: http://hiramchirino.com
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Deadlock-in-MutexTransport-tf2490020.html#a7010550
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
----
Dennis

Re: Deadlock in MutexTransport

Posted by Dennis Cheung <hk...@gmail.com>.
Found one Java-level deadlock:

=============================

"ActiveMQ Transport: tcp:///157.168.160.190:4244":

  waiting to lock monitor 0x00a691ec (object 0x11286820, a java.lang.Object
),

  which is held by "pool-2-thread-54"

"pool-2-thread-54":

  waiting to lock monitor 0x00a6930c (object 0x1128bcd8, a java.lang.Object
),

  which is held by "ActiveMQ Transport: tcp:///157.168.160.190:4244"



Java stack information for the threads listed above:

===================================================

"ActiveMQ Transport: tcp:///157.168.160.190:4244":

        at org.apache.activemq.transport.MutexTransport.oneway(
MutexTransport.java:42)

        - waiting to lock <0x11286820> (a java.lang.Object)

        at org.apache.activemq.transport.ResponseCorrelator.oneway(
ResponseCorrelator.java:60)

        at org.apache.activemq.ActiveMQConnection.asyncSendPacket(
ActiveMQConnection.java:1151)

        at org.apache.activemq.ActiveMQSession.asyncSendPacket(
ActiveMQSession.java:1648)

        at
org.apache.activemq.ActiveMQMessageConsumer.afterMessageIsConsumed(
ActiveMQMessageConsumer.java:677)

        at org.apache.activemq.ActiveMQMessageConsumer.dispatch(
ActiveMQMessageConsumer.java:841)

        - locked <0x11ff4660> (a java.lang.Object)

        at org.apache.activemq.ActiveMQSessionExecutor.dispatch(
ActiveMQSessionExecutor.java:96)

        at org.apache.activemq.ActiveMQSessionExecutor.iterate(
ActiveMQSessionExecutor.java:165)

        at org.apache.activemq.ActiveMQSessionExecutor.wakeup(
ActiveMQSessionExecutor.java:73)

        at org.apache.activemq.ActiveMQSessionExecutor.execute(
ActiveMQSessionExecutor.java:60)

        at org.apache.activemq.ActiveMQSession.dispatch(ActiveMQSession.java
:1342)

        at org.apache.activemq.ActiveMQConnection.onCommand(
ActiveMQConnection.java:1473)

        at org.apache.activemq.transport.ResponseCorrelator.onCommand(
ResponseCorrelator.java:95)

        at org.apache.activemq.transport.TransportFilter.onCommand(
TransportFilter.java:65)

        at org.apache.activemq.transport.vm.VMTransport.syncOneWay(
VMTransport.java:96)

        at org.apache.activemq.transport.vm.VMTransport.oneway(
VMTransport.java:83)

        at org.apache.activemq.transport.MutexTransport.oneway(
MutexTransport.java:43)

        - locked <0x1128bcd8> (a java.lang.Object)

        at org.apache.activemq.transport.ResponseCorrelator.oneway(
ResponseCorrelator.java:60)

        at org.apache.activemq.broker.TransportConnection.dispatch(
TransportConnection.java:1051)

        at org.apache.activemq.broker.TransportConnection.processDispatch(
TransportConnection.java:772)

        at org.apache.activemq.broker.TransportConnection.dispatchSync(
TransportConnection.java:749)

        at org.apache.activemq.broker.region.PrefetchSubscription.dispatch(
PrefetchSubscription.java:404)

        at org.apache.activemq.broker.region.QueueSubscription.dispatch(
QueueSubscription.java:172)

        at org.apache.activemq.broker.region.PrefetchSubscription.add(
PrefetchSubscription.java:129)

        - locked <0x11ff48f8> (a
org.apache.activemq.broker.region.QueueSubscription)

        at
org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy.dispatch(
RoundRobinDispatchPolicy.java:54)

        - locked <0x11289c68> (a
edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList)

        at org.apache.activemq.broker.region.Queue.dispatch(Queue.java:472)

        at org.apache.activemq.broker.region.Queue.send(Queue.java:298)

        at org.apache.activemq.broker.region.AbstractRegion.send(
AbstractRegion.java:292)

        at org.apache.activemq.broker.region.RegionBroker.send(
RegionBroker.java:383)

        at org.apache.activemq.broker.TransactionBroker.send(
TransactionBroker.java:193)

        at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java
:126)

        at org.apache.activemq.broker.CompositeDestinationBroker.send(
CompositeDestinationBroker.java:98)

        at org.apache.activemq.broker.MutableBrokerFilter.send(
MutableBrokerFilter.java:136)

        at org.apache.activemq.broker.TransportConnection.processMessage(
TransportConnection.java:480)

        at org.apache.activemq.command.ActiveMQMessage.visit(
ActiveMQMessage.java:604)

        at org.apache.activemq.broker.TransportConnection.service(
TransportConnection.java:284)

        at org.apache.activemq.broker.TransportConnection$1.onCommand(
TransportConnection.java:177)

        at org.apache.activemq.transport.TransportFilter.onCommand(
TransportFilter.java:65)

        at org.apache.activemq.transport.WireFormatNegotiator.onCommand(
WireFormatNegotiator.java:133)

        at org.apache.activemq.transport.InactivityMonitor.onCommand(
InactivityMonitor.java:122)

        at org.apache.activemq.transport.TransportSupport.doConsume(
TransportSupport.java:84)

        at org.apache.activemq.transport.tcp.TcpTransport.run(
TcpTransport.java:137)

        at java.lang.Thread.run(Unknown Source)

"pool-2-thread-54":

        at org.apache.activemq.transport.MutexTransport.oneway(
MutexTransport.java:42)

        - waiting to lock <0x1128bcd8> (a java.lang.Object)

        at org.apache.activemq.transport.ResponseCorrelator.oneway(
ResponseCorrelator.java:60)

        at org.apache.activemq.broker.TransportConnection.dispatch(
TransportConnection.java:1051)

        at org.apache.activemq.broker.TransportConnection$1.onCommand(
TransportConnection.java:179)

        at org.apache.activemq.transport.ResponseCorrelator.onCommand(
ResponseCorrelator.java:95)

        at org.apache.activemq.transport.TransportFilter.onCommand(
TransportFilter.java:65)

        at org.apache.activemq.transport.vm.VMTransport.syncOneWay(
VMTransport.java:96)

        at org.apache.activemq.transport.vm.VMTransport.oneway(
VMTransport.java:83)

        at org.apache.activemq.transport.MutexTransport.oneway(
MutexTransport.java:43)

        - locked <0x11286820> (a java.lang.Object)

        at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(
ResponseCorrelator.java:69)

        at org.apache.activemq.transport.ResponseCorrelator.request(
ResponseCorrelator.java:74)

        at org.apache.activemq.ActiveMQConnection.syncSendPacket(
ActiveMQConnection.java:1171)

        at org.apache.activemq.ActiveMQSession.syncSendPacket(
ActiveMQSession.java:1660)

        at org.apache.activemq.ActiveMQMessageConsumer.close(
ActiveMQMessageConsumer.java:541)

        at xxxxxxxxxxxxxx.JMSUtility.run(JMSUtility.java:183)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)

        at java.lang.Thread.run(Unknown Source)



Found 1 deadlock.


On 4/2/07, James Strachan <ja...@gmail.com> wrote:
>
> Could you post a stack trace?
>
> On 4/2/07, Dennis Cheung <hk...@gmail.com> wrote:
> > Hi,
> >
> > I have similar deadlock issue on MutexTransport.
> > The transport thread having deadlock with another thread which is doing
> the
> > Consumer.close()
> >
> > Any one can give advise to me?
> > thanks
> >
> > On 10/26/06, kristoffer <st...@gmail.com> wrote:
> > >
> > >
> > > Hi,
> > >
> > > Im speculating here: is it because the persistent flag is set to false
> why
> > > i
> > > loose all these messages? What is this flags relation to the durable
> topic
> > > setting in JMS? As i said in the last post, i get this deadlock if i
> set
> > > the
> > > persistent flag to true. So how to solve this?
> > >
> > > I also find it strange that Jencks only uses two threads to process
> the
> > > messages?
> > >
> > > Another small thing is noticed (not related to this) is that lingo
> 1.2.1has
> > > an annoying printout at org.logicblaze.lingo.util.DefaultTimeoutMapline
> > > 128: System.out.println("Evicting inactive request for correlationID:
> " +
> > > entry);
> > >
> > > regards,
> > > -Kristoffer
> > >
> > >
> > > kristoffer wrote:
> > > >
> > > > Hi,
> > > >
> > > > Thanks for the reply. I did work when i set this URI on the broker
> > > >
> > >
> vm://localhost?marshal=true&broker.useJmx=false&broker.persistent=false&jms.useAsyncSend=true
> > > >
> > > > There seem to be some relation to the persistent flag=false, because
> if
> > > I
> > > > remove it, I see the deadlock again?
> > > >
> > > > But (with no deadlock), I loose something like 3/5 of messages? And
> > > there
> > > > seems to be only two(?) active consumer threads for the topic, even
> > > though
> > > > i have assigned 25 threads to the JCA workmanager:
> > > >
> > > > <beans>
> > > >   <bean id="propertyConfigurer"
> > > > class="
> > > org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
> ">
> > > >     <property name="location" value="classpath:global.properties"/>
> > > >   </bean>
> > > >
> > > >   <bean id="consumer" class="
> org.logicblaze.lingo.jms.JmsServiceExporter
> > > ">
> > > >     <property name="service" ref="consumerImpl" />
> > > >     <property name="serviceInterface"
> > > > value="se.ericsson.consumer.service.ConsumerService" />
> > > >     <property name="connectionFactory" ref="jmsFactory" />
> > > >   </bean>
> > > >
> > > >   <bean id="consumerImpl"
> > > > class="se.ericsson.consumer.impl.ConsumerServiceImpl"
> singleton="true"
> > > />
> > > >
> > > >   <bean id="jencks" class="org.jencks.JCAContainer">
> > > >     <property name="bootstrapContext">
> > > >       <bean class="org.jencks.factory.BootstrapContextFactoryBean">
> > > >         <property name="threadPoolSize" value="25" />
> > > >       </bean>
> > > >     </property>
> > > >     <property name="resourceAdapter">
> > > >       <bean id="activeMQResourceAdapter"
> > > > class="org.apache.activemq.ra.ActiveMQResourceAdapter">
> > > >         <property name="serverUrl" value="${activemq.brokers}" />
> > > >       </bean>
> > > >     </property>
> > > >   </bean>
> > > >
> > > >   <bean id="inboundMessageA" class="org.jencks.JCAConnector">
> > > >     <property name="jcaContainer" ref="jencks" />
> > > >     <property name="activationSpec">
> > > >       <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
> > > >         <property name="destination" value="ericsson.ConsumerTopic"
> />
> > > >         <property name="destinationType" value="javax.jms.Topic" />
> > > >         <property name="messageSelector" value="EricssonHeader =
> > > > 'bonka'"/>
> > > >       </bean>
> > > >     </property>
> > > >     <property name="ref" value="consumer" />
> > > >   </bean>
> > > >
> > > >   <bean id="jmsFactory"
> > > > class="org.apache.activemq.ActiveMQConnectionFactory">
> > > >     <property name="brokerURL" value="${activemq.brokers}" />
> > > >   </bean>
> > > > </bean>
> > > >
> > > > Is there some throttling policy which just drops messages if it is
> > > > overheated? (i applied quite some load)
> > > >
> > > > regards,
> > > > -Kristoffer
> > > >
> > > >
> > > > Hiram Chirino wrote:
> > > >>
> > > >> Please enable async dispatch on your connections.. something like:
> > > >>
> > > >> vm://localhost?jms.dispatchAsync=true
> > > >>
> > > >>
> > > >> On 10/22/06, kristoffer <st...@gmail.com> wrote:
> > > >>>
> > > >>>
> > > >>> Hi,
> > > >>>
> > > >>> I have got an deadlock situation in MutexTransport. The usecase is
> > > that
> > > >>> I
> > > >>> have a broker, producer and consumer all deployed in separate WARs
> and
> > > >>> the
> > > >>> communicate over vm:// transport. I have a servelt which creates
> the
> > > >>> producer which produces two messages to the same topic, but with
> > > >>> different
> > > >>> message selectors for two consumers. I maybe should mention that i
> > > have
> > > >>> a
> > > >>> lingo, jencks, spring combo setup...
> > > >>>
> > > >>> Here's the threaddump from the deadlock
> > > >>>
> > > >>> Found one Java-level deadlock:
> > > >>> =============================
> > > >>> "Thread-44":
> > > >>>   waiting to lock monitor 0x00a6b29c (object 0x234e2f48, a
> > > >>> java.lang.Object),
> > > >>>   which is held by "http-8080-Processor21"
> > > >>> "http-8080-Processor21":
> > > >>>   waiting to lock monitor 0x00a6afbc (object 0x23508c88, a
> > > >>> java.lang.Object),
> > > >>>   which is held by "Thread-44"
> > > >>>
> > > >>> Java stack information for the threads listed above:
> > > >>> ===================================================
> > > >>> "Thread-44":
> > > >>>         at
> > > >>> org.apache.activemq.transport.MutexTransport.oneway(
> > > MutexTransport.java
> > > >>> :45)
> > > >>>         - waiting to lock <0x234e2f48> (a java.lang.Object)
> > > >>>         at
> > > >>> org.apache.activemq.transport.ResponseCorrelator.oneway(
> > > >>> ResponseCorrelator.java:59)
> > > >>>         at
> > > >>> org.apache.activemq.broker.TransportConnection.dispatch(
> > > >>> TransportConnection.java:215)
> > > >>>         at
> > > >>> org.apache.activemq.broker.TransportConnection$1.onCommand(
> > > >>> TransportConnection.java:63)
> > > >>>         at
> > > >>> org.apache.activemq.transport.ResponseCorrelator.onCommand(
> > > >>> ResponseCorrelator.java:92)
> > > >>>         at
> > > >>> org.apache.activemq.transport.TransportFilter.onCommand(
> > > >>> TransportFilter.java:67)
> > > >>>         at
> > > >>> org.apache.activemq.transport.vm.VMTransport.oneway(
> VMTransport.java
> > > :77)
> > > >>>         at
> > > >>> org.apache.activemq.transport.MarshallingTransportFilter.oneway(
> > > >>> MarshallingTransportFilter.java:37)
> > > >>>         at
> > > >>> org.apache.activemq.transport.MutexTransport.oneway(
> > > MutexTransport.java
> > > >>> :45)
> > > >>>         - locked <0x23508c88> (a java.lang.Object)
> > > >>>         at
> > > >>> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(
> > > >>> ResponseCorrelator.java:67)
> > > >>>         at
> > > >>> org.apache.activemq.transport.ResponseCorrelator.request(
> > > >>> ResponseCorrelator.java:72)
> > > >>>         at
> > > >>> org.apache.activemq.ActiveMQConnection.syncSendPacket(
> > > >>> ActiveMQConnection.java:1115)
> > > >>>         at
> > > >>> org.apache.activemq.TransactionContext.commit(
> TransactionContext.java
> > > :260)
> > > >>>         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:130)
> > > >>>         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
> > > >>> :752)
> > > >>>         at
> > > >>> org.apache.activemq.ra.ServerSessionImpl.run(
> ServerSessionImpl.java
> > > :163)
> > > >>>         - locked <0x237b68b0> (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-Processor21":
> > > >>>         at
> > > >>> org.apache.activemq.transport.MutexTransport.oneway(
> > > MutexTransport.java
> > > >>> :45)
> > > >>>         - waiting to lock <0x23508c88> (a java.lang.Object)
> > > >>>         at
> > > >>> org.apache.activemq.transport.ResponseCorrelator.oneway(
> > > >>> ResponseCorrelator.java:59)
> > > >>>         at
> > > >>> org.apache.activemq.ActiveMQConnection.asyncSendPacket(
> > > >>> ActiveMQConnection.java:1095)
> > > >>>         at
> > > >>> org.apache.activemq.ActiveMQSession.<init>(ActiveMQSession.java
> :228)
> > > >>>         at
> > > >>> org.apache.activemq.ActiveMQConnection.createSession(
> > > >>> ActiveMQConnection.java:275)
> > > >>>         at
> > > >>>
> org.apache.activemq.ra.ServerSessionPoolImpl.createServerSessionImpl(
> > > >>> ServerSessionPoolImpl.java:60)
> > > >>>         at
> > > >>> org.apache.activemq.ra.ServerSessionPoolImpl.getServerSession(
> > > >>> ServerSessionPoolImpl.java:112)
> > > >>>         - locked <0x234dc7a0> (a
> > > >>> org.apache.activemq.ra.ServerSessionPoolImpl)
> > > >>>         at
> > > >>> org.apache.activemq.ActiveMQConnectionConsumer.dispatch(
> > > >>> ActiveMQConnectionConsumer.java:136)
> > > >>>         at
> > > >>> org.apache.activemq.ActiveMQConnection.onCommand(
> > > ActiveMQConnection.java
> > > >>> :1407)
> > > >>>         at
> > > >>> org.apache.activemq.transport.ResponseCorrelator.onCommand(
> > > >>> ResponseCorrelator.java:92)
> > > >>>         at
> > > >>> org.apache.activemq.transport.TransportFilter.onCommand(
> > > >>> TransportFilter.java:67)
> > > >>>         at
> > > >>> org.apache.activemq.transport.MarshallingTransportFilter.onCommand
> (
> > > >>> MarshallingTransportFilter.java:42)
> > > >>>         at
> > > >>> org.apache.activemq.transport.vm.VMTransport.oneway(
> VMTransport.java
> > > :77)
> > > >>>         at
> > > >>> org.apache.activemq.transport.MutexTransport.oneway(
> > > MutexTransport.java
> > > >>> :45)
> > > >>>         - locked <0x234e2f48> (a java.lang.Object)
> > > >>>         at
> > > >>> org.apache.activemq.transport.ResponseCorrelator.oneway(
> > > >>> ResponseCorrelator.java:59)
> > > >>>         at
> > > >>> org.apache.activemq.broker.TransportConnection.dispatch(
> > > >>> TransportConnection.java:215)
> > > >>>         at
> > > >>> org.apache.activemq.broker.AbstractConnection.processDispatch(
> > > >>> AbstractConnection.java:722)
> > > >>>         at
> > > >>> org.apache.activemq.broker.AbstractConnection.dispatchSync(
> > > >>> AbstractConnection.java:699)
> > > >>>         at
> > > >>> org.apache.activemq.broker.region.TopicSubscription.dispatch(
> > > >>> TopicSubscription.java:319)
> > > >>>         at
> > > >>> org.apache.activemq.broker.region.TopicSubscription.add(
> > > >>> TopicSubscription.java:78)
> > > >>>         at
> > > >>>
> org.apache.activemq.broker.region.policy.SimpleDispatchPolicy.dispatch
> > > (
> > > >>> SimpleDispatchPolicy.java:51)
> > > >>>         at org.apache.activemq.broker.region.Topic.dispatch(
> Topic.java
> > > >>> :444)
> > > >>>         at org.apache.activemq.broker.region.Topic.send(Topic.java
> > > :255)
> > > >>>         at
> > > >>> org.apache.activemq.broker.region.AbstractRegion.send(
> > > AbstractRegion.java
> > > >>> :226)
> > > >>>         at
> > > >>> org.apache.activemq.broker.region.RegionBroker.send(
> RegionBroker.java
> > > :349)
> > > >>>         at
> > > >>> org.apache.activemq.broker.TransactionBroker.send(
> > > TransactionBroker.java
> > > >>> :193)
> > > >>>         at
> > > >>> org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java
> :114)
> > > >>>         at
> > > >>> org.apache.activemq.broker.CompositeDestinationBroker.send(
> > > >>> CompositeDestinationBroker.java:98)
> > > >>>         at
> > > >>> org.apache.activemq.broker.MutableBrokerFilter.send(
> > > >>> MutableBrokerFilter.java:127)
> > > >>>         at
> > > >>> org.apache.activemq.broker.AbstractConnection.processMessage(
> > > >>> AbstractConnection.java:433)
> > > >>>         at
> > > >>> org.apache.activemq.command.ActiveMQMessage.visit(
> ActiveMQMessage.java
> > > >>> :591)
> > > >>>         at
> > > >>> org.apache.activemq.broker.AbstractConnection.service(
> > > >>> AbstractConnection.java:237)
> > > >>>         at
> > > >>> org.apache.activemq.broker.TransportConnection$1.onCommand(
> > > >>> TransportConnection.java:61)
> > > >>>         at
> > > >>> org.apache.activemq.transport.ResponseCorrelator.onCommand(
> > > >>> ResponseCorrelator.java:92)
> > > >>>         at
> > > >>> org.apache.activemq.transport.TransportFilter.onCommand(
> > > >>> TransportFilter.java:67)
> > > >>>         at
> > > >>> org.apache.activemq.transport.vm.VMTransport.oneway(
> VMTransport.java
> > > :77)
> > > >>>         at
> > > >>> org.apache.activemq.transport.MarshallingTransportFilter.oneway(
> > > >>> MarshallingTransportFilter.java:37)
> > > >>>         at
> > > >>> org.apache.activemq.transport.MutexTransport.oneway(
> > > MutexTransport.java
> > > >>> :45)
> > > >>>         - locked <0x236fe2d8> (a java.lang.Object)
> > > >>>         at
> > > >>> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(
> > > >>> ResponseCorrelator.java:67)
> > > >>>         at
> > > >>> org.apache.activemq.transport.ResponseCorrelator.request(
> > > >>> ResponseCorrelator.java:72)
> > > >>>         at
> > > >>> org.apache.activemq.ActiveMQConnection.syncSendPacket(
> > > >>> ActiveMQConnection.java:1115)
> > > >>>         at
> > > >>> org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java
> :1557)
> > > >>>         at
> > > >>> org.apache.activemq.ActiveMQMessageProducer.send(
> > > >>> ActiveMQMessageProducer.java:463)
> > > >>>         at
> > > >>> org.logicblaze.lingo.jms.impl.OneWayRequestor.doSend(
> > > OneWayRequestor.java
> > > >>> :196)
> > > >>>         at
> > > >>> org.logicblaze.lingo.jms.impl.MultiplexingRequestor.doSend(
> > > >>> MultiplexingRequestor.java:189)
> > > >>>         - locked <0x236fe448> (a
> > > >>> org.logicblaze.lingo.jms.impl.MultiplexingRequestor)
> > > >>>         at
> > > >>> org.logicblaze.lingo.jms.impl.OneWayRequestor.send(
> > > OneWayRequestor.java
> > > >>> :101)
> > > >>>         at
> > > >>> org.logicblaze.lingo.jms.impl.OneWayRequestor.send(
> > > OneWayRequestor.java
> > > >>> :97)
> > > >>>         at
> > > >>> org.logicblaze.lingo.jms.JmsClientInterceptor.invoke(
> > > >>> JmsClientInterceptor.java:133)
> > > >>>         at
> > > >>>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > > >>> ReflectiveMethodInvocation.java:170)
> > > >>>         at
> > > >>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
> > > >>> JdkDynamicAopProxy.java:176)
> > > >>>         at $Proxy2.test(Unknown Source)
> > > >>>         at se.ericsson.producer.LingoServlet.doGet(
> LingoServlet.java
> > > :33)
> > > >>>         - locked <0x231d9c70> (a
> > > >>> se.ericsson.consumer.service.ConsumerServiceFactory)
> > > >>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java
> > > :689)
> > > >>>         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
> > > :869)
> > > >>>         at
> > > >>>
> > > >>>
> > >
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> > > >>> (Http11BaseProtocol.java:664)
> > > >>>         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)
> > > >>>
> > > >>> Found 1 deadlock.
> > > >>>
> > > >>>
> > > >>> Is my setup incorrect in some way or is this a real problem that i
> > > >>> found?
> > > >>>
> > > >>> Thanks,
> > > >>> -Kristoffer
> > > >>> --
> > > >>> View this message in context:
> > > >>>
> > >
> http://www.nabble.com/Deadlock-in-MutexTransport-tf2490020.html#a6942040
> > > >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > > >>>
> > > >>>
> > > >>
> > > >>
> > > >> --
> > > >> Regards,
> > > >> Hiram
> > > >>
> > > >> Blog: http://hiramchirino.com
> > > >>
> > > >>
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > >
> http://www.nabble.com/Deadlock-in-MutexTransport-tf2490020.html#a7010550
> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >
> > >
> >
> >
> > --
> > ----
> > Dennis
> >
>
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>



-- 
----
Dennis

Re: Deadlock in MutexTransport

Posted by James Strachan <ja...@gmail.com>.
Could you post a stack trace?

On 4/2/07, Dennis Cheung <hk...@gmail.com> wrote:
> Hi,
>
> I have similar deadlock issue on MutexTransport.
> The transport thread having deadlock with another thread which is doing the
> Consumer.close()
>
> Any one can give advise to me?
> thanks
>
> On 10/26/06, kristoffer <st...@gmail.com> wrote:
> >
> >
> > Hi,
> >
> > Im speculating here: is it because the persistent flag is set to false why
> > i
> > loose all these messages? What is this flags relation to the durable topic
> > setting in JMS? As i said in the last post, i get this deadlock if i set
> > the
> > persistent flag to true. So how to solve this?
> >
> > I also find it strange that Jencks only uses two threads to process the
> > messages?
> >
> > Another small thing is noticed (not related to this) is that lingo 1.2.1has
> > an annoying printout at org.logicblaze.lingo.util.DefaultTimeoutMap line
> > 128: System.out.println("Evicting inactive request for correlationID: " +
> > entry);
> >
> > regards,
> > -Kristoffer
> >
> >
> > kristoffer wrote:
> > >
> > > Hi,
> > >
> > > Thanks for the reply. I did work when i set this URI on the broker
> > >
> > vm://localhost?marshal=true&broker.useJmx=false&broker.persistent=false&jms.useAsyncSend=true
> > >
> > > There seem to be some relation to the persistent flag=false, because if
> > I
> > > remove it, I see the deadlock again?
> > >
> > > But (with no deadlock), I loose something like 3/5 of messages? And
> > there
> > > seems to be only two(?) active consumer threads for the topic, even
> > though
> > > i have assigned 25 threads to the JCA workmanager:
> > >
> > > <beans>
> > >   <bean id="propertyConfigurer"
> > > class="
> > org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> > >     <property name="location" value="classpath:global.properties"/>
> > >   </bean>
> > >
> > >   <bean id="consumer" class="org.logicblaze.lingo.jms.JmsServiceExporter
> > ">
> > >     <property name="service" ref="consumerImpl" />
> > >     <property name="serviceInterface"
> > > value="se.ericsson.consumer.service.ConsumerService" />
> > >     <property name="connectionFactory" ref="jmsFactory" />
> > >   </bean>
> > >
> > >   <bean id="consumerImpl"
> > > class="se.ericsson.consumer.impl.ConsumerServiceImpl" singleton="true"
> > />
> > >
> > >   <bean id="jencks" class="org.jencks.JCAContainer">
> > >     <property name="bootstrapContext">
> > >       <bean class="org.jencks.factory.BootstrapContextFactoryBean">
> > >         <property name="threadPoolSize" value="25" />
> > >       </bean>
> > >     </property>
> > >     <property name="resourceAdapter">
> > >       <bean id="activeMQResourceAdapter"
> > > class="org.apache.activemq.ra.ActiveMQResourceAdapter">
> > >         <property name="serverUrl" value="${activemq.brokers}" />
> > >       </bean>
> > >     </property>
> > >   </bean>
> > >
> > >   <bean id="inboundMessageA" class="org.jencks.JCAConnector">
> > >     <property name="jcaContainer" ref="jencks" />
> > >     <property name="activationSpec">
> > >       <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
> > >         <property name="destination" value="ericsson.ConsumerTopic" />
> > >         <property name="destinationType" value="javax.jms.Topic" />
> > >         <property name="messageSelector" value="EricssonHeader =
> > > 'bonka'"/>
> > >       </bean>
> > >     </property>
> > >     <property name="ref" value="consumer" />
> > >   </bean>
> > >
> > >   <bean id="jmsFactory"
> > > class="org.apache.activemq.ActiveMQConnectionFactory">
> > >     <property name="brokerURL" value="${activemq.brokers}" />
> > >   </bean>
> > > </bean>
> > >
> > > Is there some throttling policy which just drops messages if it is
> > > overheated? (i applied quite some load)
> > >
> > > regards,
> > > -Kristoffer
> > >
> > >
> > > Hiram Chirino wrote:
> > >>
> > >> Please enable async dispatch on your connections.. something like:
> > >>
> > >> vm://localhost?jms.dispatchAsync=true
> > >>
> > >>
> > >> On 10/22/06, kristoffer <st...@gmail.com> wrote:
> > >>>
> > >>>
> > >>> Hi,
> > >>>
> > >>> I have got an deadlock situation in MutexTransport. The usecase is
> > that
> > >>> I
> > >>> have a broker, producer and consumer all deployed in separate WARs and
> > >>> the
> > >>> communicate over vm:// transport. I have a servelt which creates the
> > >>> producer which produces two messages to the same topic, but with
> > >>> different
> > >>> message selectors for two consumers. I maybe should mention that i
> > have
> > >>> a
> > >>> lingo, jencks, spring combo setup...
> > >>>
> > >>> Here's the threaddump from the deadlock
> > >>>
> > >>> Found one Java-level deadlock:
> > >>> =============================
> > >>> "Thread-44":
> > >>>   waiting to lock monitor 0x00a6b29c (object 0x234e2f48, a
> > >>> java.lang.Object),
> > >>>   which is held by "http-8080-Processor21"
> > >>> "http-8080-Processor21":
> > >>>   waiting to lock monitor 0x00a6afbc (object 0x23508c88, a
> > >>> java.lang.Object),
> > >>>   which is held by "Thread-44"
> > >>>
> > >>> Java stack information for the threads listed above:
> > >>> ===================================================
> > >>> "Thread-44":
> > >>>         at
> > >>> org.apache.activemq.transport.MutexTransport.oneway(
> > MutexTransport.java
> > >>> :45)
> > >>>         - waiting to lock <0x234e2f48> (a java.lang.Object)
> > >>>         at
> > >>> org.apache.activemq.transport.ResponseCorrelator.oneway(
> > >>> ResponseCorrelator.java:59)
> > >>>         at
> > >>> org.apache.activemq.broker.TransportConnection.dispatch(
> > >>> TransportConnection.java:215)
> > >>>         at
> > >>> org.apache.activemq.broker.TransportConnection$1.onCommand(
> > >>> TransportConnection.java:63)
> > >>>         at
> > >>> org.apache.activemq.transport.ResponseCorrelator.onCommand(
> > >>> ResponseCorrelator.java:92)
> > >>>         at
> > >>> org.apache.activemq.transport.TransportFilter.onCommand(
> > >>> TransportFilter.java:67)
> > >>>         at
> > >>> org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java
> > :77)
> > >>>         at
> > >>> org.apache.activemq.transport.MarshallingTransportFilter.oneway(
> > >>> MarshallingTransportFilter.java:37)
> > >>>         at
> > >>> org.apache.activemq.transport.MutexTransport.oneway(
> > MutexTransport.java
> > >>> :45)
> > >>>         - locked <0x23508c88> (a java.lang.Object)
> > >>>         at
> > >>> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(
> > >>> ResponseCorrelator.java:67)
> > >>>         at
> > >>> org.apache.activemq.transport.ResponseCorrelator.request(
> > >>> ResponseCorrelator.java:72)
> > >>>         at
> > >>> org.apache.activemq.ActiveMQConnection.syncSendPacket(
> > >>> ActiveMQConnection.java:1115)
> > >>>         at
> > >>> org.apache.activemq.TransactionContext.commit(TransactionContext.java
> > :260)
> > >>>         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:130)
> > >>>         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
> > >>> :752)
> > >>>         at
> > >>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java
> > :163)
> > >>>         - locked <0x237b68b0> (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-Processor21":
> > >>>         at
> > >>> org.apache.activemq.transport.MutexTransport.oneway(
> > MutexTransport.java
> > >>> :45)
> > >>>         - waiting to lock <0x23508c88> (a java.lang.Object)
> > >>>         at
> > >>> org.apache.activemq.transport.ResponseCorrelator.oneway(
> > >>> ResponseCorrelator.java:59)
> > >>>         at
> > >>> org.apache.activemq.ActiveMQConnection.asyncSendPacket(
> > >>> ActiveMQConnection.java:1095)
> > >>>         at
> > >>> org.apache.activemq.ActiveMQSession.<init>(ActiveMQSession.java:228)
> > >>>         at
> > >>> org.apache.activemq.ActiveMQConnection.createSession(
> > >>> ActiveMQConnection.java:275)
> > >>>         at
> > >>> org.apache.activemq.ra.ServerSessionPoolImpl.createServerSessionImpl(
> > >>> ServerSessionPoolImpl.java:60)
> > >>>         at
> > >>> org.apache.activemq.ra.ServerSessionPoolImpl.getServerSession(
> > >>> ServerSessionPoolImpl.java:112)
> > >>>         - locked <0x234dc7a0> (a
> > >>> org.apache.activemq.ra.ServerSessionPoolImpl)
> > >>>         at
> > >>> org.apache.activemq.ActiveMQConnectionConsumer.dispatch(
> > >>> ActiveMQConnectionConsumer.java:136)
> > >>>         at
> > >>> org.apache.activemq.ActiveMQConnection.onCommand(
> > ActiveMQConnection.java
> > >>> :1407)
> > >>>         at
> > >>> org.apache.activemq.transport.ResponseCorrelator.onCommand(
> > >>> ResponseCorrelator.java:92)
> > >>>         at
> > >>> org.apache.activemq.transport.TransportFilter.onCommand(
> > >>> TransportFilter.java:67)
> > >>>         at
> > >>> org.apache.activemq.transport.MarshallingTransportFilter.onCommand(
> > >>> MarshallingTransportFilter.java:42)
> > >>>         at
> > >>> org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java
> > :77)
> > >>>         at
> > >>> org.apache.activemq.transport.MutexTransport.oneway(
> > MutexTransport.java
> > >>> :45)
> > >>>         - locked <0x234e2f48> (a java.lang.Object)
> > >>>         at
> > >>> org.apache.activemq.transport.ResponseCorrelator.oneway(
> > >>> ResponseCorrelator.java:59)
> > >>>         at
> > >>> org.apache.activemq.broker.TransportConnection.dispatch(
> > >>> TransportConnection.java:215)
> > >>>         at
> > >>> org.apache.activemq.broker.AbstractConnection.processDispatch(
> > >>> AbstractConnection.java:722)
> > >>>         at
> > >>> org.apache.activemq.broker.AbstractConnection.dispatchSync(
> > >>> AbstractConnection.java:699)
> > >>>         at
> > >>> org.apache.activemq.broker.region.TopicSubscription.dispatch(
> > >>> TopicSubscription.java:319)
> > >>>         at
> > >>> org.apache.activemq.broker.region.TopicSubscription.add(
> > >>> TopicSubscription.java:78)
> > >>>         at
> > >>> org.apache.activemq.broker.region.policy.SimpleDispatchPolicy.dispatch
> > (
> > >>> SimpleDispatchPolicy.java:51)
> > >>>         at org.apache.activemq.broker.region.Topic.dispatch(Topic.java
> > >>> :444)
> > >>>         at org.apache.activemq.broker.region.Topic.send(Topic.java
> > :255)
> > >>>         at
> > >>> org.apache.activemq.broker.region.AbstractRegion.send(
> > AbstractRegion.java
> > >>> :226)
> > >>>         at
> > >>> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java
> > :349)
> > >>>         at
> > >>> org.apache.activemq.broker.TransactionBroker.send(
> > TransactionBroker.java
> > >>> :193)
> > >>>         at
> > >>> org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:114)
> > >>>         at
> > >>> org.apache.activemq.broker.CompositeDestinationBroker.send(
> > >>> CompositeDestinationBroker.java:98)
> > >>>         at
> > >>> org.apache.activemq.broker.MutableBrokerFilter.send(
> > >>> MutableBrokerFilter.java:127)
> > >>>         at
> > >>> org.apache.activemq.broker.AbstractConnection.processMessage(
> > >>> AbstractConnection.java:433)
> > >>>         at
> > >>> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java
> > >>> :591)
> > >>>         at
> > >>> org.apache.activemq.broker.AbstractConnection.service(
> > >>> AbstractConnection.java:237)
> > >>>         at
> > >>> org.apache.activemq.broker.TransportConnection$1.onCommand(
> > >>> TransportConnection.java:61)
> > >>>         at
> > >>> org.apache.activemq.transport.ResponseCorrelator.onCommand(
> > >>> ResponseCorrelator.java:92)
> > >>>         at
> > >>> org.apache.activemq.transport.TransportFilter.onCommand(
> > >>> TransportFilter.java:67)
> > >>>         at
> > >>> org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java
> > :77)
> > >>>         at
> > >>> org.apache.activemq.transport.MarshallingTransportFilter.oneway(
> > >>> MarshallingTransportFilter.java:37)
> > >>>         at
> > >>> org.apache.activemq.transport.MutexTransport.oneway(
> > MutexTransport.java
> > >>> :45)
> > >>>         - locked <0x236fe2d8> (a java.lang.Object)
> > >>>         at
> > >>> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(
> > >>> ResponseCorrelator.java:67)
> > >>>         at
> > >>> org.apache.activemq.transport.ResponseCorrelator.request(
> > >>> ResponseCorrelator.java:72)
> > >>>         at
> > >>> org.apache.activemq.ActiveMQConnection.syncSendPacket(
> > >>> ActiveMQConnection.java:1115)
> > >>>         at
> > >>> org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1557)
> > >>>         at
> > >>> org.apache.activemq.ActiveMQMessageProducer.send(
> > >>> ActiveMQMessageProducer.java:463)
> > >>>         at
> > >>> org.logicblaze.lingo.jms.impl.OneWayRequestor.doSend(
> > OneWayRequestor.java
> > >>> :196)
> > >>>         at
> > >>> org.logicblaze.lingo.jms.impl.MultiplexingRequestor.doSend(
> > >>> MultiplexingRequestor.java:189)
> > >>>         - locked <0x236fe448> (a
> > >>> org.logicblaze.lingo.jms.impl.MultiplexingRequestor)
> > >>>         at
> > >>> org.logicblaze.lingo.jms.impl.OneWayRequestor.send(
> > OneWayRequestor.java
> > >>> :101)
> > >>>         at
> > >>> org.logicblaze.lingo.jms.impl.OneWayRequestor.send(
> > OneWayRequestor.java
> > >>> :97)
> > >>>         at
> > >>> org.logicblaze.lingo.jms.JmsClientInterceptor.invoke(
> > >>> JmsClientInterceptor.java:133)
> > >>>         at
> > >>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > >>> ReflectiveMethodInvocation.java:170)
> > >>>         at
> > >>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
> > >>> JdkDynamicAopProxy.java:176)
> > >>>         at $Proxy2.test(Unknown Source)
> > >>>         at se.ericsson.producer.LingoServlet.doGet(LingoServlet.java
> > :33)
> > >>>         - locked <0x231d9c70> (a
> > >>> se.ericsson.consumer.service.ConsumerServiceFactory)
> > >>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java
> > :689)
> > >>>         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
> > :869)
> > >>>         at
> > >>>
> > >>>
> > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> > >>> (Http11BaseProtocol.java:664)
> > >>>         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)
> > >>>
> > >>> Found 1 deadlock.
> > >>>
> > >>>
> > >>> Is my setup incorrect in some way or is this a real problem that i
> > >>> found?
> > >>>
> > >>> Thanks,
> > >>> -Kristoffer
> > >>> --
> > >>> View this message in context:
> > >>>
> > http://www.nabble.com/Deadlock-in-MutexTransport-tf2490020.html#a6942040
> > >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >>>
> > >>>
> > >>
> > >>
> > >> --
> > >> Regards,
> > >> Hiram
> > >>
> > >> Blog: http://hiramchirino.com
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Deadlock-in-MutexTransport-tf2490020.html#a7010550
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
> >
>
>
> --
> ----
> Dennis
>


-- 

James
-------
http://radio.weblogs.com/0112098/