You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Rainer Klute (JIRA)" <ji...@apache.org> on 2007/11/13 07:22:22 UTC
[jira] Commented: (AMQ-1490) Deadlocks (with JUnit tests)
[ https://issues.apache.org/activemq/browse/AMQ-1490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40591 ]
Rainer Klute commented on AMQ-1490:
-----------------------------------
I just checked this issue against ActiveMQ 5.0.0 RC3 and found it still valid. And I got additional warnings like these:
[junit] INFO: ActiveMQ Message Broker (localhost, ID:xxxxxxxx-17170-1194934336239-0:0) is shutting down
[junit] 13.11.2007 07:13:03 org.apache.activemq.ActiveMQConnection onAsyncException
[junit] WARNUNG: Async exception with no exception listener: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://localhost#1) disposed.
[junit] org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://localhost#1) disposed.
[junit] at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:200)
[junit] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:118)
[junit] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:42)
[junit] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
[junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
[junit] at java.lang.Thread.run(Thread.java:619)
[junit] 13.11.2007 07:13:03 org.apache.activemq.AdvisoryConsumer dispose
[junit] INFO: Failed to send remove command: javax.jms.JMSException: Peer (vm://localhost#1) disposed.
[junit] javax.jms.JMSException: Peer (vm://localhost#1) disposed.
[junit] at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
[junit] at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1154)
[junit] at org.apache.activemq.AdvisoryConsumer.dispose(AdvisoryConsumer.java:56)
[junit] at org.apache.activemq.ActiveMQConnection.cleanup(ActiveMQConnection.java:1326)
[junit] at org.apache.activemq.ActiveMQConnection.transportFailed(ActiveMQConnection.java:2027)
[junit] at org.apache.activemq.ActiveMQConnection$4.run(ActiveMQConnection.java:1663)
[junit] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
[junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
[junit] at java.lang.Thread.run(Thread.java:619)
[junit] Caused by: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://localhost#1) disposed.
[junit] at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:87)
[junit] at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
[junit] at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:59)
[junit] at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1152)
[junit] ... 7 more
[junit] 13.11.2007 07:13:03 org.apache.activemq.ActiveMQConnection transportFailed
[junit] WARNUNG: Cleanup failed
[junit] javax.jms.JMSException: Peer (vm://localhost#1) disposed.
[junit] at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
[junit] at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1154)
[junit] at org.apache.activemq.TransactionContext.begin(TransactionContext.java:200)
[junit] at org.apache.activemq.ActiveMQSession.doStartTransaction(ActiveMQSession.java:1653)
[junit] at org.apache.activemq.ActiveMQMessageConsumer.acknowledge(ActiveMQMessageConsumer.java:823)
[junit] at org.apache.activemq.ActiveMQMessageConsumer.dispose(ActiveMQMessageConsumer.java:651)
[junit] at org.apache.activemq.ActiveMQSession.dispose(ActiveMQSession.java:575)
[junit] at org.apache.activemq.ActiveMQConnection.cleanup(ActiveMQConnection.java:1332)
[junit] at org.apache.activemq.ActiveMQConnection.transportFailed(ActiveMQConnection.java:2027)
[junit] at org.apache.activemq.ActiveMQConnection$4.run(ActiveMQConnection.java:1663)
[junit] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
[junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
[junit] at java.lang.Thread.run(Thread.java:619)
[junit] Caused by: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://localhost#1) disposed.
[junit] at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:87)
[junit] at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
[junit] at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:59)
[junit] at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1152)
[junit] ... 11 more
> Deadlocks (with JUnit tests)
> ----------------------------
>
> Key: AMQ-1490
> URL: https://issues.apache.org/activemq/browse/AMQ-1490
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.0.0
> Environment: Linux
> Reporter: Rainer Klute
> Fix For: 5.0.0
>
> Attachments: ActiveMQ_Testcases.jar
>
>
> For some time now there have been various bug reports about ActiveMQ "blocking", "not receiving messages", "running into a deadlock" etc. Since I encoutered such deadlocks now and then, too, I eventually wrote up a JUnit testing scenario for this stuff. I found out that deadlocks can be quite easily reproduced. The symptoms are that the producer thread is sending or committing while the consumer thread is receiving or committing - and none of them can advance. One of the threads is always stuck in a blocking queue.
> Here's a sample output of my testing class:
> An ActiveMQ deadlock has been discovered. The following threads seem to be involved:
> Thread "producer" is inactive since 16 seconds after 358719 status changes. The current status is COMMITTING
> sun.misc.Unsafe.park(Native Method)
> java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1889)
> java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:317)
> org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:76)
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1172)
> org.apache.activemq.TransactionContext.commit(TransactionContext.java:259)
> org.apache.activemq.ActiveMQSession.commit(ActiveMQSession.java:494)
> de.rainer_klute.activemq.ProducerThread.run(ProducerThread.java:162)
> Thread "consumer" is inactive since 16 seconds after 1807 status changes. The current status is RECEIVING
> java.lang.Object.wait(Native Method)
> java.lang.Object.wait(Object.java:485)
> org.apache.activemq.MessageDispatchChannel.dequeue(MessageDispatchChannel.java:75)
> org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:404)
> org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:452)
> org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:504)
> de.rainer_klute.activemq.ConsumerThread.run(ConsumerThread.java:183)
> The following factors seem to increase the probability of a deadlock:
> * small values for memoryUsage
> * working transacted in the consumer (not always necessary but "helps")
> * many messages in the persistence store (to be achieved via a long delay before the consumer starts to read messages)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.