SFramework: Segfault in statistics.py in latest master
When I try to run the SFramework example from the tutorial (slides 3 and 8), I get a segfault when running statistics.py
on the given sample folder. However, when I use the commit CAFCore is pinned to in CAFExample, it works.
I am using AnalysisBase,21.2.143
.
The config file is also attached for convenience.
% statistics.py ~/HeavyNeutrinos/AnalysisCode/ssWWAnalysisCode/share/config/statistics/0nuBB/exampleworkspace.tqf
xAOD::Init INFO Environment initialised for data access
RooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby
Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
All rights reserved, please read http://roofit.sourceforge.net/license.txt
starting statistical treatment of the analysis results
INFO: Imported config file '/afs/desy.de/user/n/neundorf/HeavyNeutrinos/AnalysisCode/ssWWAnalysisCode/share/config/statistics/0nuBB/exampleworkspace.tqf'
INFO: Starting Statistics Manager on '/afs/desy.de/user/n/neundorf/HeavyNeutrinos/AnalysisCode/ssWWAnalysisCode/share/config/statistics/0nuBB/exampleworkspace.tqf'
INFO in TSStatisticsManager::run(...) : === CreateModels: CreateModels ===
SFramework/TSStatisticsManager: Creating model 'MyAnalysis'
SFramework/TSModelBuilder: createDefinition(): Creating definition for model 'MyAnalysis' ...
SFramework/TSModelBuilder: collectAllHistograms(): Start collecting histograms...
SFramework/TQSystematicsManager: loadSampleFolder('/afs/desy.de/user/n/neundorf/HeavyNeutrinos/AnalysisCode/sframeworkexamplesample.root:samples',0) - opening...
SFramework/TSModelBuilder: collectHistograms('Nominal'): Collecting histograms...
TUnixSystem::DispatchS... ERROR segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
Thread 2 (Thread 0x7effe3e25700 (LWP 57009)):
#0 0x00007efffd415b3b in do_futex_wait.constprop.1 () from /lib64/libpthread.so.0
#1 0x00007efffd415bcf in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
#2 0x00007efffd415c6b in sem_wait
GLIBC_2.2.5 () from /lib64/libpthread.so.0
#3 0x00007efffd75b948 in PyThread_acquire_lock (lock=lock
entry=0x246ebe0, waitflag=waitflag
entry=1) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/thread_pthread.h:356
#4 0x00007efffd71a276 in PyEval_RestoreThread (tstate=tstate
entry=0x37776b0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:359
#5 0x00007effe3e28546 in floatsleep (secs=<optimized out>) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Modules/timemodule.c:1057
#6 time_sleep (self=<optimized out>, args=<optimized out>) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Modules/timemodule.c:206
#7 0x00007efffd723d3c in call_function (oparg=<optimized out>, pp_stack=0x7effe3e245b8) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:4376
#8 PyEval_EvalFrameEx (f=f
entry=0x7efff03937d0, throwflag=throwflag
entry=0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:3013
#9 0x00007efffd724ab2 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=locals
entry=0x0, args=args
entry=0x7efff037f5e8, argcount=<optimized out>, kws=kws
entry=0x7efffdbde068, kwcount=0, defs=0x0, defcount=0, closure=0x0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:3608
#10 0x00007efffd69dfb6 in function_call (func=0x7efff15551b8, arg=0x7efff037f5d0, kw=0x7efff155ab40) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Objects/funcobject.c:523
#11 0x00007efffd674603 in PyObject_Call (func=func
entry=0x7efff15551b8, arg=arg
entry=0x7efff037f5d0, kw=kw
entry=0x7efff155ab40) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Objects/abstract.c:2544
#12 0x00007efffd71bebd in ext_do_call (nk=<optimized out>, na=<optimized out>, flags=<optimized out>, pp_stack=0x7effe3e24830, func=0x7efff15551b8) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:4690
#13 PyEval_EvalFrameEx (f=f
entry=0x7efff038b938, throwflag=throwflag
entry=0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:3052
#14 0x00007efffd72430b in fast_function (nk=<optimized out>, na=<optimized out>, n=1, pp_stack=0x7effe3e24938, func=0x7efff038e6e0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:4461
#15 call_function (oparg=<optimized out>, pp_stack=0x7effe3e24938) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:4396
#16 PyEval_EvalFrameEx (f=f
entry=0x7effdc000910, throwflag=throwflag
entry=0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:3013
#17 0x00007efffd72430b in fast_function (nk=<optimized out>, na=<optimized out>, n=1, pp_stack=0x7effe3e24a48, func=0x7efff038e848) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:4461
#18 call_function (oparg=<optimized out>, pp_stack=0x7effe3e24a48) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:4396
#19 PyEval_EvalFrameEx (f=f
entry=0x7efffbc99ad0, throwflag=throwflag
entry=0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:3013
#20 0x00007efffd724ab2 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=locals
entry=0x0, args=args
entry=0x7efff037f5a8, argcount=<optimized out>, kws=kws
entry=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:3608
#21 0x00007efffd69defc in function_call (func=0x7efff038e758, arg=0x7efff037f590, kw=0x0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Objects/funcobject.c:523
#22 0x00007efffd674603 in PyObject_Call (func=func
entry=0x7efff038e758, arg=arg
entry=0x7efff037f590, kw=kw
entry=0x0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Objects/abstract.c:2544
#23 0x00007efffd68255c in instancemethod_call (func=0x7efff038e758, arg=0x7efff037f590, kw=0x0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Objects/classobject.c:2600
#24 0x00007efffd674603 in PyObject_Call (func=func
entry=0x7efffda86550, arg=arg
entry=0x7efffdbde050, kw=0x0) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Objects/abstract.c:2544
#25 0x00007efffd71a913 in PyEval_CallObjectWithKeywords (func=0x7efffda86550, arg=0x7efffdbde050, kw=<optimized out>) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/ceval.c:4245
#26 0x00007efffd7602a2 in t_bootstrap (boot_raw=boot_raw
entry=0x378c130) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Modules/threadmodule.c:620
#27 0x00007efffd75b6c7 in pythread_wrapper (arg=<optimized out>) at /build/atnight/localbuilds/nightlies/21.2/build/build/AnalysisBaseExternals/src/Python/Python/thread_pthread.h:178
#28 0x00007efffd40fea5 in start_thread () from /lib64/libpthread.so.0
#29 0x00007efffca2fb0d in clone () from /lib64/libc.so.6
Thread 1 (Thread 0x7efffdc1e740 (LWP 56991)):
#0 0x00007efffc9f6659 in waitpid () from /lib64/libc.so.6
#1 0x00007efffc973f62 in do_system () from /lib64/libc.so.6
#2 0x00007efffc974311 in system () from /lib64/libc.so.6
#3 0x00007efff98e1a93 in TUnixSystem::StackTrace() () from /cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.143/InstallArea/x86_64-centos7-gcc8-opt/bin/../lib/libCore.so
#4 0x00007efff98e42e4 in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.143/InstallArea/x86_64-centos7-gcc8-opt/bin/../lib/libCore.so
#5 <signal handler called>
#6 0x00007effe12faa61 in TQTaggable::findTag(TString) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/QFramework/Root/TQTaggable.cxx:586
#7 0x00007effe12fad18 in TQTaggable::getTag(TString const&, TQValue*&) [clone .localalias.243] () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/QFramework/Root/TQTaggable.cxx:712
#8 0x00007effe12fb1a1 in TQTaggable::getTagInteger (this=this
entry=0x50, key=..., value=value
entry=
0x7fff0ac147fc: 0) at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/QFramework/Root/TQTaggable.cxx:2927
#9 0x00007effe12fb242 in TQTaggable::getTagIntegerDefault (this=this
entry=0x50, key=..., defaultVal=defaultVal
entry=0) at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/QFramework/Root/TQTaggable.cxx:3023
#10 0x00007effd750aba6 in TSModelBuilder::collectHistograms(TQFolder*, TQFolder*, TQSampleFolder*, TQFolder*) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSModelBuilder.cxx:1312
#11 0x00007effd7505c09 in TSModelBuilder::collectHistograms(TQFolder*, TQFolder*, TQFolder*) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSModelBuilder.cxx:628
#12 0x00007effd75065c1 in TSModelBuilder::collectAllHistograms(TQFolder*, TQFolder*) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSModelBuilder.cxx:595
#13 0x00007effd7505773 in TSModelBuilder::finalizeModel(TQFolder*, TQFolder*) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSModelBuilder.cxx:507
#14 0x00007effd745344e in TSBaseActions::CreateModel::execute (this=0x8c67a30, modelConfig=0x92ffb70) at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/ActionCreateModel.cxx:217
#15 0x00007effd751ea51 in TSStatisticsManager::Action::perform(TQFolder*, TSStatisticsManager*) const () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSStatisticsManager.cxx:58
#16 0x00007effd751f9bf in TSStatisticsManager::run(TQFolder*) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSStatisticsManager.cxx:255
#17 0x00007effec35f043 in ?? ()
#18 0x000000000931b860 in ?? ()
#19 0x00007fff0ac15b9f in ?? ()
#20 0x00007fff0ac15b9f in ?? ()
#21 0x00007fff0ac15ad0 in ?? ()
#22 0x0000000100000000 in ?? ()
#23 0x00000000092fae70 in ?? ()
#24 0x00007fff0ac15b80 in ?? ()
#25 0x00007efffb4fe479 in FastCall(long, void*, void*, void*) () from /cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.143/InstallArea/x86_64-centos7-gcc8-opt/lib/libPyROOT.so
===========================================================
The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum
Only if you are really convinced it is a bug in ROOT then please submit a
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 0x00007effe12faa61 in TQTaggable::findTag(TString) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/QFramework/Root/TQTaggable.cxx:586
#7 0x00007effe12fad18 in TQTaggable::getTag(TString const&, TQValue*&) [clone .localalias.243] () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/QFramework/Root/TQTaggable.cxx:712
#8 0x00007effe12fb1a1 in TQTaggable::getTagInteger (this=this
entry=0x50, key=..., value=value
entry=
0x7fff0ac147fc: 0) at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/QFramework/Root/TQTaggable.cxx:2927
#9 0x00007effe12fb242 in TQTaggable::getTagIntegerDefault (this=this
entry=0x50, key=..., defaultVal=defaultVal
entry=0) at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/QFramework/Root/TQTaggable.cxx:3023
#10 0x00007effd750aba6 in TSModelBuilder::collectHistograms(TQFolder*, TQFolder*, TQSampleFolder*, TQFolder*) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSModelBuilder.cxx:1312
#11 0x00007effd7505c09 in TSModelBuilder::collectHistograms(TQFolder*, TQFolder*, TQFolder*) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSModelBuilder.cxx:628
#12 0x00007effd75065c1 in TSModelBuilder::collectAllHistograms(TQFolder*, TQFolder*) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSModelBuilder.cxx:595
#13 0x00007effd7505773 in TSModelBuilder::finalizeModel(TQFolder*, TQFolder*) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSModelBuilder.cxx:507
#14 0x00007effd745344e in TSBaseActions::CreateModel::execute (this=0x8c67a30, modelConfig=0x92ffb70) at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/ActionCreateModel.cxx:217
#15 0x00007effd751ea51 in TSStatisticsManager::Action::perform(TQFolder*, TSStatisticsManager*) const () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSStatisticsManager.cxx:58
#16 0x00007effd751f9bf in TSStatisticsManager::run(TQFolder*) () at /afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/CAFCore/SFramework/Root/TSStatisticsManager.cxx:255
#17 0x00007effec35f043 in ?? ()
#18 0x000000000931b860 in ?? ()
#19 0x00007fff0ac15b9f in ?? ()
#20 0x00007fff0ac15b9f in ?? ()
#21 0x00007fff0ac15ad0 in ?? ()
#22 0x0000000100000000 in ?? ()
#23 0x00000000092fae70 in ?? ()
#24 0x00007fff0ac15b80 in ?? ()
#25 0x00007efffb4fe479 in FastCall(long, void*, void*, void*) () from /cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.143/InstallArea/x86_64-centos7-gcc8-opt/lib/libPyROOT.so
===========================================================
Traceback (most recent call last):
File "/afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/share/statistics.py", line 75, in <module>
main(args)
File "/afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/CAFExample/share/statistics.py", line 49, in main
extype,exsource,extext = QFramework.parseException(ex)
File "/afs/desy.de/user/n/neundorf/dust/HeavyNAnalysis/Example/build/x86_64-centos7-gcc8-opt/python/QFramework/__init__.py", line 114, in parseException
raise RuntimeError("error parsing expression: '"+str(ex.args[0])+"'")
RuntimeError: error parsing expression: 'bool TSStatisticsManager::run(TQFolder* config) =>
problem in C++; program state has been reset'