Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 36817 invoked from network); 1 Apr 2010 23:29:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Apr 2010 23:29:32 -0000 Received: (qmail 82973 invoked by uid 500); 1 Apr 2010 23:29:32 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 82944 invoked by uid 500); 1 Apr 2010 23:29:32 -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 82935 invoked by uid 99); 1 Apr 2010 23:29:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 23:29:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 23:29:29 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6C744234C4C6 for ; Thu, 1 Apr 2010 23:29:08 +0000 (UTC) Message-ID: <1328629484.10541270164548443.JavaMail.jira@brutus.apache.org> Date: Thu, 1 Apr 2010 23:29:08 +0000 (UTC) From: "Gary Tully (JIRA)" To: dev@activemq.apache.org Subject: [jira] Resolved: (AMQ-2556) Memory leaks with XA Transactions (case of read-only transactions) In-Reply-To: <917186682.821262613735393.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-2556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Tully resolved AMQ-2556. ----------------------------- Resolution: Fixed Fix Version/s: 5.4.0 thanks for the great test case, issue resolved on trunk in r930135 state on the client, broker and failover transport needed to be reclaimed on prepare readonly. > Memory leaks with XA Transactions (case of read-only transactions) > ------------------------------------------------------------------ > > Key: AMQ-2556 > URL: https://issues.apache.org/activemq/browse/AMQ-2556 > 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 11.1.0.7.0) > Reporter: Daniel Santos > Assignee: Gary Tully > Fix For: 5.4.0 > > Attachments: XAConsumer.zip > > > 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 : > - {{org.apache.activemq.broker.TransportConnection}} 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 http://fisheye6.atlassian.com/browse/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java?r=809940#l175)_ -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.