Hi,
I’m now trying to port my Belle2 DAQ software running with ROOT version 5.34 to ROOT version 6.04. The ROOT is running on Scientific Linux 5.7 / x86_64. The Linux kernel version is 2.6.18.
I am using TMapFile for the real-time histogram monitoring and it worked fine with previous version 5, but I found it crashes with version 6. The core dump shows:
Fatal in <operator delete>: storage area overwritten
aborting
#0 0x0000003a85e99dd5 in waitpid () from /lib64/libc.so.6
#1 0x0000003a85e3c4a1 in do_system () from /lib64/libc.so.6
#2 0x00002af3c1315152 in TUnixSystem::Exec (this=0x1fc48ab8, shellcmd=0x1fc8a588 "/home/usr/hltdaq/belle2/externals/v01-01-01/Linux_x86_64/debug/root/etc/gdb-backtrace.sh 13839 1>&2") at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/unix/src/TUnixSystem.cxx:2069
#3 0x00002af3c131599e in TUnixSystem::StackTrace (this=0x1fc48ab8) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/unix/src/TUnixSystem.cxx:2297
#4 0x00002af3c122377f in DefaultErrorHandler (level=6000, abort_bool=true, location=0x2af3c442de6c "operator delete", msg=0x1fc81a78 "storage area overwritten") at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/base/src/TError.cxx:194
#5 0x00002af3c1223a92 in ErrorHandler(Int_t, const char *, const char *, typedef __va_list_tag __va_list_tag *) (level=6000, location=0x2af3c442de6c "operator delete", fmt=0x2af3c442de30 "%s", ap=0x7fff7dc68538) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/base/src/TError.cxx:249
#6 0x00002af3c1223f7e in Fatal (location=0x2af3c442de6c "operator delete", fmt=0x2af3c442de30 "%s") at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/base/src/TError.cxx:345
#7 0x00002af3c442d366 in operator delete (ptr=0x1fc89e70) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/newdelete/src/NewDelete.cxx:270
#8 0x00002af3c5e7600b in clang::driver::toolchains::Linux::Linux(clang::driver::Driver const&, llvm::Triple const&, llvm::opt::ArgList const&) () from /home/usr/hltdaq/belle2/externals/v01-01-01/Linux_x86_64/debug/root/lib/libCling.so
#9 0x00002af3c5e4b9f7 in clang::driver::Driver::getToolChain(llvm::opt::ArgList const&, llvm::StringRef) const () from /home/usr/hltdaq/belle2/externals/v01-01-01/Linux_x86_64/debug/root/lib/libCling.so
#10 0x00002af3c5e541e2 in clang::driver::Driver::BuildCompilation(llvm::ArrayRef<char const*>) () from /home/usr/hltdaq/belle2/externals/v01-01-01/Linux_x86_64/debug/root/lib/libCling.so
#11 0x00002af3c5b9017d in (anonymous namespace)::createCIImpl (buffer=..., argc=8, argv=0x1fc7eca8, llvmdir=0x1fc7d680 "/home/usr/hltdaq/belle2/externals/v01-01-01/Linux_x86_64/debug/root/etc/cling", OnlyLex=false) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/interpreter/cling/lib/Interpreter/CIFactory.cpp:635
#12 0x00002af3c5b91131 in cling::CIFactory::createCI (code=..., argc=8, argv=0x1fc7eca8, llvmdir=0x1fc7d680 "/home/usr/hltdaq/belle2/externals/v01-01-01/Linux_x86_64/debug/root/etc/cling") at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/interpreter/cling/lib/Interpreter/CIFactory.cpp:798
#13 0x00002af3c5c4e2c0 in cling::IncrementalParser::IncrementalParser (this=0x1fc7ed08, interp=0x1fc7d4b8, argc=8, argv=0x1fc7eca8, llvmdir=0x1fc7d680 "/home/usr/hltdaq/belle2/externals/v01-01-01/Linux_x86_64/debug/root/etc/cling") at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:163
#14 0x00002af3c5c5a84b in cling::Interpreter::Interpreter (this=0x1fc7d4b8, argc=8, argv=0x1fc7d458, llvmdir=0x1fc7d680 "/home/usr/hltdaq/belle2/externals/v01-01-01/Linux_x86_64/debug/root/etc/cling", noRuntime=false) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/interpreter/cling/lib/Interpreter/Interpreter.cpp:185
#15 0x00002af3c59c5471 in TCling::TCling (this=0x1fc7cc38, name=0x2af3c7186367 "C++", title=0x2af3c7186351 "cling C++ Interpreter") at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/meta/src/TCling.cxx:1088
#16 0x00002af3c59c256c in CreateInterpreter (interpLibHandle=0x1fc6a8c0) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/meta/src/TCling.cxx:581
#17 0x00002af3c1254cac in TROOT::InitInterpreter (this=0x2af3c16a5480 <ROOT::GetROOT1()::alloc>) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/base/src/TROOT.cxx:1739
#18 0x00002af3c124e766 in ROOT::GetROOT2 () at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/base/src/TROOT.cxx:353
#19 0x00002af3c124e791 in ROOT::GetROOT () at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/base/src/TROOT.cxx:362
#20 0x00002af3c442da63 in TMapFile::WhichMapFile (addr=0x1fc489e0) at include/TMapFile.h:195
#21 0x00002af3c442d3c7 in operator delete (ptr=0x1fc489e8) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/newdelete/src/NewDelete.cxx:273
#22 0x00002af3c1346214 in __gnu_cxx::new_allocator<unsigned long>::deallocate (this=0x2af3c16c2630 <TClassEdit::CleanType(char const*, int, char const**)::lengths>, __p=0x1fc489e8) at /home/usr/hltdaq/belle2/externals/v01-01-01/include/c++/ext/new_allocator.h:110
#23 0x00002af3c1345d8a in std::allocator_traits<std::allocator<unsigned long> >::deallocate (__a=..., __p=0x1fc489e8, __n=1) at /home/usr/hltdaq/belle2/externals/v01-01-01/include/c++/bits/alloc_traits.h:386
#24 0x00002af3c13457f0 in std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_M_deallocate (this=0x2af3c16c2630 <TClassEdit::CleanType(char const*, int, char const**)::lengths>, __p=0x1fc489e8, __n=1) at /home/usr/hltdaq/belle2/externals/v01-01-01/include/c++/bits/stl_vector.h:178
#25 0x00002af3c1345974 in std::vector<unsigned long, std::allocator<unsigned long> >::_M_emplace_back_aux<unsigned long>(unsigned long&&) (this=0x2af3c16c2630 <TClassEdit::CleanType(char const*, int, char const**)::lengths>) at /home/usr/hltdaq/belle2/externals/v01-01-01/include/c++/bits/vector.tcc:438
#26 0x00002af3c134507b in std::vector<unsigned long, std::allocator<unsigned long> >::emplace_back<unsigned long>(unsigned long&&) (this=0x2af3c16c2630 <TClassEdit::CleanType(char const*, int, char const**)::lengths>) at /home/usr/hltdaq/belle2/externals/v01-01-01/include/c++/bits/vector.tcc:101
#27 0x00002af3c1344902 in std::vector<unsigned long, std::allocator<unsigned long> >::push_back(unsigned long&&) (this=0x2af3c16c2630 <TClassEdit::CleanType(char const*, int, char const**)::lengths>, __x=<unknown type in /home/usr/hltdaq/belle2/externals/v01-01-01/Linux_x86_64/debug/root/lib/libCore.so, CU 0x4673f9, DIE 0x47674e>) at /home/usr/hltdaq/belle2/externals/v01-01-01/include/c++/bits/stl_vector.h:932
#28 0x00002af3c1340bf1 in TClassEdit::CleanType (typeDesc=0x1fc489d0 "string", mode=0, tail=0x0) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/metautils/src/TClassEdit.cxx:1110
#29 0x00002af3c133fc17 in TClassEdit::GetSplit (type=0x1fc489d0 "string", output=..., nestedLoc=
0x7fff7dc6abe0: 0, mode=(TClassEdit::kDropStlDefault | TClassEdit::kLong64 | TClassEdit::kDropStd | TClassEdit::kKeepOuterConst)) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/metautils/src/TClassEdit.cxx:929
#30 0x00002af3c133d142 in TClassEdit::TSplitType::TSplitType (this=0x7fff7dc6abc0, type2split=0x1fc489d0 "string", mode=(TClassEdit::kDropStlDefault | TClassEdit::kLong64 | TClassEdit::kDropStd | TClassEdit::kKeepOuterConst)) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/metautils/src/TClassEdit.cxx:125
#31 0x00002af3c133f3eb in TClassEdit::GetNormalizedName (norm_name=..., name=...) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/metautils/src/TClassEdit.cxx:775
#32 0x00002af3c129fec8 in TClassTable::FindElement (cname=0x2af3c137c47c "string", insert=false) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/cont/src/TClassTable.cxx:503
#33 0x00002af3c12a073f in ROOT::ResetClassVersion (cl=0x0, cname=0x2af3c137c47c "string", newid=2) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/cont/src/TClassTable.cxx:739
#34 0x00002af3c12e9d5d in ROOT::TGenericClassInfo::SetVersion (this=0x2af3c16a40e0 <ROOT::GenerateInitInstanceLocal(std::string const*)::instance>, version=2) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/meta/src/TGenericClassInfo.cxx:370
#35 0x00002af3c11f82de in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/base/src/String.cxx:38
#36 0x00002af3c11f82fb in _GLOBAL__sub_I_String.cxx(void) () at /home/usr/hltdaq/belle2/externals/v01-01-01/src/root/core/base/src/String.cxx:38
#37 0x0000003a85a0d4f3 in call_init () from /lib64/ld-linux-x86-64.so.2
#38 0x0000003a85a0d5b5 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#39 0x0000003a85a00aaa in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#40 0x0000000000000001 in ?? ()
#41 0x00007fff7dc6cb3c in ?? ()
#42 0x0000000000000000 in ?? ()
Abort (core dumped)
I found the same problem occurs even when just invoking rootn.exe.
I also tried to compile and link a simple program “hsimple.cxx” with and without libNew.so,
and found that the same problem occurs when libNew.so is linked, although it never occurs without libNew.so.
Judging from the fact, I suspect the problem occurs when loading “libNew.so”.
Does anyone recognize this problem? If yes, could you tell me how to fix it?
Thanks in advance,
Ryosuke Itoh
Belle II DAQ group