Hi, weird error here with an unfortunately bad test case.
We are trying to update documentation and testing for RooUnfold (http://roounfold.web.cern.ch and RooUnfold / RooUnfold · GitLab) but although everything compiles as normal on all linux servers (and all of our CI and all the SWAN instances I tried with) even the simplest call to our new base class containing all the main updates we would like to share crashes without info when run on a m1 Mac.
I’ve tried several versions of ROOT now, through Conda, Brew, compiling from source (only takes a few minutes!) and even using the latest docker image. Always the same error in the same place. RooUnfold compiles and links without issue. but calling the class fails.
A sample code is attached but will need to follow the RooUnfold install instructions. This gives the following stack trace:
*** Break *** segmentation violation
[/Users/vincentcroft/ROOT/lib/libCore.so] TUnixSystem::DispatchSignals(ESignals) (no debug info)
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/Users/vincentcroft/ROOT/lib/libHistFactory.so] ParamHistFunc::evaluate() const (no debug info)
[/Users/vincentcroft/ROOT/lib/libRooFitCore.so] RooAbsReal::traceEval(RooArgSet const*) const (no debug info)
[/Users/vincentcroft/ROOT/lib/libRooFitCore.so] RooAbsReal::getValV(RooArgSet const*) const (no debug info)
[/Users/vincentcroft/ROOT/lib/libRooFitCore.so] RooProduct::evaluate() const (no debug info)
[/Users/vincentcroft/ROOT/lib/libRooFitCore.so] RooAbsReal::traceEval(RooArgSet const*) const (no debug info)
[/Users/vincentcroft/ROOT/lib/libRooFitCore.so] RooAbsReal::getValV(RooArgSet const*) const (no debug info)
[/Users/vincentcroft/RooUnfold/build/libRooUnfold.dylib] RooAbsReal::getVal(RooArgSet const*) const /Users/vincentcroft/ROOT/include/RooAbsReal.h:108
[/Users/vincentcroft/RooUnfold/build/libRooUnfold.dylib] (anonymous namespace)::findParameters(RooUnfolding::RooFitHist*, int, std::__1::vector<RooRealVar*, std::__1::allocator<RooRealVar*> > const&) /Users/vincentcroft/RooUnfold/src/RooUnfoldFitHelpers.cxx:421
[/Users/vincentcroft/RooUnfold/build/libRooUnfold.dylib] (anonymous namespace)::findDependantsPerBin(RooUnfolding::RooFitHist*, std::__1::vector<RooRealVar*, std::__1::allocator<RooRealVar*> > const&, std::__1::vector<RooRealVar*, std::__1::allocator<RooRealVar*> >&) /Users/vincentcroft/RooUnfold/src/RooUnfoldFitHelpers.cxx:438
[/Users/vincentcroft/RooUnfold/build/libRooUnfold.dylib] RooUnfolding::RooFitHist::RooFitHist(RooAbsReal*, std::__1::vector<RooAbsArg*, std::__1::allocator<RooAbsArg*> > const&, std::__1::vector<RooRealVar*, std::__1::allocator<RooRealVar*> > const&) /Users/vincentcroft/RooUnfold/src/RooUnfoldFitHelpers.cxx:518
[/Users/vincentcroft/RooUnfold/build/libRooUnfold.dylib] RooUnfoldSpec::makeHistogram(RooUnfoldSpec::HistContainer const&, double) /Users/vincentcroft/RooUnfold/src/RooFitUnfold.cxx:619
[/Users/vincentcroft/RooUnfold/build/libRooUnfold.dylib] RooUnfoldSpec::makeResponse() /Users/vincentcroft/RooUnfold/src/RooFitUnfold.cxx:689
[/Users/vincentcroft/RooUnfold/build/libRooUnfold.dylib] RooUnfoldSpec::unfold(RooUnfolding::Algorithm, double) /Users/vincentcroft/RooUnfold/src/RooFitUnfold.cxx:754
[/Users/vincentcroft/RooUnfold/build/libRooUnfold.dylib] RooUnfoldSpec::makeFunc(RooUnfolding::Algorithm, double) /Users/vincentcroft/RooUnfold/src/RooFitUnfold.cxx:886
[<unknown binary>] (no debug info)
[/Users/vincentcroft/ROOT/lib/libcppyy_backend3_9.so] WrapperCall(long, unsigned long, void*, void*, void*) (no debug info)
[/Users/vincentcroft/ROOT/lib/libcppyy_backend3_9.so] Cppyy::CallR(long, void*, unsigned long, void*) (no debug info)
[/Users/vincentcroft/ROOT/lib/libcppyy3_9.so] CPyCppyy::(anonymous namespace)::InstancePtrExecutor::Execute(long, void*, CPyCppyy::CallContext*) (no debug info)
[/Users/vincentcroft/ROOT/lib/libcppyy3_9.so] CPyCppyy::CPPMethod::ExecuteFast(void*, long, CPyCppyy::CallContext*) (no debug info)
[/Users/vincentcroft/ROOT/lib/libcppyy3_9.so] CPyCppyy::CPPMethod::ExecuteProtected(void*, long, CPyCppyy::CallContext*) (no debug info)
[/Users/vincentcroft/ROOT/lib/libcppyy3_9.so] CPyCppyy::CPPMethod::Call(CPyCppyy::CPPInstance*&, _object*, _object*, CPyCppyy::CallContext*) (no debug info)
[/Users/vincentcroft/ROOT/lib/libcppyy3_9.so] CPyCppyy::(anonymous namespace)::mp_call(CPyCppyy::CPPOverload*, _object*, _object*) (no debug info)
[/Users/vincentcroft/miniforge3/bin/python3.9] _PyObject_MakeTpCall (no debug info)
[/Users/vincentcroft/miniforge3/bin/python3.9] call_function (no debug info)
[/Users/vincentcroft/miniforge3/bin/python3.9] _PyEval_EvalFrameDefault (no debug info)
[/Users/vincentcroft/miniforge3/bin/python3.9] _PyEval_EvalCode (no debug info)
[/Users/vincentcroft/miniforge3/bin/python3.9] pyrun_file (no debug info)
[/Users/vincentcroft/miniforge3/bin/python3.9] PyRun_SimpleFileExFlags (no debug info)
[/Users/vincentcroft/miniforge3/bin/python3.9] Py_RunMain (no debug info)
[/Users/vincentcroft/miniforge3/bin/python3.9] pymain_main (no debug info)
[/Users/vincentcroft/miniforge3/bin/python3.9] main (no debug info)
[/usr/lib/dyld] start (no debug info)
Traceback (most recent call last):
File "/Users/vincentcroft/test_pur.py", line 88, in <module>
response = spec.makeFunc(ROOT.RooUnfolding.kInvert).unfolding().response()
cppyy.ll.SegmentationViolation: RooAbsReal* RooUnfoldSpec::makeFunc(RooUnfolding::Algorithm alg, double regparam = -1.0E+30) =>
SegmentationViolation: segfault in C++; program state was reset
test_RooUnfoldSpec.py (1.3 KB)
a very strange bug I think. I’m happy to wrestle with it more if there’s an easier way to look at this problem. I thought docker would help diagnose but alas. I think about 95% of our users get the code from cvmfs, or otherwise on institute clusters so it’s not been an issue yet but makes any local development really tough.