activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Cheung" <hkdenni...@gmail.com>
Subject Re: Deadlock in MutexTransport
Date Mon, 02 Apr 2007 13:22:18 GMT
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 <stoffe@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 <stoffe@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message