Ok,
I managed to reproduce the problem.
I wrote an absolutely arbitrary piece of code which is allocating and deallocating a vector of Int_t.
I do an extremely large cycle and I obtain something very similar to what shown before.
root freezes after 5 minutes and the backtrace is shown later.
Please keep in mind that this code is not related to any of my previous macros.
My idea was just to do a large number of allocations and deallocations of memory because I felt this is a point where my root is having troubles.
(not sure this is the correct interpretation but nevertheless I get the same behaviour and backtrace)
Thanks a lot!
Francesco
#include “TROOT.h”
#include
#include
#include “TH1F.h”
#include
void TestMacroDebug(Float_t normFlag){
gROOT->Reset();
for(Float_t i=0;i<normFlag;i++)
{
vector<Int_t> cat;
for(Int_t ii=0;ii<10;ii++)
cat.push_back(ii);
if(i==1e7)
{
cout<<i<<endl;
for(Int_t ii=0;ii<10;ii++)
cout<<cat[ii]<<endl;
}
cat.erase(cat.begin(),cat.begin()+10);
}
}
root [0] .L TestMacroDebug.cc+
Info in TUnixSystem::ACLiC: creating shared library /mnt/data/corsika/v740/corsika-74000/run/./TestMacroDebug_cc.so
root [1] TestMacroDebug(1e9)
1e+07
0
1
2
3
4
5
6
7
8
9
^C
Program received signal SIGINT, Interrupt.
__lll_lock_wait_private () at …/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
95 …/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: No such file or directory.
(gdb) backtrace
#0 __lll_lock_wait_private () at …/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
#1 0x00007ffff6b4fdca in _L_lock_12779 () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff6b4d7a5 in __GI___libc_malloc (bytes=537) at malloc.c:2887
#3 0x00007ffff7322dad in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff737e209 in std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff737edcb in std::string::_Rep::_M_clone(std::allocator const&, unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff737ee64 in std::string::reserve(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007ffff735d1d6 in std::basic_stringbuf<char, std::char_traits, std::allocator >::overflow(int) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#8 0x00007ffff73613f6 in std::basic_streambuf<char, std::char_traits >::xsputn(char const*, long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9 0x00007ffff734d41d in std::ostreambuf_iterator<char, std::char_traits > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::_M_insert_int(std::ostreambuf$
#10 0x00007ffff734d60d in std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::do_put(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, unsigned long)$
#11 0x00007ffff73592ce in std::ostream& std::ostream::_M_insert(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#12 0x00007ffff7ab3cc8 in textinput::TerminalDisplayUnix::HandleResizeSignal() () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCore.so
#13
#14 0x00007ffff6b4b32d in _int_malloc (av=0x7ffff6e89760 <main_arena>, bytes=16) at malloc.c:3355
#15 0x00007ffff6b4d7b0 in __GI___libc_malloc (bytes=16) at malloc.c:2891
#16 0x00007ffff7322dad in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#17 0x00007ffff79a1b44 in void std::vector<int, std::allocator >::_M_emplace_back_aux<int const&>(int const&) () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCore.so
#18 0x00007fffeb7c14ea in TestMacroDebug(float) () from /mnt/data/corsika/v740/corsika-74000/run/TestMacroDebug_cc.so
#19 0x00007fffe9169050 in ?? ()
#20 0x0000000001794c18 in ?? ()
#21 0x00007fffffffba90 in ?? ()
#22 0x00007fffffffb810 in ?? ()
#23 0x00007ffff362d324 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCling.so
#24 0x00007ffff3630e4a in cling::Interpreter::EvaluateInternal(std::string const&, cling::CompilationOptions, cling::Value*, cling::Transaction**) ()
from /mnt/data/root_6.04_06/root-6.04.06//lib/libCling.so
#25 0x00007ffff3630fa3 in cling::Interpreter::process(std::string const&, cling::Value*, cling::Transaction**) () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCling.so
#26 0x00007ffff366da73 in cling::MetaProcessor::process(char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCling.so
#27 0x00007ffff3546406 in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCling.so
#28 0x00007ffff79a62e0 in TApplication::ProcessLine(char const*, bool, int*) () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCore.so
#29 0x00007ffff75d800f in TRint::ProcessLineNr(char const*, char const*, int*) () from /mnt/data/root_6.04_06/root-6.04.06//lib/libRint.so
#30 0x00007ffff75d8321 in TRint::HandleTermInput() () from /mnt/data/root_6.04_06/root-6.04.06//lib/libRint.so
#31 0x00007ffff7a823a5 in TUnixSystem::CheckDescriptors() () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCore.so
#32 0x00007ffff7a8333a in TUnixSystem::DispatchOneEvent(bool) () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCore.so
#33 0x00007ffff7a03a76 in TSystem::InnerLoop() () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCore.so
#34 0x00007ffff7a04680 in TSystem::Run() () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCore.so
#35 0x00007ffff79a473f in TApplication::Run(bool) () from /mnt/data/root_6.04_06/root-6.04.06//lib/libCore.so
#36 0x00007ffff75d9888 in TRint::Run(bool) () from /mnt/data/root_6.04_06/root-6.04.06//lib/libRint.so
#37 0x000000000040103c in main ()