Bug using v5_22_00a root version

Hello root-users,

I am currently trying to build some libraries, that are used in a file I want to compile and execute.
These libraries were firstly built with root version v4_04_02b, but I must now build them with root version v5_22_00a, because the environment I use now works with the new root version.
When I compile the libraries, everything seems to go smoothly, like before.
When I compile my personal program, that use the previous libraries, no particular problem happens.
But when I try to execute this program in my environment (using the new root version v5_22_00a), I get this error message (it crashes when I try to to a TTree::GetEntry for a given entry (event) in my loop). The error message is the following :

event number 1

*** Break *** segmentation violation
0x00bfa349 in _ZNSsC1Ev + 0x9 from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libCore.so
0x00ab85f1 in _ZNSt4pairIKSsfEC1Ev + 0x1d from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libCore.so
0x005c0de5 in _ZN4ROOT20TCollectionProxyInfo4TypeISt3mapISsfSt4lessISsESaISt4pairIKSsfEEEE9constructEPv + 0x5b from …/Libraries/Global/Global_cxx.so
0x001b699b in _ZN22TGenCollectionStreamer7ReadMapEiR7TBuffer + 0x9b from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
0x00000000 in

Only Global_cxx.so is one of the library I compiled just before. The other seems to be linked to root.
Have you ever seen this error message before or do you know if this error is linked with the new version of root or with a problem (not seen) during the building of my libraries or with something else ?

Thank you very much in advance,

Jerome

Hi,

this is commonly caused by a wrong value passed to TTree::SetBranchAddress(). We will need the code of Global.cxx and the ROOT file it cashes on to be able to debug it.

Cheers, Axel.

Hello Axel,

Thank you very much for your quick answer.
I put some codes (Global.cxx, Global.hpp, ana.cxx) and one of the root file I use.
Cheers,

Jerome
ana.cxx (8.14 KB)
Global.hpp (8.89 KB)
Global.cxx (3.11 KB)
CSG_alpgenpythia_gamz+0lp_mumu+0lp_excl_130_250_p211100_v3.root (1.72 MB)

I tried to put as an input file one of the rootfile I had processed using my old environment (set with the old root version). After that, I loaded the new root version and all my new environment variables (as usual), and then the program ran without any problem. So I can’t understand where the problem is located, but this fact can perhaps give to us a clue.
Cheers,

Jerome

ps : I currently use gcc version 3.4.3

Hello everybody,

I’ve just made another test on another rootfile (diboson process instead of Z->mumu process) with the recent version of root and this time I get this error message :

*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library “/lib/tls/libthread_db.so.1”.
Attaching to program: /proc/1061/exe, process 1061
[Thread debugging using libthread_db enabled]
[New Thread -1208314176 (LWP 1061)]
0x005db7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x021994b3 in __waitpid_nocancel () from /lib/tls/libc.so.6
#2 0x02142779 in do_system () from /lib/tls/libc.so.6
#3 0x060cf98d in system () from /lib/tls/libpthread.so.0
#4 0x00841cfd in TUnixSystem::Exec ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libCore.so
#5 0x00848571 in TUnixSystem::StackTrace ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libCore.so
#6 0x00844869 in TUnixSystem::DispatchSignals ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libCore.so
#7 0x00844913 in SigHandler ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libCore.so
#8 0x00843a1e in sighandler ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libCore.so
#9
#10 0x0018a4c9 in TBufferFile::ReadFloat ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#11 0x001b6d32 in TGenCollectionStreamer::ReadMap ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#12 0x001b818a in TGenCollectionStreamer::Streamer ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#13 0x0018af3d in TCollectionStreamer::Streamer ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#14 0x0018bab7 in TCollectionClassStreamer::operator() ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#15 0x007fb229 in TClass::Streamer ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libCore.so
#16 0x00187a12 in TBufferFile::StreamObject ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#17 0x001b6c77 in TGenCollectionStreamer::ReadMap ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#18 0x001b818a in TGenCollectionStreamer::Streamer ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#19 0x0018af3d in TCollectionStreamer::Streamer ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#20 0x0018bab7 in TCollectionClassStreamer::operator() ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#21 0x007fb229 in TClass::Streamer ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libCore.so
#22 0x00184e0d in TBufferFile::ReadFastArray ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#23 0x0024921e in TStreamerInfo::ReadBuffer<char**> ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#24 0x001ce8d0 in TStreamerInfo::ReadBufferClones ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libRIO.so
#25 0x02fb30fa in TBranchElement::ReadLeaves ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libTree.so
#26 0x02fa75b6 in TBranch::GetEntry ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libTree.so
#27 0x02faf2df in TBranchElement::GetEntry ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libTree.so
#28 0x02faf26b in TBranchElement::GetEntry ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libTree.so
#29 0x02ff704c in TTree::GetEntry ()
from /d0usr/products/root/Linux-2-4/v5_22_00a-GCC_3_4_3-dzero-rh7/lib/libTree.so
#30 0x080a3794 in main ()

Cheers,

Jerome

Hi,

I don’t see the connection between data members and the tree (I assume that’s in Fill_Tree). But I can already tell that you forgot to initialize some pointers members of Global, like _metmap. And reading _metmap happens to cause the crash you report, so it might be connected. Please add _metmap(0) to the initializer list in the constructor(s).

Cheers, Axel.

As _metmap is a std::map, adding _metmap(0) put an error when compiling the library. I finally added :
_metmap[“1”]=0.;
in the default constructor.
The libraries compile but the program “ana” crashes at the execution with the first error message noticed.
Respectfully,

Jerome
Fill_Tree.cxx (46.6 KB)
Filtered.cxx (2.22 KB)

Hi,

Can you try running your example using valgrind (see valgrind.org) ? This might be able to pin point the origin of the problem.

Cheers,
Philippe.