GetEntry Crash

Hello,

My code has been crashing at GetEntry() giving me this message:

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

Thread 4 (Thread 0x7f333cb97700 (LWP 1183)):
#0 0x00007f334db7cced in nanosleep () from /lib64/libc.so.6
#1 0x00007f334db7cb60 in sleep () from /lib64/libc.so.6
#2 0x00007f333cdd7e3c in GarbageCollectorThread (arg=0x3182bb0, thr=) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdClient/XrdClientConnMgr.cc:73
#3 0x00007f333d035b0f in XrdSysThread_Xeq (myargs=0x3184e60) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdSys/XrdSysPthread.cc:67
#4 0x00007f334de6f9d1 in start_thread () from /lib64/libpthread.so.0
#5 0x00007f334dbb8b5d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f333bb94700 (LWP 1184)):
#0 0x00007f334dbaf333 in poll () from /lib64/libc.so.6
#1 0x00007f333cdc1661 in XrdClientSock::RecvRaw (this=0x328b890, buffer=0x7f33340009e0, length=8, substreamid=, usedsubstreamid=) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdClient/XrdClientSock.cc:133
#2 0x00007f333cde0f5f in XrdClientPhyConnection::ReadRaw (this=0x3289cb0, buf=0x7f33340009e0, len=8, substreamid=-1, usedsubstreamid=0x7f333bb93aa8) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdClient/XrdClientPhyConnection.cc:359
#3 0x00007f333cde3a23 in XrdClientMessage::ReadRaw (this=0x7f33340009a0, phy=0x3289cb0) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdClient/XrdClientMessage.cc:152
#4 0x00007f333cddf908 in XrdClientPhyConnection::BuildMessage (this=0x3289cb0, IgnoreTimeouts=true, Enqueue=true) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdClient/XrdClientPhyConnection.cc:440
#5 0x00007f333cde264a in SocketReaderThread (arg=0x3289cb0, thr=) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdClient/XrdClientPhyConnection.cc:57
#6 0x00007f333d035b0f in XrdSysThread_Xeq (myargs=0x328b710) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdSys/XrdSysPthread.cc:67
#7 0x00007f334de6f9d1 in start_thread () from /lib64/libpthread.so.0
#8 0x00007f334dbb8b5d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f333ad77700 (LWP 1185)):
#0 0x00007f334dbaf333 in poll () from /lib64/libc.so.6
#1 0x00007f333cdc1661 in XrdClientSock::RecvRaw (this=0x32d7600, buffer=0x7f332c000950, length=8, substreamid=, usedsubstreamid=) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdClient/XrdClientSock.cc:133
#2 0x00007f333cde0f5f in XrdClientPhyConnection::ReadRaw (this=0x32d6700, buf=0x7f332c000950, len=8, substreamid=-1, usedsubstreamid=0x7f333ad76aa8) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdClient/XrdClientPhyConnection.cc:359
#3 0x00007f333cde3a23 in XrdClientMessage::ReadRaw (this=0x7f332c000910, phy=0x32d6700) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdClient/XrdClientMessage.cc:152
#4 0x00007f333cddf908 in XrdClientPhyConnection::BuildMessage (this=0x32d6700, IgnoreTimeouts=true, Enqueue=true) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdClient/XrdClientPhyConnection.cc:440
#5 0x00007f333cde264a in SocketReaderThread (arg=0x32d6700, thr=) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdClient/XrdClientPhyConnection.cc:57
#6 0x00007f333d035b0f in XrdSysThread_Xeq (myargs=0x32d5260) at /afs/slac/public/software/scalla/releases/v3.2.7/xrootd-3.2.7/src/XrdSys/XrdSysPthread.cc:67
#7 0x00007f334de6f9d1 in start_thread () from /lib64/libpthread.so.0
#8 0x00007f334dbb8b5d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f334caad720 (LWP 1173)):
#0 0x00007f334db7c90d in waitpid () from /lib64/libc.so.6
#1 0x00007f334db0e909 in do_system () from /lib64/libc.so.6
#2 0x00007f334db0ec40 in system () from /lib64/libc.so.6
#3 0x00007f334ea3bcfc in TUnixSystem::StackTrace() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCore.so
#4 0x00007f334ea3e533 in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCore.so
#5
#6 0x00007f334aed72fe in int TStreamerInfoActions::VectorLooper::ReadCollectionBasicType(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libRIO.so
#7 0x00007f334ae1aef5 in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libRIO.so
#8 0x00007f3348e3c5e5 in TBranchElement::ReadLeavesMakeClass(TBuffer&) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libTree.so
#9 0x00007f3348e32a57 in TBranch::GetEntry(long long, int) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libTree.so
#10 0x00007f3348e3bca5 in TBranchElement::GetEntry(long long, int) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libTree.so
#11 0x00007f3348e7ed83 in TTree::GetEntry(long long, int) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libTree.so
#12 0x00007f333d5024f9 in Susy3LepCutflow8TeV::Loop (this=0x2622e70, event_list=0x0) at /afs/cern.ch/work/a/akourkou/newworkareaSusy_D3PD/SusyP1512N0145_Trial/SusyOfflineAnalysis/Susy3LepCutflow8TeV.C:668
#13 0x00007f333d543570 in G__Susy3LepCutflow8TeV_C_ACLiC_dict_3642_0_41 (result7=0x7ffff5d22870, funcname=0x2625a40 “”, libp=0x7ffff5d228b0, hash=0) at /afs/cern.ch/work/a/akourkou/newworkareaSusy_D3PD/SusyP1512N0145_Trial/SusyOfflineAnalysis/Susy3LepCutflow8TeV_C_ACLiC_dict.cxx:2040
#14 0x00007f334caffec7 in Cint::G__ExceptionWrapper(int ()(G__value, char const*, G__param*, int), G__value*, char*, G__param*, int) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#15 0x00007f334cba46f1 in G__execute_call () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#16 0x00007f334cba4abe in G__call_cppfunc () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#17 0x00007f334cb87239 in G__interpret_func () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#18 0x00007f334cb70b74 in G__getfunction () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#19 0x00007f334cc55f0c in G__getstructmem(int, G__FastAllocString&, char*, int, char*, int*, G__var_array*, int) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#20 0x00007f334cc4b391 in G__getvariable () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#21 0x00007f334cb4a8bd in G__getitem () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#22 0x00007f334cb5159a in G__getexpr () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#23 0x00007f334cbd4c0e in G__exec_statement () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#24 0x00007f334cb8538d in G__interpret_func () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#25 0x00007f334cb70bd9 in G__getfunction () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#26 0x00007f334cb4b022 in G__getitem () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#27 0x00007f334cb5159a in G__getexpr () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#28 0x00007f334cb5c9ad in G__calc_internal () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#29 0x00007f334cbe2580 in G__process_cmd () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCint.so
#30 0x00007f334ea05d01 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCore.so
#31 0x00007f334e9fc153 in TCint::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCore.so
#32 0x00007f334e969d2d in TApplication::ExecuteFile(char const*, int*, bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCore.so
#33 0x00007f334e968a95 in TApplication::ProcessLine(char const*, bool, int*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libCore.so
#34 0x00007f334e5baf29 in TRint::Run(bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libRint.so
#35 0x000000000040124c 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
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.

#6 0x00007f334aed72fe in int TStreamerInfoActions::VectorLooper::ReadCollectionBasicType(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libRIO.so
#7 0x00007f334ae1aef5 in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libRIO.so
#8 0x00007f3348e3c5e5 in TBranchElement::ReadLeavesMakeClass(TBuffer&) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libTree.so
#9 0x00007f3348e32a57 in TBranch::GetEntry(long long, int) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libTree.so
#10 0x00007f3348e3bca5 in TBranchElement::GetEntry(long long, int) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libTree.so
#11 0x00007f3348e7ed83 in TTree::GetEntry(long long, int) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/lib/libTree.so
#12 0x00007f333d5024f9 in Susy3LepCutflow8TeV::Loop (this=0x2622e70, event_list=0x0) at /afs/cern.ch/work/a/akourkou/newworkareaSusy_D3PD/SusyP1512N0145_Trial/SusyOfflineAnalysis/Susy3LepCutflow8TeV.C:668

The code in my source file includes these lines:

Long64_t nbytes = 0, nb = 0;
//cerr<<“OK 1”<<endl;
for (Long64_t evt_ctr=0; evt_ctr<nentries;evt_ctr++) {
// use slim vector if available
cerr<<“OK 1.1”<<endl;
Long64_t jentry;
if(event_list!=0) {
//if(0) {
jentry = event_array[evt_ctr];
if( (evt_ctr%100000)==1 ) std::cout <<"ONE: "<< jentry << std::endl;
} else {
jentry = evt_ctr;
if( (evt_ctr%1000000)==1 ) std::cout<< "TWO: " << jentry << std::endl;
}

    Long64_t ientry = LoadTree(jentry);
    if (ientry < 0) break;
    nb = fChain->GetEntry(jentry);
    nbytes += nb;

And I attach the Run file. I use root version:
/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.7/bin/root
And gcc:
/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Gcc/gcc472p1_x86_64_slc6/slc6/gcc47/bin/gcc

I have noticed that if I run a few times, it will eventually run successfully and if I open the source file, make any chenge and run, the first time it always runs successfully.
Could it be that if the code does not compile, it crashes? If yes, what could cause that?

I run this way: root -l -b -q RunSusy3LepCutFlow8TeV.C

Thanks a lot,
Athina
RunSusy3LepCutFlow8TeV.C (1.47 KB)