Crash when creating TEntryList using TChain::Draw

Hi,

I have a TChain built from 5 files (run001.root - run005.root),
each file containing a TTree with a single integer branch:

[code]******************************************************************************
*Tree :theTree : important data files *
*Entries : 10000 : Total = 81043 bytes File Size = 19311 *

  •    :          : Tree compression factor =   4.24                       *
    

*Br 0 :I : I/D *
*Entries : 10000 : Total Size= 80679 bytes File Size = 18908 *
*Baskets : 3 : Basket Size= 32000 bytes Compression= 4.24 *
[/code]

The values of I are 10000-19999 in run001.root, 20000-29999 in run002.root, etc.

I can draw a histogram using PROOF and this TChain:

[code] -------------------------------------------------------------------------
| Welcome to ROOT 6.04/03 http://root.cern.ch |
| © 1995-2014, The ROOT Team |
| Built for linuxx8664gcc |
| From heads/v6-04-00-patches@v6-04-02-13-g4d5c763, Jul 20 2015, 11:07:00 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’

root [0] TProof::Open("")
+++ Starting PROOF-Lite with 4 workers +++
Opening connections to workers: OK (4 workers)
Setting up worker servers: OK (4 workers)
PROOF set to parallel mode (4 workers)
(class TProof ) 0x1e37dc0
root [1] TChain t(“theTree”)
(TChain &) @0x7f46df28e028
root [2] t.Add("run00
.root")
(Int_t) 5
root [3] t.SetProof()
root [4] t.Draw(“I>>hI”)

Info in TProofLite::SetQueryRunning: starting query: 1
Info in TProofQueryResult::SetRunning: nwrks: 4
Looking up for exact location of files: OK (5 files)
Looking up for exact location of files: OK (5 files)
Info in TPacketizer::TPacketizer: Initial number of workers: 4
Validating files: OK (5 files)
Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1
Info in TProofDrawHist::SetDrawAtt: att: 1000
Lite-0: all output objects have been merged
root [5] gProof->GetOutputList()->FindObject(“hI”)->Print()
TH1.Print Name = hI, Entries= 50000, Total sum= 50000[/code]

However, if I try to generate a TEntryList, it crashes (using either the latest versions of the 5.34 or 6.04 git branches):

[code]root [6] t.Draw(">>elist",“I>30000”,“entrylist”)

Info in TProofLite::SetQueryRunning: starting query: 2
Info in TProofQueryResult::SetRunning: nwrks: 4
Looking up for exact location of files: OK (5 files)
Looking up for exact location of files: OK (5 files)
Info in TPacketizer::TPacketizer: Initial number of workers: 4
Lite-0: merging output objects … / (1 workers still sending)
*** Break *** segmentation violation

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

#0 0x00007f46de06e84a in _GI___waitpid (pid=22084, stat_loc=stat_loc
entry=0x7ffd993d6100, options=options
entry=0) at …/sysdeps/unix/sysv/linux/waitpid.c:31
#1 0x00007f46ddfe7ffb in do_system (line=) at …/sysdeps/posix/system.c:148
#2 0x00007f46ded826af in Exec (shellcmd=, this=) at /home/john/software/sources/root/root.git/core/unix/src/TUnixSystem.cxx:2069
#3 TUnixSystem::StackTrace (this=0x108b9c0) at /home/john/software/sources/root/root.git/core/unix/src/TUnixSystem.cxx:2297
#4 0x00007f46ded8485c in TUnixSystem::DispatchSignals (this=0x108b9c0, sig=kSigSegmentationViolation) at /home/john/software/sources/root/root.git/core/unix/src/TUnixSystem.cxx:3535
#5
#6 0x00007f46ded0483b in TList::FindObject (this=, name=0x7f46d2962deb “PROOFSERV_RegisterDataSet”) at /home/john/software/sources/root/root.git/core/cont/src/TList.cxx:501
#7 0x00007f46d2952a5c in TProofLite::Process (this=0x1e37dc0, dset=0x34c6010, selector=0x7f46d296986a “draw:”, option=, nentries=, first=) at /home/john/software/sources/root/root.git/proof/proof/src/TProofLite.cxx:1397
#8 0x00007f46d29478af in TProofLite::DrawSelect (this=0x1e37dc0, dset=0x34c6010, varexp=0x7f46ccbae000 “>>elist”, selection=0x7f46ccbae008 “I>30000”, option=, nentries=1234567890, first=0) at /home/john/software/sources/root/root.git/proof/proof/src/TProofLite.cxx:1124
#9 0x00007f46d28fad74 in TDSet::Draw (this=0x34c6010, varexp=, selection=, option=, nentries=, firstentry=) at /home/john/software/sources/root/root.git/proof/proof/src/TDSet.cxx:1476
#10 0x00007f46ccbaf05c in ?? ()
#11 0x00007ffd993d8d30 in ?? ()
#12 0x00007ffd993d90d0 in ?? ()
#13 0x00000000010dce10 in ?? ()
#14 0x0000000005fb7448 in ?? ()
#15 0x00007ffd993d8d30 in ?? ()
#16 0x00007f46db30442e in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /home/john/software/build/root-v6-04-00/lib/libCling.so
#17 0x00007f46db30a201 in cling::Interpreter::EvaluateInternal(std::string const&, cling::CompilationOptions, cling::Value*, cling::Transaction**) () from /home/john/software/build/root-v6-04-00/lib/libCling.so
#18 0x00007f46db30a3e5 in cling::Interpreter::process(std::string const&, cling::Value*, cling::Transaction**) () from /home/john/software/build/root-v6-04-00/lib/libCling.so
#19 0x00007f46db3ad843 in cling::MetaProcessor::process(char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /home/john/software/build/root-v6-04-00/lib/libCling.so
#20 0x00007f46db2afc90 in TCling::ProcessLine (this=0x10d9820, line=, error=0x7ffd993d94bc) at /home/john/software/sources/root/root.git/core/meta/src/TCling.cxx:1947
#21 0x00007f46decb4740 in TApplication::ProcessLine (this=this
entry=0x10c7300, line=, sync=sync
entry=false, err=err
entry=0x7ffd993d94bc) at /home/john/software/sources/root/root.git/core/base/src/TApplication.cxx:982
#22 0x00007f46de8a271f in TRint::ProcessLineNr (this=this
entry=0x10c7300, filestem=filestem
entry=0x7f46de8b159e "ROOT_prompt
", line=0x360a570 “t.Draw(”>>elist",“I>30000”,“entrylist”)", error=0x7ffd993d94bc, error
entry=0x0) at /home/john/software/sources/root/root.git/core/rint/src/TRint.cxx:729
#23 0x00007f46de8a2a01 in TRint::HandleTermInput (this=0x10c7300) at /home/john/software/sources/root/root.git/core/rint/src/TRint.cxx:601
#24 0x00007f46ded83eed in TUnixSystem::CheckDescriptors (this=this
entry=0x108b9c0) at /home/john/software/sources/root/root.git/core/unix/src/TUnixSystem.cxx:1297
#25 0x00007f46ded8517a in TUnixSystem::DispatchOneEvent (this=0x108b9c0, pendingOnly=) at /home/john/software/sources/root/root.git/core/unix/src/TUnixSystem.cxx:1052
#26 0x00007f46dec90454 in TSystem::InnerLoop (this=0x108b9c0) at /home/john/software/sources/root/root.git/core/base/src/TSystem.cxx:409
#27 0x00007f46dec8f101 in TSystem::Run (this=0x108b9c0) at /home/john/software/sources/root/root.git/core/base/src/TSystem.cxx:359
#28 0x00007f46decb1f0f in TApplication::Run (this=0x10c7300, retrn=) at /home/john/software/sources/root/root.git/core/base/src/TApplication.cxx:1130
#29 0x00007f46de8a3f2b in TRint::Run (this=0x5cad600, retrn=217) at /home/john/software/sources/root/root.git/core/rint/src/TRint.cxx:455
#30 0x0000000000401060 in main (argc=1, argv=0x7ffd993db8f8) at /home/john/software/sources/root/root.git/main/src/rmain.cxx:29

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.

#6 0x00007f46ded0483b in TList::FindObject (this=, name=0x7f46d2962deb “PROOFSERV_RegisterDataSet”) at /home/john/software/sources/root/root.git/core/cont/src/TList.cxx:501
#7 0x00007f46d2952a5c in TProofLite::Process (this=0x1e37dc0, dset=0x34c6010, selector=0x7f46d296986a “draw:”, option=, nentries=, first=) at /home/john/software/sources/root/root.git/proof/proof/src/TProofLite.cxx:1397
#8 0x00007f46d29478af in TProofLite::DrawSelect (this=0x1e37dc0, dset=0x34c6010, varexp=0x7f46ccbae000 “>>elist”, selection=0x7f46ccbae008 “I>30000”, option=, nentries=1234567890, first=0) at /home/john/software/sources/root/root.git/proof/proof/src/TProofLite.cxx:1124
#9 0x00007f46d28fad74 in TDSet::Draw (this=0x34c6010, varexp=, selection=, option=, nentries=, firstentry=) at /home/john/software/sources/root/root.git/proof/proof/src/TDSet.cxx:1476
#10 0x00007f46ccbaf05c in ?? ()
#11 0x00007ffd993d8d30 in ?? ()
#12 0x00007ffd993d90d0 in ?? ()
#13 0x00000000010dce10 in ?? ()
#14 0x0000000005fb7448 in ?? ()
#15 0x00007ffd993d8d30 in ?? ()
#16 0x00007f46db30442e in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /home/john/software/build/root-v6-04-00/lib/libCling.so
#17 0x00007f46db30a201 in cling::Interpreter::EvaluateInternal(std::string const&, cling::CompilationOptions, cling::Value*, cling::Transaction**) () from /home/john/software/build/root-v6-04-00/lib/libCling.so
#18 0x00007f46db30a3e5 in cling::Interpreter::process(std::string const&, cling::Value*, cling::Transaction**) () from /home/john/software/build/root-v6-04-00/lib/libCling.so
#19 0x00007f46db3ad843 in cling::MetaProcessor::process(char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /home/john/software/build/root-v6-04-00/lib/libCling.so

[/code]

Can you tell me what I’m doing wrong?
Thanks in advance

Hello,

I have reproduced the problem.
I need to debug it, I’ll let you know.
Thanks for reporting.

G Ganis

Hello,
Have you made any progress with this issue?
Cheers
John

Dear John,

I have pushed a fix in the three main branches, master, v6-06-00-patches and v5-34-00-patches. Let me know if you need it somewhere else.
Unfortunately there is no workaround for this problem. But you can write a TSelector and create an entry-list in there; see for example tutorials/tree/h1analysis.C .

G Ganis

Thanks a lot!