Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 47213 invoked from network); 3 Jun 2007 18:56:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jun 2007 18:56:57 -0000 Received: (qmail 7416 invoked by uid 500); 3 Jun 2007 18:57:01 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 7279 invoked by uid 500); 3 Jun 2007 18:57:01 -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 7269 invoked by uid 99); 3 Jun 2007 18:57:00 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2007 11:57:00 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2007 11:56:54 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 33905714187 for ; Sun, 3 Jun 2007 11:56:34 -0700 (PDT) Message-ID: <1047481.1180896994208.JavaMail.jira@brutus> Date: Sun, 3 Jun 2007 11:56:34 -0700 (PDT) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQCPP-121) Possible memory leak in activemq::transport::IOTransport::run In-Reply-To: <6560549.1180824452850.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQCPP-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39204 ] Timothy Bish commented on AMQCPP-121: ------------------------------------- I made a small tweak to the fire function, it will delete the command if it catches anything, give that a shot. > Possible memory leak in activemq::transport::IOTransport::run > ------------------------------------------------------------- > > Key: AMQCPP-121 > URL: https://issues.apache.org/activemq/browse/AMQCPP-121 > Project: ActiveMQ C++ Client > Issue Type: Bug > Affects Versions: 2.1 > Reporter: Albert Strasheim > Assignee: Nathan Mittler > Fix For: 2.1 > > > There might be a memory leak in activemq::transport::IOTransport::run. > Valgrind says: > ==20739== 20 bytes in 1 blocks are definitely lost in loss record 126 of 175 > ==20739== at 0x4005BA5: operator new(unsigned) (vg_replace_malloc.c:163) > ==20739== by 0x4776995: activemq::connector::openwire::marshal::v2::ResponseMarshaller::createObject() const (ResponseMarshaller.cpp:40) > ==20739== by 0x46A433B: activemq::connector::openwire::OpenWireFormat::doUnmarshal(activemq::io::DataInputStream*) (OpenWireFormat.cpp:239) > ==20739== by 0x46A48C9: activemq::connector::openwire::OpenWireFormat::unmarshal(activemq::io::DataInputStream*) (OpenWireFormat.cpp:185) > ==20739== by 0x46A6E5D: activemq::connector::openwire::OpenWireCommandReader::readCommand() (OpenWireCommandReader.cpp:71) > ==20739== by 0x46D3857: activemq::transport::IOTransport::run() (IOTransport.cpp:166) > ==20739== by 0x4667DE7: activemq::concurrent::Thread::runCallback(void*) (Thread.cpp:152) > ==20739== by 0x4963DA: start_thread (in /lib/libpthread-2.5.so) > ==20739== by 0x3F026D: clone (in /lib/libc-2.5.so) > The code looks like this: > void IOTransport::run(){ > try{ > while( !closed ){ > Command* command = reader->readCommand(); > fire( command ); > } > } > catch( exceptions::ActiveMQException& ex ){ /*...*/ } > catch( ... ){ /*...*/ } > } > What might be happening here is that readCommand succeeds but that fire throws an exception for some reason. If this happens, command won't be freed. > Not quite sure under what circumstances this happens. If you're not convinced, I can try to narrow down the code that causes the leak. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.