Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 63800 invoked from network); 23 Nov 2007 07:57:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Nov 2007 07:57:51 -0000 Received: (qmail 76843 invoked by uid 500); 23 Nov 2007 07:57:38 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 76817 invoked by uid 500); 23 Nov 2007 07:57:38 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 76808 invoked by uid 99); 23 Nov 2007 07:57:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2007 23:57:38 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Nov 2007 07:57:48 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 539C971420E for ; Thu, 22 Nov 2007 23:57:27 -0800 (PST) Message-ID: <319313.1195804647315.JavaMail.jira@brutus> Date: Thu, 22 Nov 2007 23:57:27 -0800 (PST) From: "Rainer Klute (JIRA)" To: dev@activemq.apache.org Subject: [jira] Reopened: (AMQ-1490) Deadlocks (with JUnit tests) In-Reply-To: <15275334.1194861022230.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-1490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rainer Klute reopened AMQ-1490: ------------------------------- Please look once more: I '''do''' initialize the consumer threads and create the consumers - see line 282 in ReliabilityTest.java. If there were no consumers, they wouldn't receive any messages at all. However, the usually do receive some messages, but not all. > 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 > Assignee: Rob Davies > Fix For: 5.0.0 > > Attachments: ActiveMQ_Testcases.jar, ActiveMQ_Testcases.jar, 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.