Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 14623 invoked from network); 14 Oct 2010 11:26:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Oct 2010 11:26:06 -0000 Received: (qmail 37096 invoked by uid 500); 14 Oct 2010 11:26:06 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 36882 invoked by uid 500); 14 Oct 2010 11:26:03 -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 36874 invoked by uid 99); 14 Oct 2010 11:26:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 11:26:02 +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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 11:26:02 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9EBPehC006851 for ; Thu, 14 Oct 2010 11:25:41 GMT Message-ID: <26238554.56781287055540863.JavaMail.jira@thor> Date: Thu, 14 Oct 2010 07:25:40 -0400 (EDT) From: "Gary Tully (JIRA)" To: dev@activemq.apache.org Subject: [jira] Resolved: (AMQ-2103) Memory leak when marshaling ActiveMQTextMessage to persistent store In-Reply-To: <605841785.1234297800570.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/AMQ-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Tully resolved AMQ-2103. ----------------------------- Resolution: Fixed resolving. addressing any further limitations to the memory usage tracking as it pertains to actual jvm usage will be punted to 6.0 > Memory leak when marshaling ActiveMQTextMessage to persistent store > ------------------------------------------------------------------- > > Key: AMQ-2103 > URL: https://issues.apache.org/activemq/browse/AMQ-2103 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.0.0 > Environment: ActiveMQ 5.0.0.20-fuse > Reporter: Trevor Pounds > Assignee: Gary Tully > Fix For: 5.5.0 > > Attachments: AMQ-2103.diff, Duplicate Message Data (Internal Marshalling).png, heap_100_1MB_messages.png, jhat_ActiveMQTextMessage_0xe837a478.htm, jhat_ByteSequence_0xe837a5c0.htm, jhat_ByteSequence_data_0xe837adb0.htm > > > When an org.apache.activemq.command.ActiveMQTextMessage is marshaled into the persistence store some portion of the messages are stored in memory (i.e. pending cursor/consumer dispatch queue). The messages stored in memory have the potential to cause the broker to run out of memory because org.apache.activemq.command.ActiveMQTextMessage objects can store the data twice, once in the 'text' field and once in the 'content' field. Normally this isn't a problem since the 'content' field is cleared when the message is being used in a client application (i.e. by calling getText() clears content). The problem occurs when a consumer is slow and a large number of messages are sitting around on the broker in pending/dispatch memory space. The message is marshaled for the store and then persisted to disk and copied to pending memory when space is available. > This bug affects any ActiveMQ*Message object that does not clear its temporary data (i.e. 'text' field) once it has been marshaled. When a message is marshaled we should null the derived objects memory space once the data has been written to the parent object's 'content' field. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.