Bug 473298 - cluster_test memory leak
Summary: cluster_test memory leak
Keywords:
Status: CLOSED DUPLICATE of bug 520600
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 1.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: 1.3
: ---
Assignee: Alan Conway
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-27 15:35 UTC by Frantisek Reznicek
Modified: 2015-11-16 00:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-03 20:24:45 UTC


Attachments (Terms of Use)

Description Frantisek Reznicek 2008-11-27 15:35:20 UTC
Description of problem:
cluster_test (part of make check when cluster configured using openais service) sometimes dumps the valgring memory leak.

Version-Release number of selected component (if applicable):
tested on revisions 721111 and 720809

How reproducible:
40-60%

Steps to Reproduce:
0. install openais-devel openais and setup openais.conf
1. service openais start
2. check-out the qpid source tree
3. cd qpid.../cpp && ./bootstrap && make && make check
4. check the logfile / transcript
  
Actual results:
Running 12 test cases...

0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************

*** No errors detected
==23211==      possibly lost: 320 bytes in 1 blocks.
Valgrind error log in cluster_test.vglog.23211.
==23211== Memcheck, a memory error detector.
==23211== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==23211== Using LibVEX rev 1658, a library for dynamic binary translation.
==23211== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==23211== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
==23211== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==23211== For more details, rerun with: -v
==23211==
==23211== My PID = 23211, parent PID = 23205.  Prog and args are:
==23211==    /root/cluster_test/qpid-trunk/cpp/src/tests/.libs/lt-cluster_test
==23211==
==23211==
==23211== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 467 from 2)
==23211== malloc/free: in use at exit: 10,000 bytes in 19 blocks.
==23211== malloc/free: 48,882 allocs, 48,863 frees, 116,112,280 bytes allocated.
==23211== For counts of detected errors, rerun with: -v
==23211== searching for pointers to 19 not-freed blocks.
==23211== checked 11,265,360 bytes.
{
   <insert a suppression name here>
   Memcheck:Leak
   fun:_vgrZU_libcZdsoZa_malloc
   fun:_vgrZU_libcZdsoZa_realloc
   obj:/usr/lib64/openais/libcpg.so.2.0.0
   fun:cpg_initialize
   fun:_ZN4qpid7cluster3CpgC1ERNS1_7HandlerE
   fun:_ZN4qpid7cluster7ClusterC1ERKSsRKNS_3UrlERNS_6broker6BrokerEb
   fun:_ZN4qpid7cluster13ClusterPlugin10initializeERNS_6Plugin6TargetE
   fun:_ZN4qpid6broker6BrokerC1ERKNS1_7OptionsE
   fun:_ZN4qpid6broker6Broker6createERKNS1_7OptionsE
   fun:_ZN14ClusterFixture8addLocalEv
   fun:_ZN14ClusterFixture3addEv
   fun:_ZN14ClusterFixtureC1Emi
   fun:_Z19testSequenceOptionsv
   fun:_ZN5boost9unit_test9ut_detail16callback0_impl_tINS1_6unusedEPFvvEE6invokeEv
   obj:/usr/lib64/libboost_unit_test_framework.so.1.33.1
   fun:_ZN5boost17execution_monitor13catch_signalsERKNS_9unit_test9callback0IiEEbi
   fun:_ZN5boost17execution_monitor7executeERKNS_9unit_test9callback0IiEEbi
   fun:_ZN5boost9unit_test19unit_test_monitor_t21execute_and_translateERKNS0_9test_caseE
   fun:_ZN5boost9unit_test14framework_impl5visitERKNS0_9test_caseE
   fun:_ZN5boost9unit_test18traverse_test_treeERKNS0_10test_suiteERNS0_17test_tree_visitorE
   fun:_ZN5boost9unit_test18traverse_test_treeERKNS0_10test_suiteERNS0_17test_tree_visitorE
   fun:_ZN5boost9unit_test9framework3runEmb
   fun:main
}
==23211==
==23211== 320 bytes in 1 blocks are possibly lost in loss record 2 of 3
==23211==    at 0x4A04B32: calloc (vg_replace_malloc.c:279)
==23211==    by 0x325D40FEF2: _dl_allocate_tls (dl-tls.c:304)
==23211==    by 0x325E406A33: pthread_create@@GLIBC_2.2.5 (allocatestack.c:517)
==23211==    by 0x5B1B459: qpid::sys::Thread::Thread(qpid::sys::Runnable*) (Thread.cpp:44)
==23211==    by 0x4C6FECD: qpid::client::TCPConnector::init() (Connector.cpp:226)
==23211==    by 0x4C694A6: qpid::client::ConnectionImpl::open() (ConnectionImpl.cpp:111)
==23211==    by 0x4C5ABA8: qpid::client::Connection::open(qpid::client::ConnectionSettings const&) (Connection.cpp:117)
==23211==    by 0x4C5B2AD: qpid::client::Connection::open(std::string const&, int, std::string const&, std::string const&, std::string const&, unsigned short) (Connection.cpp:95)
==23211==    by 0x429551: ClientT<LocalConnection, qpid::client::Session_0_10>::ClientT(unsigned short, std::string const&) (BrokerFixture.h:74)
==23211==    by 0x41190C: testUnsupported() (cluster_test.cpp:242)
==23211==    by 0x423123: boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() (callback.hpp:56)
==23211==    by 0x5E22380: (within /usr/lib64/libboost_unit_test_framework.so.1.33.1)
==23211==    by 0x5E1470C: boost::execution_monitor::catch_signals(boost::unit_test::callback0<int> const&, bool, int) (in /usr/lib64/libboost_unit_test_framework.so.1.33.1)
==23211==    by 0x5E1480F: boost::execution_monitor::execute(boost::unit_test::callback0<int> const&, bool, int) (in /usr/lib64/libboost_unit_test_framework.so.1.33.1)
==23211==    by 0x5E22469: boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::unit_test::test_case const&) (in /usr/lib64/libboost_unit_test_framework.so.1.33.1)
==23211==    by 0x5E17406: boost::unit_test::framework_impl::visit(boost::unit_test::test_case const&) (in /usr/lib64/libboost_unit_test_framework.so.1.33.1)
==23211==    by 0x5E2967A: boost::unit_test::traverse_test_tree(boost::unit_test::test_suite const&, boost::unit_test::test_tree_visitor&) (in /usr/lib64/libboost_unit_test_framework.so.1.33.1)
==23211==    by 0x5E2967A: boost::unit_test::traverse_test_tree(boost::unit_test::test_suite const&, boost::unit_test::test_tree_visitor&) (in /usr/lib64/libboost_unit_test_framework.so.1.33.1)
==23211==    by 0x5E16597: boost::unit_test::framework::run(unsigned long, bool) (in /usr/lib64/libboost_unit_test_framework.so.1.33.1)
==23211==    by 0x5E22194: main (in /usr/lib64/libboost_unit_test_framework.so.1.33.1)
{
   <insert a suppression name here>
   Memcheck:Leak
   fun:_vgrZU_libcZdsoZa_calloc
   fun:_dl_allocate_tls
   fun:pthread_create@@GLIBC_2.2.5
   fun:_ZN4qpid3sys6ThreadC1EPNS0_8RunnableE
   fun:_ZN4qpid6client12TCPConnector4initEv
   fun:_ZN4qpid6client14ConnectionImpl4openEv
   fun:_ZN4qpid6client10Connection4openERKNS0_18ConnectionSettingsE
   fun:_ZN4qpid6client10Connection4openERKSsiS3_S3_S3_t
   fun:_ZN7ClientTI15LocalConnectionN4qpid6client12Session_0_10EEC1EtRKSs
   fun:_Z15testUnsupportedv
   fun:_ZN5boost9unit_test9ut_detail16callback0_impl_tINS1_6unusedEPFvvEE6invokeEv
   obj:/usr/lib64/libboost_unit_test_framework.so.1.33.1
   fun:_ZN5boost17execution_monitor13catch_signalsERKNS_9unit_test9callback0IiEEbi
   fun:_ZN5boost17execution_monitor7executeERKNS_9unit_test9callback0IiEEbi
   fun:_ZN5boost9unit_test19unit_test_monitor_t21execute_and_translateERKNS0_9test_caseE
   fun:_ZN5boost9unit_test14framework_impl5visitERKNS0_9test_caseE
   fun:_ZN5boost9unit_test18traverse_test_treeERKNS0_10test_suiteERNS0_17test_tree_visitorE
   fun:_ZN5boost9unit_test18traverse_test_treeERKNS0_10test_suiteERNS0_17test_tree_visitorE
   fun:_ZN5boost9unit_test9framework3runEmb
   fun:main
}
{
   <insert a suppression name here>
   Memcheck:Leak
   fun:_vgrZU_libcZdsoZa_malloc
   fun:fdopen@@GLIBC_2.2.5
   fun:_ZN12ForkedBroker4initERKSt6vectorIPKcSaIS2_EE
   fun:_ZN14ClusterFixture3addEv
   fun:_ZN14ClusterFixtureC1Emi
   fun:_Z13DumpConsumersv
   fun:_ZN5boost9unit_test9ut_detail16callback0_impl_tINS1_6unusedEPFvvEE6invokeEv
   obj:/usr/lib64/libboost_unit_test_framework.so.1.33.1
   fun:_ZN5boost17execution_monitor13catch_signalsERKNS_9unit_test9callback0IiEEbi
   fun:_ZN5boost17execution_monitor7executeERKNS_9unit_test9callback0IiEEbi
   fun:_ZN5boost9unit_test19unit_test_monitor_t21execute_and_translateERKNS0_9test_caseE
   fun:_ZN5boost9unit_test14framework_impl5visitERKNS0_9test_caseE
   fun:_ZN5boost9unit_test18traverse_test_treeERKNS0_10test_suiteERNS0_17test_tree_visitorE
   fun:_ZN5boost9unit_test18traverse_test_treeERKNS0_10test_suiteERNS0_17test_tree_visitorE
   fun:_ZN5boost9unit_test9framework3runEmb
   fun:main
}
==23211==
==23211== LEAK SUMMARY:
==23211==    definitely lost: 0 bytes in 0 blocks.
==23211==      possibly lost: 320 bytes in 1 blocks.
==23211==    still reachable: 9,680 bytes in 18 blocks.
==23211==         suppressed: 0 bytes in 0 blocks.
==23211== Reachable blocks (those to which a pointer was found) are not shown.
==23211== To see them, rerun with: --show-reachable=yes
Found memory leaks (see log file, cluster_test.vglog.23211); see above.
FAIL: ais_check


Expected results:
no valgrind issue is expected.

Comment 1 Gordon Sim 2008-12-02 14:29:42 UTC
Not hugely important; doesn't show up very often (e.g. I've never seen it) will focus on more critical issues for 1.1 and pick this up in 1.1.1.

Comment 2 Alan Conway 2009-09-03 20:24:45 UTC

*** This bug has been marked as a duplicate of bug 520600 ***


Note You need to log in before you can comment on or make changes to this bug.