activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Arend Jansen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-1092) Deadlock when ActiveMQ 4.X is run as an embedded broker inside JBoss 4.X with "<config-property-value>vm://localhost</config-property-value>" configured in the ra.xml file.
Date Fri, 16 Mar 2007 13:27:50 GMT

    [ https://issues.apache.org/activemq/browse/AMQ-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38844
] 

Jan Arend Jansen commented on AMQ-1092:
---------------------------------------

I can confirm this deadlock. I've tried to use Jboss 4.0.5GA with ActiveMQ 4.1.0, 4.1.1 and
4.2-SNAPSHOT RARs and configured with vm:// transport I get this deadlock:

Found one Java-level deadlock:
=============================
"WorkManager(3)-12":
  waiting to lock monitor 0x00f5b884 (object 0x074fa668, a java.lang.Object),
  which is held by "WorkManager(3)-6"
"WorkManager(3)-6":
  waiting to lock monitor 0x00f5c7f4 (object 0x074bf408, a java.lang.Object),
  which is held by "Thread-50"
"Thread-50":
  waiting to lock monitor 0x00f5b884 (object 0x074fa668, a java.lang.Object),
  which is held by "WorkManager(3)-6"

Java stack information for the threads listed above:
===================================================
"WorkManager(3)-12":
        at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:47)
        - waiting to lock <0x074fa668> (a java.lang.Object)
        at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
        at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1155)
        at org.apache.activemq.TransactionContext.setXid(TransactionContext.java:566)
        at org.apache.activemq.TransactionContext.start(TransactionContext.java:299)
        at org.apache.activemq.ra.LocalAndXATransaction.start(LocalAndXATransaction.java:136)
        at org.jboss.tm.TransactionImpl$Resource.startResource(TransactionImpl.java:2063)
        at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:581)
        at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.startTransaction(MessageInflowLocalProxy.java:368)
        at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.before(MessageInflowLocalProxy.java:204)
        at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:129)
        at $Proxy125.beforeDelivery(Unknown Source)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.beforeDelivery(MessageEndpointProxy.java:110)
        at org.apache.activemq.ra.MessageEndpointProxy.beforeDelivery(MessageEndpointProxy.java:57)
        at org.apache.activemq.ra.ServerSessionImpl.beforeDelivery(ServerSessionImpl.java:201)
        at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:690)
        at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
        at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
        at java.lang.Thread.run(Thread.java:619)
"WorkManager(3)-6":
        at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:47)
        - waiting to lock <0x074bf408> (a java.lang.Object)
        at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
        at org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1138)
        at org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:805)
        at org.apache.activemq.broker.TransportConnection.dispatchSync(TransportConnection.java:770)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:187)
        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:47)
        - locked <0x074fa668> (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:1175)
        at org.apache.activemq.TransactionContext.setXid(TransactionContext.java:578)
        at org.apache.activemq.TransactionContext.end(TransactionContext.java:339)
        at org.apache.activemq.ra.LocalAndXATransaction.end(LocalAndXATransaction.java:90)
        at org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2143)
        at org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2118)
        at org.jboss.tm.TransactionImpl.endResources(TransactionImpl.java:1462)
        at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1116)
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
        at org.jboss.tm.TxManager.commit(TxManager.java:240)
        at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.endTransaction(MessageInflowLocalProxy.java:433)
        at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.finish(MessageInflowLocalProxy.java:312)
        at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.after(MessageInflowLocalProxy.java:228)
        at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:134)
        at $Proxy125.afterDelivery(Unknown Source)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.afterDelivery(MessageEndpointProxy.java:126)
        at org.apache.activemq.ra.MessageEndpointProxy.afterDelivery(MessageEndpointProxy.java:65)
        at org.apache.activemq.ra.ServerSessionImpl.afterDelivery(ServerSessionImpl.java:216)
        at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:751)
        at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
        at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
        at java.lang.Thread.run(Thread.java:619)
"Thread-50":
        at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:47)
        - waiting to lock <0x074fa668> (a java.lang.Object)
        at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
        at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1155)
        at org.apache.activemq.ActiveMQSession.<init>(ActiveMQSession.java:227)
        at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:279)
        at org.apache.activemq.ra.ServerSessionPoolImpl.createServerSessionImpl(ServerSessionPoolImpl.java:63)
        at org.apache.activemq.ra.ServerSessionPoolImpl.getServerSession(ServerSessionPoolImpl.java:116)
        at org.apache.activemq.ActiveMQConnectionConsumer.dispatch(ActiveMQConnectionConsumer.java:136)
        at org.apache.activemq.ActiveMQConnection.onCommand(ActiveMQConnection.java:1479)
        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:47)
        - locked <0x074bf408> (a java.lang.Object)
        at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
        at org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1138)
        at org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:805)
        at org.apache.activemq.broker.TransportConnection.dispatchSync(TransportConnection.java:770)
        at org.apache.activemq.broker.region.TopicSubscription.dispatch(TopicSubscription.java:360)
        at org.apache.activemq.broker.region.TopicSubscription.add(TopicSubscription.java:83)
        at org.apache.activemq.broker.region.policy.SimpleDispatchPolicy.dispatch(SimpleDispatchPolicy.java:51)
        at org.apache.activemq.broker.region.Topic.dispatch(Topic.java:417)
        at org.apache.activemq.broker.region.Topic$2.afterCommit(Topic.java:258)
        at org.apache.activemq.transaction.Transaction.fireAfterCommit(Transaction.java:83)
        at org.apache.activemq.transaction.XATransaction.doPostCommit(XATransaction.java:110)
        at org.apache.activemq.transaction.XATransaction.commit(XATransaction.java:65)
        at org.apache.activemq.broker.TransactionBroker.commitTransaction(TransactionBroker.java:154)
        at org.apache.activemq.broker.BrokerFilter.commitTransaction(BrokerFilter.java:94)
        at org.apache.activemq.broker.BrokerFilter.commitTransaction(BrokerFilter.java:94)
        at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(MutableBrokerFilter.java:104)
        at org.apache.activemq.broker.TransportConnection.processCommitTransactionOnePhase(TransportConnection.java:424)
        - locked <0x04c671b8> (a org.apache.activemq.broker.jmx.ManagedTransportConnection)
        at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:99)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:185)
        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:47)
        - locked <0x04c73c70> (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:1175)
        at org.apache.activemq.TransactionContext.commit(TransactionContext.java:450)
        at org.apache.activemq.ra.LocalAndXATransaction.commit(LocalAndXATransaction.java:85)
        at org.jboss.tm.TransactionImpl$Resource.commit(TransactionImpl.java:2253)
        at org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1784)
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:340)
        at org.jboss.tm.TxManager.commit(TxManager.java:240)
        at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
        at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
        at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
        at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
        at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
        at $Proxy113.publish(Unknown Source)
        at com.wolterskluwer.ceres.imports.mbeans.FilePollerService.fileSetFound(FilePollerService.java:146)
        at org.sadun.util.polling.DefaultListener.receive(DefaultListener.java:40)
        at com.deltax.util.listener.SignalQueue.run(Unknown Source)

Found 1 deadlock.

> Deadlock when ActiveMQ 4.X is run as an embedded broker inside JBoss 4.X with "<config-property-value>vm://localhost</config-property-value>"
configured in the ra.xml file.
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1092
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1092
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.0.1, 4.0.2, 4.1.0
>         Environment: Tested OSes:  Windows 2000 Pro, Window XP Pro x64, Linux 
> Java: 1.5 SDK & 1.4 SDK
> J2EE Server: JBoss 4.03.S1 & 4.0.4GA
>            Reporter: Luis A Lopez-Rivera
>         Attachments: deadlock.txt, javastack.txt
>
>
> Deadlock occurs when ActiveMQ 4.X is run as an embedded broker inside JBoss 4.X with
"<config-property-value>vm://localhost</config-property-value>" configured in
the ra.xml file.  If "tcp://localhost:61616" is used instead of "vm://localhost" then everything
works fine.
> The deadlock seems to occur when two messages are being handled (one is being produced
and one being consumed).  If I prevent two messages from being handled at the same time (one
produced and one consumed) then the deadlock does not occur.
> This situation can be reproduced every single time tested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message