Segmentation fault in TChain::AddFileInfoList

Hi,

I am currently changing the ROOT version from v5.28.00b to v5.30.00.
I am running:
Ubuntu 10.04
g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3

Once I swap versions and recompile my code (compiled with g++ linking to ROOT libraries) the TChain::Add command produced a segmentation fault:

BAT::NTupleEventReader::addInputFile(const char * fileName){ input->Add(fileName, -1) ... }

where fileName is either a wildcard expression:
/store/data/*.root
or a file name:
/store/data/123.root

The trace I get is:

[code] *** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:

stat_loc=0x7fffc283671c, options=<value optimised out>)
at ../sysdeps/unix/sysv/linux/waitpid.c:32

#0 0x00007f5c4effbf7e in __libc_waitpid (pid=,
stat_loc=0x7fffc283671c, options=)
at …/sysdeps/unix/sysv/linux/waitpid.c:32
#1 0x00007f5c4ef937e9 in do_system (line=)
at …/sysdeps/posix/system.c:149
#2 0x00007f5c516df0b1 in TUnixSystem::StackTrace() ()
from /software/root/v5.28.00b/normal/lib/libCore.so
#3 0x00007f5c516de623 in TUnixSystem::DispatchSignals(ESignals) ()
from /software/root/v5.28.00b/normal/lib/libCore.so
#4
#5 0x00007f5c537bab3b in TChain::AddFileInfoList(TCollection*, long long) ()
from /software/root/v5.28.00b/normal/lib/libTree.so
#6 0x0000000000458d15 in BAT::NTupleEventReader::addInputFile(char const*) ()
#7 0x00000000004c5af6 in main ()

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.

#5 0x00007f5c537bab3b in TChain::AddFileInfoList(TCollection*, long long) ()
from /software/root/v5.28.00b/normal/lib/libTree.so
#6 0x0000000000458d15 in BAT::NTupleEventReader::addInputFile(char const*) ()
#7 0x00000000004c5af6 in main ()
===========================================================[/code]

I’ve tried to substitute const char* with const TString and/or removing the -1 option, but the results are the same.

Do you have any ideas what goes wrong?

Am I the only one experiencing this kind of problem?

Hi,

[quote]#2 0x00007f5c516df0b1 in TUnixSystem::StackTrace() ()
from /software/root/v5.28.00b/normal/lib/libCore.so
[/quote]Seems to indicate that the executable is still loading the v5.28 libraries. Double check your LD_LIBRARY_PATH to make sure that v5.28 is no longer listed.

Cheers,
Philippe.

Hi Philippe,

thanks for pointing out this stupid error of mine. I guess this is how it is if you “know” the code…you don’t see this kind of mistakes.

Thanks!