[
https://issues.apache.org/activemq/browse/AMQCPP-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38020
]
Albert Strasheim commented on AMQCPP-58:
----------------------------------------
After applying socketleak1.diff, I still see a leak when I start the broker,
then start leaker, then kill the broker, then start the broker. The
reconnection that happens at this points seems to cause a leak somehow.
Valgrind says:
{noformat}
==3855== 20,316 (28 direct, 20,288 indirect) bytes in 1 blocks are definitely
lost in loss record 29 of 60
==3855== at 0x4005BA5: operator new(unsigned) (vg_replace_malloc.c:163)
==3855== by 0x80A43E2:
activemq::network::SocketFactory::createSocket(activemq::util::Properties
const&) (SocketFactory.cpp:96)
==3855== by 0x809EF05:
activemq::transport::TcpTransport::TcpTransport(activemq::util::Properties
const&, activemq::transport::Transport*, bool) (TcpTransport.cpp:42)
==3855== by 0x80716E2:
activemq::transport::TcpTransportFactory::createTransport(activemq::util::Properties
const&) (TcpTransportFactory.cpp:55)
==3855== by 0x804B4B5:
activemq::core::ActiveMQConnectionFactory::createConnection(std::string const&,
std::string const&, std::string const&) (ActiveMQConnectionFactory.cpp:130)
==3855== by 0x804B2B5:
activemq::core::ActiveMQConnectionFactory::createConnection()
(ActiveMQConnectionFactory.cpp:69)
==3855== by 0x804AC5D: main (main.cpp:29)
{noformat}
> Possible memory leak when reestablishing connection
> ---------------------------------------------------
>
> Key: AMQCPP-58
> URL: https://issues.apache.org/activemq/browse/AMQCPP-58
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: leaker.cpp, purify-example.txt, socketleak1.diff
>
>
> Brought over from AMQCPP-46.
> There seems to be a memory leak when running the example program from
> AMQCPP-46 which reconnects whenever the broker goes down.
> Valgrind says:
> {noformat}
> ==15493== 149,520 (89,712 direct, 59,808 indirect) bytes in 1,869 blocks are
> definitely lost in loss record 55 of 55
> ==15493== at 0x4A19DE3: operator new(unsigned long)
> (vg_replace_malloc.c:168)
> ==15493== by 0x45DEDD:
> activemq::network::SocketFactory::createSocket(activemq::util::Properties
> const&) (SocketFactory.cpp:96)
> ==15493== by 0x458D0C:
> activemq::transport::TcpTransport::TcpTransport(activemq::util::Properties
> const&, activemq::transport::Transport*, bool) (TcpTransport.cpp:42)
> ==15493== by 0x42B3EE:
> activemq::transport::TcpTransportFactory::createTransport(activemq::util::Properties
> const&) (TcpTransportFactory.cpp:55)
> ==15493== by 0x404CC0:
> activemq::core::ActiveMQConnectionFactory::createConnection(std::string
> const&, std::string const&, std::string const&)
> (ActiveMQConnectionFactory.cpp:130)
> ==15493== by 0x4042D5:
> activemq::core::ActiveMQConnectionFactory::createConnection()
> (ActiveMQConnectionFactory.cpp:69)
> ==15493== by 0x403D67: main (main.cpp:30)
> {noformat}
> Purify also seems to indicate that there is a link, along with with possibly
> spurious leaks or leaks that might be related to the leak reported by
> Valgrind.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.