activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Quiroz (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (AMQ-1059) ActiveMQ Task/Transport Deadlock when using Stomp
Date Thu, 14 Aug 2008 13:37:53 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-1059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Carlos Quiroz reopened AMQ-1059:
--------------------------------


I can confirm that this bug reappears on AMQ 5.1.0. It appears when one thread acquires MutexTransport.oneway
which acquires writeMutex and then StompTransportFilter.sendtToActiveMQ which acquires sendToActiveMQMutex,
this happens when sending an acknowledgment in AUTO_ACK mode. 

At the same time other thread sends a message which first calls StompTransportFilter.sendToActiveMQ
 which acquires sendToActiveMQMutex. This will inturn call MutexTransport,oneway and will
produce a deadlock.



> ActiveMQ Task/Transport Deadlock when using Stomp
> -------------------------------------------------
>
>                 Key: AMQ-1059
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1059
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0.2
>         Environment: Linux Redhat EL3, Java 1.4.2
>            Reporter: William Leibzon
>            Assignee: Rob Davies
>             Fix For: 5.1.0
>
>
> This happened after about a day running monitoring script that uses Perl stomp client
to connect to JMS.
> Found one Java-level deadlock:
> =============================
> "ActiveMQ Task":
>   waiting to lock monitor 0x0807ae74 (object 0x7ee3a898, a java.lang.Object),
>   which is held by "ActiveMQ Transport: tcp:///10.1.111.14:60270"
> "ActiveMQ Transport: tcp:///10.1.111.14:60270":
>   waiting to lock monitor 0x0807b474 (object 0x7ee3caa8, a java.lang.Object),
>   which is held by "ActiveMQ Task"
> Java stack information for the threads listed above:
> ===================================================
> "ActiveMQ Task":
>         at org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:70)
>         - waiting to lock <0x7ee3a898> (a java.lang.Object)
>         at org.apache.activemq.transport.stomp.StompSubscription.onMessageDispatch(StompSubscription.java:71)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onActiveMQCommad(ProtocolConverter.java:476)
>         at org.apache.activemq.transport.stomp.StompTransportFilter.oneway(StompTransportFilter.java:52)
>         at org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:142)
>         at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:45)
>         - locked <0x7ee3caa8> (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.iterate(AbstractConnection.java:738)
>         at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:111)
>         at org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
>         at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44)
>         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.lang.Thread.run(Unknown Source)
> "ActiveMQ Transport: tcp:///10.1.111.14:60270":
>         at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:45)
>         - waiting to lock <0x7ee3caa8> (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.InactivityMonitor.onCommand(InactivityMonitor.java:123)
>         at org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:70)
>         - locked <0x7ee3a898> (a java.lang.Object)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:112)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompSend(ProtocolConverter.java:197)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommad(ProtocolConverter.java:132)
>         at org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:60)
>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:88)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:137)
>         at java.lang.Thread.run(Unknown Source)
> Found 12 deadlocks

-- 
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