Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 49491 invoked from network); 10 Feb 2009 20:30:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Feb 2009 20:30:22 -0000 Received: (qmail 48674 invoked by uid 500); 10 Feb 2009 20:30:21 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 48650 invoked by uid 500); 10 Feb 2009 20:30:21 -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 48638 invoked by uid 99); 10 Feb 2009 20:30:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2009 12:30:21 -0800 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; Tue, 10 Feb 2009 20:30:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8BB7D234C4B3 for ; Tue, 10 Feb 2009 12:30:00 -0800 (PST) Message-ID: <605841785.1234297800570.JavaMail.jira@brutus> Date: Tue, 10 Feb 2009 12:30:00 -0800 (PST) From: "Trevor Pounds (JIRA)" To: dev@activemq.apache.org Subject: [jira] Created: (AMQ-2103) Memory leak when marshaling ActiveMQTextMessage to persistence store MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Memory leak when marshaling ActiveMQTextMessage to persistence store -------------------------------------------------------------------- Key: AMQ-2103 URL: https://issues.apache.org/activemq/browse/AMQ-2103 Project: ActiveMQ Issue Type: Bug Components: Broker Affects Versions: 5.2.0 Reporter: Trevor Pounds 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.