Hello everyone,
I would need to have an advice about a problem I am facing in my code.
I have a series of ROOT macros that crash when trying to open a file.
I would appreciate a comment on the way it crashes i.e. whether more experienced people can have a feeling about what can be causing the problem.
I am using ROOT version 5.14. I have a TTree called fChain that is
The crash happens when one gets to the line:
Long64_t centry = fChain->LoadTree(entry);
I also have a crash when I try to do int pippo = fChain->GetEntry(entry)
I know I should make info available for this to be reproducible, but I am mor einterested into a hint: what can make a TTree crash with segmentation faul? What bad things can one be doing with the memory?
Sorry I know this is like asking to fathom the content of a black box…I’ll try to make more info available (and reproducible) vailable if I have made no additional progress.
The outcome of running the macro is below:
Note: File “/usr/nevis/root-05.14.00/lib/libHist.so” already loaded
Note: File “/a/home/kolya/fspano/topanalysis/src/./…/HitFit/CLHEP/lib/libCLHEP.so” already loaded
Note: File “/usr/nevis/root-05.14.00/lib/libMatrix.so” already loaded
Note: File “/usr/nevis/root-05.14.00/lib/libTree.so” already loaded
Note: File “/usr/nevis/root-05.14.00/lib/libPhysics.so” already loaded
FileList::Generating FileList object
LoadFileList::reading info in listsTopView1214/files_ttbarnohad_1214_smallone.txt
LoadFileList::Number of lines in file is1
LoadFileList::reading filenames in is over
FileList::files’ names are stored
FillFileDim::filling the file dimension
FillFileDim::the element in list is /data/TopData1214/5200/user.top.TopViewCSC121403_StacoTauRec_30um.trig1_misal1_mc12.005200.T1_McAtNlo_Jimmyv12000604.001.AANT0._00161.root
Warning in TClass::TClass: no dictionary for class AttributeListLayout is available
Warning in TClass::TClass: no dictionary for class pair<string,string> is available
FillFileDim::I have 3750events
FillFileDim::file closed
FileList::files’ dimensions are stored
FileList::event weight based on file dimensions are calculated and stored
TopIO::Init::adding/data/TopData1214/5200/user.top.TopViewCSC121403_StacoTauRec_30um.trig1_misal1_mc12.005200.T1_McAtNlo_Jimmyv12000604.001.AANT0._00161.root as file no0for top analysis
TopIO::Init::I have 3750 in the 0th file
TopIO::Init::I have 1 files in the chain
TopIO::Init::adding FullRecoAna0
TopIO::Init::adding TruthAna0
TopIO::Init::with 3750 events for friend in the chain
TopIO::Init::with 3750 events in the chain
TopIO::Init::the reco tree isFullReco0
TopIO::Start:: I am starting
TopIO::Start::Before setting branch addresses
TopIO::Start::Before setting up branch addresses from FullRecoAna
TopIO::truth is set up
TopIO:Start:getting W related info
getting W related info
TopIO::Start:getting Zprime related info: at the end
TopIO::Start:just before fchan
TopIO::Start:fChain has 3750entries
TopIO::Start:in entry 4 LepTop_N =0
TopIO::Start:in entry 4 LepTop_N_True =0
TopIO::just before Notify
TopIO:Init::initialization for TopIO is complete
NtupleMaker::GenerateNtup::filettbarnohadhistos_1214.root is open!
NtupleMaker::GenerateNtup::ntuple structre is set upttbarnohadhistos_1214.root
PROCESSING EVENT no 0
TopIO::loadentry-------bef Loading the tree info
TopIO::LoadTree:loading stuff
TopIO::LoadTree:loading the tree
*** Break *** segmentation violation
(no debugging symbols found)
Attaching to program: /proc/23398/exe, process 23398
(no debugging symbols found)…done.
(no debugging symbols found)…done.
[Thread debugging using libthread_db enabled]
[New Thread 0xb7fff6c0 (LWP 23398)]
0x00110416 in __kernel_vsyscall ()
Missing separate debuginfos, use: debuginfo-install glibc.i686 libX11.i386 libXau.i386 libXcursor.i386 libXdmcp.i386 libXext.i386 libXfixes.i386 libXpm.i386 libXrender.i386 libxcb.i386
#1 0x06cb0233 in __waitpid_nocancel () from /lib/libc.so.6
#2 0x06c4e59b in do_system () from /lib/libc.so.6
#3 0x00a4303d in system () from /lib/libpthread.so.0
#4 0x003cf349 in TUnixSystem::Exec () from /usr/nevis/root-05.14.00/lib/libCore.so
#5 0x003cf7f4 in TUnixSystem::StackTrace () from /usr/nevis/root-05.14.00/lib/libCore.so
#6 0x003cd5b7 in TUnixSystem::DispatchSignals () from /usr/nevis/root-05.14.00/lib/libCore.so
#7 0x003cb404 in SigHandler () from /usr/nevis/root-05.14.00/lib/libCore.so
#8 0x003d211e in sighandler () from /usr/nevis/root-05.14.00/lib/libCore.so
#9
#10 0x059aaf05 in TChain::LoadTree () from /usr/nevis/root-05.14.00/lib/libTree.so
#11 0x04795382 in TopIO::LoadTree () from /a/home/kolya/fspano/topanalysis/src/./topntupmake_cpp.so
#12 0x047a2170 in TopIO::loadentry () from /a/home/kolya/fspano/topanalysis/src/./topntupmake_cpp.so
#13 0x047af60d in topntupmake () from /a/home/kolya/fspano/topanalysis/src/./topntupmake_cpp.so
#14 0x047b2028 in G__fileVb2zGZ__0_3294 () from /a/home/kolya/fspano/topanalysis/src/./topntupmake_cpp.so
#15 0x00ac8009 in Cint::G__ExceptionWrapper () from /usr/nevis/root-05.14.00/lib/libCint.so
#16 0x00ba6358 in G__call_cppfunc () from /usr/nevis/root-05.14.00/lib/libCint.so
#17 0x00b91f0e in G__interpret_func () from /usr/nevis/root-05.14.00/lib/libCint.so
#18 0x00b76a36 in G__getfunction () from /usr/nevis/root-05.14.00/lib/libCint.so
#19 0x00b69e50 in G__getitem () from /usr/nevis/root-05.14.00/lib/libCint.so
#20 0x00b67a71 in G__getexpr () from /usr/nevis/root-05.14.00/lib/libCint.so
#21 0x00bc2c0e in G__exec_function () from /usr/nevis/root-05.14.00/lib/libCint.so
#22 0x00bcd62f in G__exec_statement () from /usr/nevis/root-05.14.00/lib/libCint.so
#23 0x00b93cef in G__interpret_func () from /usr/nevis/root-05.14.00/lib/libCint.so
#24 0x00b76a36 in G__getfunction () from /usr/nevis/root-05.14.00/lib/libCint.so
#25 0x00b69e50 in G__getitem () from /usr/nevis/root-05.14.00/lib/libCint.so
#26 0x00b67a71 in G__getexpr () from /usr/nevis/root-05.14.00/lib/libCint.so
#27 0x00bc2c0e in G__exec_function () from /usr/nevis/root-05.14.00/lib/libCint.so
#28 0x00bcd62f in G__exec_statement () from /usr/nevis/root-05.14.00/lib/libCint.so
#29 0x00b456a9 in G__exec_tempfile_core () from /usr/nevis/root-05.14.00/lib/libCint.so
#30 0x00b45971 in G__exec_tempfile_fp () from /usr/nevis/root-05.14.00/lib/libCint.so
#31 0x00bd7547 in G__process_cmd () from /usr/nevis/root-05.14.00/lib/libCint.so
#32 0x00324a73 in TCint::ProcessLine () from /usr/nevis/root-05.14.00/lib/libCore.so
#33 0x002475b8 in TApplication::ProcessLine () from /usr/nevis/root-05.14.00/lib/libCore.so
#34 0x009e1044 in TRint::HandleTermInput () from /usr/nevis/root-05.14.00/lib/libRint.so
#35 0x009df5ab in TTermInputHandler::Notify () from /usr/nevis/root-05.14.00/lib/libRint.so
#36 0x009e14fe in TTermInputHandler::ReadNotify () from /usr/nevis/root-05.14.00/lib/libRint.so
#37 0x003cda49 in TUnixSystem::CheckDescriptors () from /usr/nevis/root-05.14.00/lib/libCore.so
#38 0x003cc7b4 in TUnixSystem::DispatchOneEvent () from /usr/nevis/root-05.14.00/lib/libCore.so
#39 0x002d2fbc in TSystem::InnerLoop () from /usr/nevis/root-05.14.00/lib/libCore.so
#40 0x002d2f55 in TSystem::Run () from /usr/nevis/root-05.14.00/lib/libCore.so
#41 0x00247e33 in TApplication::Run () from /usr/nevis/root-05.14.00/lib/libCore.so
#42 0x009e09b0 in TRint::Run () from /usr/nevis/root-05.14.00/lib/libRint.so
#43 0x08048d71 in main ()
The program is running. Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Detaching from program: /proc/23398/exe, process 23398
Root > Function runtoptest() busy flag cleared