Hi all,
I need some experts help to understand the output of valgrind and try to
fix some memory leaks.
Currently I’m using an application that uses roofit libraries (ROOT) to
perform a CP fit. The executable is currently showing a big memory leak
problem: when trying to analyze O(10k)events I end up with more than 3GB
of swap memory and my job crashes.
I wanted to understand the source of this leak (if the fault is mine and I
can fix something or if I need to file a bug report), and I’ve used
valgrind to run a job on few events…
I’m appending below some error messages I see.
I’d like advice on how to understand those errors:
are due to a bad implementation of my executable or should I ask
(ROOT RooFit) developers about them?
The full log is attached…
Any help on how to deal with so many problems [and how to spot the most
serious ones] will be greatly appreciated.
Thanks and cheers,
alessio
PS I’m going to cc this email also to ROOT forums…
The first big problem I see is related to
==6619==
==6619== 883,479 bytes in 22,951 blocks are possibly lost in loss record
108 of 313
==6619== at 0x4005835: operator new
(vg_replace_malloc.c:195)
==6619== by 0x41B6E88: TStringRef::GetRep(int, int) (in
/home/Packages/root/lib/libCore.so)
==6619== by 0x41B75BC: TString::TString(char const*) (in
/home/Packages/root/lib/libCore.so)
==6619== by 0x41F28B7: TClassTable::Add(char const*, short,
std::type_info const&, void ()(), int) (in
/home/Packages/root/lib/libCore.so)
==6619== by 0x41F2965: ROOT::AddClass(char const, short,
std::type_info const&, void ()(), int) (in
/home/Packages/root/lib/libCore.so)
==6619== by 0x422F4DB: ROOT::TDefaultInitBehavior::Register(char
const, short, std::type_info const&, void ()(), int) const (in
/home/Packages/root/lib/libCore.so)
==6619== by 0x422E630: ROOT::TGenericClassInfo::Init(int) (in
/home/Packages/root/lib/libCore.so)
==6619== by 0x422EAF5: ROOT::TGenericClassInfo::TGenericClassInfo(char
const, char const*, int, std::type_info const&, ROOT::TInitBehavior
const*, void*, void ()(), TVirtualIsAProxy, int, int) (in
/home/Packages/root/lib/libCore.so)
==6619== by 0x671D9D7:
ROOT::GenerateInitInstanceLocal(ROOT::Math::Cartesian3D const*)
(in /home/Packages/root/lib/libMathCore.so)
==6619== by 0x6721C0E: __static_initialization_and_destruction_0(int,
int) (in /home/Packages/root/lib/libMathCore.so)
==6619== by 0x6721D90:
_GLOBAL__I__ZN4ROOT53ROOTcLcLMathcLcLCartesian3DlEDouble32_tgR_ShowMembersEPvR16TMemberInspectorPc
(in /home/Packages/root/lib/libMathCore.so)
==6619== by 0x6765B65: (within /home/Packages/root/lib/libMathCore.so)
The second one to
==6619== 624,312 bytes in 78 blocks are possibly lost in loss record 308
of 313
==6619== at 0x4005835: operator new
(vg_replace_malloc.c:195)
==6619== by 0x4CFD4BA: TFormula::Compile(char const*) (in
/home/Packages/root/lib/libHist.so)
==6619== by 0x6005B82: RooFormula::RooFormula(char const*, char const*,
RooArgList const&) (in /home/Packages/root/lib/libRooFit.so)
==6619== by 0x6007657: RooFormulaVar::formula() const (in
/home/Packages/root/lib/libRooFit.so)
==6619== by 0x60077D0: RooFormulaVar::evaluate() const (in
/home/Packages/root/lib/libRooFit.so)
==6619== by 0x5F9BE51: RooAbsReal::traceEval(RooArgSet const*) const
(in /home/Packages/root/lib/libRooFit.so)
==6619== by 0x5F9BF6D: RooAbsReal::getVal(RooArgSet const*) const (in
/home/Packages/root/lib/libRooFit.so)
==6619== by 0x5FFFB5C: RooExtendPdf::expectedEvents(RooArgSet const*)
const (in /home/Packages/root/lib/libRooFit.so)
==6619== by 0x6062B19: RooProdPdf::expectedEvents(RooArgSet const*)
const (in /home/Packages/root/lib/libRooFit.so)
==6619== by 0x6062B19: RooProdPdf::expectedEvents(RooArgSet const*)
const (in /home/Packages/root/lib/libRooFit.so)
==6619== by 0x5FB548A: RooAddPdf::expectedEvents(RooArgSet const*)
const (in /home/Packages/root/lib/libRooFit.so)
==6619== by 0x5FB548A: RooAddPdf::expectedEvents(RooArgSet const*)
const (in /home/Packages/root/lib/libRooFit.so)
MemoryLeak.txt (190 KB)