activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J Moran (JIRA)" <>
Subject [jira] Created: (AMQ-1856) Deadlock in AMQMessageStore when using transactions
Date Fri, 11 Jul 2008 17:58:00 GMT
Deadlock in AMQMessageStore when using transactions

                 Key: AMQ-1856
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.1.0
         Environment: Red Hat Enterprise Linux ES release 4 (Nahant Update 3)
            Reporter: J Moran
            Priority: Blocker
         Attachments: thread_dump.txt

I am using ActiveMQ 5.1.0 with the AMQMessageStore (in the default configuration except data
directory location) and sending/receiving transactionally using the VMTransport. This produced
the deadlock shown in the attached (partial) thread dump, generated by jstack -l. 

In a nutshell, the VMTransport thread is holding the AMQMessageStore.lock=KahaReferenceStore.lock,
acquired at, while awaiting a countDown on AMQMessageStore.flushLatch.
The ActiveMQ Task (which is the AMQMessageStore.asyncWriteTask) should do the countDown on
the flushLatch but is waiting on acquiring the KahaReferenceStore.lock first. Hence deadlock.

Note that the condition messageAcks.size() > this.peristenceAdapter.getMaxCheckpointMessageAddSize()
must be true for the deadlock to occur -- this triggers the flush. 

Since the transport is one of the deadlocked threads, all access via the transport stops,
making the broker unusable and making this issue a blocker for me. A comment (workaround?)
as soon as possible would be much appreciated.

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

View raw message