You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2010/02/12 14:31:34 UTC

[jira] Commented: (AMQCPP-286) Memory leak when adding connection.sendTimeout=3000 to a failover transport

    [ https://issues.apache.org/activemq/browse/AMQCPP-286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57558#action_57558 ] 

Timothy Bish commented on AMQCPP-286:
-------------------------------------

There are several memory leak fixes in the 3.1.x fixes branch, I'd recommend giving that a try,

> Memory leak when adding connection.sendTimeout=3000 to a failover transport
> ---------------------------------------------------------------------------
>
>                 Key: AMQCPP-286
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-286
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 3.1
>         Environment: Ubuntu 9.10 with self-compiled ActiveMQ-CPP 3.1.0
>            Reporter: Martin Carpella
>            Assignee: Timothy Bish
>
> When adding a connection.sendTimeout to a failover transport, a memory leak will occur. 
> In the sample program provided on the homepage, the following broker caused the problem:
> std::string brokerURI = "failover://(tcp://localhost:61616)?connection.sendTimeout=3000";
> Valgrind reports the following losses (only parts with "definitely lost" included):
> ==20454== 800 bytes in 100 blocks are definitely lost in loss record 26 of 39
> ==20454==    at 0x4025390: operator new(unsigned int) (vg_replace_malloc.c:214)
> ==20454==    by 0x4317196: activemq::core::ActiveMQSession::send(cms::Message*, activemq::core::ActiveMQProducer*, activemq::util::Usage*) (Pointer.h:45)
> ==20454==    by 0x430BBBE: activemq::core::ActiveMQProducer::send(cms::Destination const*, cms::Message*, int, int, long long) (ActiveMQProducer.cpp:197)
> ==20454==    by 0x430A512: activemq::core::ActiveMQProducer::send(cms::Message*, int, int, long long) (ActiveMQProducer.cpp:118)
> ==20454==    by 0x8049CB2: SimpleProducer::run() (main.cpp:139)
> ==20454==    by 0x80492FE: main (main.cpp:264)
> ==20454== 86,887 (35,600 direct, 51,287 indirect) bytes in 100 blocks are definitely lost in loss record 39 of 39
> ==20454==    at 0x4025390: operator new(unsigned int) (vg_replace_malloc.c:214)
> ==20454==    by 0x4281245: activemq::commands::ActiveMQTextMessage::cloneDataStructure() const (ActiveMQTextMessage.cpp:54)
> ==20454==    by 0x42840A0: covariant return thunk to activemq::commands::ActiveMQTextMessage::cloneDataStructure() const (ActiveMQTextMessage.cpp:189)
> ==20454==    by 0x4317188: activemq::core::ActiveMQSession::send(cms::Message*, activemq::core::ActiveMQProducer*, activemq::util::Usage*) (ActiveMQSession.cpp:708)
> ==20454==    by 0x430BBBE: activemq::core::ActiveMQProducer::send(cms::Destination const*, cms::Message*, int, int, long long) (ActiveMQProducer.cpp:197)
> ==20454==    by 0x430A512: activemq::core::ActiveMQProducer::send(cms::Message*, int, int, long long) (ActiveMQProducer.cpp:118)
> ==20454==    by 0x8049CB2: SimpleProducer::run() (main.cpp:139)
> ==20454==    by 0x80492FE: main (main.cpp:264)
> Using the URI
> std::string brokerURI = "failover://(tcp://localhost:61616)";
> doesn't produce any "definitly lost" or "indirectly lost" records.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.