activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Krah (JIRA)" <>
Subject [jira] Commented: (AMQ-2556) Memory leaks with XA Transactions (case of read-only transactions)
Date Wed, 31 Mar 2010 12:43:08 GMT


Torsten Krah commented on AMQ-2556:

5.3.1 is still affected.
Using Spring 3.0.1, Atomikos 3.6.0 and Springs Message Listener i can see this too. 
The ActiveMQXASession and ActiveMQTopicSubscriber Instances are growing also until OOM.

Looking the ActiveMQMessageConsumer in calls to close this is done:

new Synchronization() {
                    public void afterCommit() throws Exception {

                    public void afterRollback() throws Exception {

But what about not being commited or rollbacked at all in case of XA_RDONLY - doClose will
never be called - don't know if this does matter for this memory leak but it seems inconsistent
that resource cleanup is only done fpr commit + rollback.

> Memory leaks with XA Transactions (case of read-only transactions)
> ------------------------------------------------------------------
>                 Key: AMQ-2556
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, JMS client
>    Affects Versions: 5.1.0, 5.2.0, 5.3.0
>         Environment: ActiveMQ 5.3.0
> Atomikos Transactions Essentials 3.5.8
> Spring 2.5.6
> Oracle 11g (thin driver version
>            Reporter: Daniel Santos
>         Attachments:
> Some transaction related information are not released in case of read-only transactions
(where not messages have been consumed or produced) by broker and client, that causes an OutOfMemory
after running some time.
> Fields that hold these "transaction related information" are (at least) :
> - {{org.apache.activemq.state.ConnectionState.transactions}}
> - {{org.apache.activemq.TransactionContext.ENDED_XA_TRANSACTION_CONTEXTS}}
> After serach, it seems that the case of read-only XA transactions (that terminates at
prepare time) has been missed in some code like :
> - {{}} that puts TransactionState in {{org.apache.activemq.state.ConnectionState.transactions}}
at the beginning, release them at commit (or rollback) time *but not at prepare time where
result is {{XAResource.XA_RDONLY}}*
> - {{org.apache.activemq.TransactionContext}} that do the same mistake via ENDED_XA_TRANSACTION_CONTEXTS
in prepare()
> _Note that the case of read-only transactions seems correctly done by {{org.apache.activemq.transaction.XATransaction}}
(very interesting comment here

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

View raw message