Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 74450 invoked from network); 10 Jun 2007 20:51:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jun 2007 20:51:56 -0000 Received: (qmail 78165 invoked by uid 500); 10 Jun 2007 20:52:00 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 78131 invoked by uid 500); 10 Jun 2007 20:52:00 -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 78120 invoked by uid 99); 10 Jun 2007 20:52:00 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jun 2007 13:52: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, 10 Jun 2007 13:51:53 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A1E537141F8 for ; Sun, 10 Jun 2007 13:51:33 -0700 (PDT) Message-ID: <24270924.1181508693658.JavaMail.jira@brutus> Date: Sun, 10 Jun 2007 13:51:33 -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_39256 ] Timothy Bish commented on AMQCPP-121: ------------------------------------- I've run this test on Linux on a Dual Core machine and can't repeat the leak. From the code there shouldn't be a thrid syncRequest call anywhere that I can see, so its really confusing me. If you can figure out who is making the third request it would help, I can't see anywhere that it should happen. Tricky one. > 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.