Memory leak in test_xmpp_discovery

Bug #1349308 reported by Praveen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenContrail
Fix Committed
High
Manish Singh

Bug Description

Leak check _main_ detected leaks of 480 bytes in 5 objects
The 5 largest leaks:
Using local file /home/praveen/ctrlplane/build/debug/vnsw/agent/test/test_xmpp_discovery.
Leak of 232 bytes in 1 objects allocated from:
 @ 1629c07 curl_docalloc
 @ 162d270 curl_multi_init
 @ 1752cd7 curl_init
 @ 1749b9c HttpClient::Init
 @ 121f697 MetadataProxy::MetadataProxy
 @ 1204eef ServicesModule::Init
 @ 11d27c9 TestAgentInit::InitModules
 @ 11d30f8 TestAgentInit::Run
 @ 11d51a6 boost::_mfi::mf0::operator
 @ 11d4f7f boost::_bi::list1::operator
 @ 11d4e8f boost::_bi::bind_t::operator
 @ 11d4de1 boost::detail::function::function_obj_invoker0::invoke
 @ 10e6fb0 boost::function0::operator
 @ 1877beb TaskTrigger::WorkerTask::Run
 @ 186648d TaskImpl::execute
 @ 7f32e4b91ece tbb:
Leak of 96 bytes in 1 objects allocated from:
 @ 1629c07 curl_docalloc
 @ 1640701 Curl_mk_connc
 @ 162d2e5 curl_multi_init
 @ 1752cd7 curl_init
 @ 1749b9c HttpClient::Init
 @ 121f697 MetadataProxy::MetadataProxy
 @ 1204eef ServicesModule::Init
 @ 11d27c9 TestAgentInit::InitModules
 @ 11d30f8 TestAgentInit::Run
 @ 11d51a6 boost::_mfi::mf0::operator
 @ 11d4f7f boost::_bi::list1::operator
 @ 11d4e8f boost::_bi::bind_t::operator
 @ 11d4de1 boost::detail::function::function_obj_invoker0::invoke
 @ 10e6fb0 boost::function0::operator
 @ 1877beb TaskTrigger::WorkerTask::Run
 @ 186648d TaskImpl::exec
Leak of 64 bytes in 1 objects allocated from:
 @ 1629ae6 curl_domalloc
 @ 162c806 Curl_hash_alloc
 @ 162d1f8 sh_init
 @ 162d2b9 curl_multi_init
 @ 1752cd7 curl_init
 @ 1749b9c HttpClient::Init
 @ 121f697 MetadataProxy::MetadataProxy
 @ 1204eef ServicesModule::Init
 @ 11d27c9 TestAgentInit::InitModules
 @ 11d30f8 TestAgentInit::Run
 @ 11d51a6 boost::_mfi::mf0::operator
 @ 11d4f7f boost::_bi::list1::operator
 @ 11d4e8f boost::_bi::bind_t::operator
 @ 11d4de1 boost::detail::function::function_obj_invoker0::invoke
 @ 10e6fb0 boost::function0::operator
 @ 1877beb TaskTrigger::WorkerTask::Run
 @ 1
Leak of 48 bytes in 1 objects allocated from:
 @ 1629ae6 curl_domalloc
 @ 16506c7 Curl_llist_alloc
 @ 162d30c curl_multi_init
 @ 1752cd7 curl_init
 @ 1749b9c HttpClient::Init
 @ 121f697 MetadataProxy::MetadataProxy
 @ 1204eef ServicesModule::Init
 @ 11d27c9 TestAgentInit::InitModules
 @ 11d30f8 TestAgentInit::Run
 @ 11d51a6 boost::_mfi::mf0::operator
 @ 11d4f7f boost::_bi::list1::operator
 @ 11d4e8f boost::_bi::bind_t::operator
 @ 11d4de1 boost::detail::function::function_obj_invoker0::invoke
 @ 10e6fb0 boost::function0::operator
 @ 1877beb TaskTrigger::WorkerTask::Run
 @ 186648d TaskImpl::e
Leak of 40 bytes in 1 objects allocated from:
 @ 1629c07 curl_docalloc
 @ 16406d2 Curl_mk_connc
 @ 162d2e5 curl_multi_init
 @ 1752cd7 curl_init
 @ 1749b9c HttpClient::Init
 @ 121f697 MetadataProxy::MetadataProxy
 @ 1204eef ServicesModule::Init
 @ 11d27c9 TestAgentInit::InitModules
 @ 11d30f8 TestAgentInit::Run
 @ 11d51a6 boost::_mfi::mf0::operator
 @ 11d4f7f boost::_bi::list1::operator
 @ 11d4e8f boost::_bi::bind_t::operator
 @ 11d4de1 boost::detail::function::function_obj_invoker0::invoke
 @ 10e6fb0 boost::function0::operator
 @ 1877beb TaskTrigger::WorkerTask::Run
 @ 186648d TaskImpl::exec

If the preceding stack traces are not enough to find the leaks, try running THIS shell command:

pprof /home/praveen/ctrlplane/build/debug/vnsw/agent/test/test_xmpp_discovery "/tmp/test_xmpp_discovery.19842._main_-end.heap" --inuse_objects --lines --heapcheck --edgefraction=1e-10 --nodefraction=1e-10 --gv

If you are still puzzled about why the leaks are there, try rerunning this program with HEAP_CHECK_TEST_POINTER_ALIGNMENT=1 and/or with HEAP_CHECK_MAX_POINTER_OFFSET=-1
If the leak report occurs in a small fraction of runs, try running with TCMALLOC_MAX_FREE_QUEUE_SIZE of few hundred MB
Exiting with error code (instead of crashing) because of whole-program memory leaks

Tags: vrouter
Revision history for this message
Manish Singh (manishs) wrote :
Changed in opencontrail:
status: New → Fix Committed
tags: added: vrouter
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.