Description
- [google and issues] Checked for duplicates
Describe the bug
When I use RooUniform inside RooProdPdf, this leads to SIGSEGV during execution.
This code raises:
UniformExpZ neutrino_target_z(
"uniform_exp_z_nt", "uniform (x) exp (z) nt",
z, nt_h_top, nt_h_bot, l
);
RooProdPdf uxy_nt(
"uxy_nt", "uxy_nt",
RooArgList(RooUniform("u_nt_x", "u_nt_x", x),
RooUniform("u_nt_y", "u_nt_y", y))
);
RooProdPdf nt("nt", "nt", RooArgList(uxy_nt, neutrino_target_z));
// fit
RooFitResult *res = nt.fitTo(data, RooFit::Save(true), RooFit::NumCPU(8));
However, when I write RooUniform definition outside of that RooArgList, everything works fine:
RooUniform u_nt_x("u_nt_x", "u_nt_x", x);
RooUniform u_nt_y("u_nt_y", "u_nt_y", y);
RooProdPdf uxy_nt(
"uxy_nt", "uxy_nt",
RooArgList(u_nt_x, u_nt_y)
);
Expected behavior
Should be the same for variables defined inside and outside the constructor.
To Reproduce
- I compile this code with gcc. Sorry if the format of this bug report is not good :/
Setup
- ROOT version 6.22/06.
- Arch Linux.
- Built myself.
Additional context
Unfortunately (I don't know whether it must be considered a bug) the output about the error appears only when I comment out a lot of code. Usually it only writes
Command terminated by signal 11
Here is the output when I manage to get that:
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007f21b73d20ca in wait4 () from /usr/lib64/libc.so.6
#1 0x00007f21b734fd6f in do_system () from /usr/lib64/libc.so.6
#2 0x00007f21b9bfc3c6 in TUnixSystem::StackTrace() () from /opt/root/cur/lib/libCore.so
#3 0x00007f21b9bf9705 in TUnixSystem::DispatchSignals(ESignals) () from /opt/root/cur/lib/libCore.so
#4
#5 0x0000000000000000 in ?? ()
#6 0x00007f21b7bf1322 in RooAbsArg::treeNodeServerList(RooAbsCollection*, RooAbsArg const*, bool, bool, bool, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#7 0x00007f21b7bf880d in RooAbsArg::getObservables(RooArgSet const*, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#8 0x00007f21b7dd0362 in RooProdPdf::factorizeProduct(RooArgSet const&, RooArgSet const&, RooLinkedList&, RooLinkedList&, RooLinkedList&, RooLinkedList&, RooLinkedList&) const () from /opt/root/cur/lib/libRooFitCore.so
#9 0x00007f21b7dd0f20 in RooProdPdf::getPartIntList(RooArgSet const*, RooArgSet const*, char const*) const () from /opt/root/cur/lib/libRooFitCore.so
#10 0x00007f21b7dd5487 in RooProdPdf::getParametersHook(RooArgSet const*, RooArgSet*, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#11 0x00007f21b7bf8758 in RooAbsArg::addParameters(RooArgSet&, RooArgSet const*, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#12 0x00007f21b7bf869d in RooAbsArg::addParameters(RooArgSet&, RooArgSet const*, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#13 0x00007f21b7bfab85 in RooAbsArg::getParameters(RooArgSet const*, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#14 0x00007f21b7c3e251 in RooAbsPdf::createNLL(RooAbsData&, RooLinkedList const&) () from /opt/root/cur/lib/libRooFitCore.so
#15 0x00007f21b7c4447a in RooAbsPdf::fitTo(RooAbsData&, RooLinkedList const&) () from /opt/root/cur/lib/libRooFitCore.so
#16 0x00007f21b7c42c78 in RooAbsPdf::fitTo(RooAbsData&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&) () from /opt/root/cur/lib/libRooFitCore.so
#17 0x000055cbe4ef65ad in fit_small_rho(std::vector<double, std::allocator >, std::vector<double, std::allocator >, std::vector<double, std::allocator >, double, char const*) ()
#18 0x000055cbe4ef2964 in main ()
===========================================================The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum https://root.cern.ch/forum
Only if you are really convinced it is a bug in ROOT then please submit a
report at https://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.
===========================================================
#5 0x0000000000000000 in ?? ()
#6 0x00007f21b7bf1322 in RooAbsArg::treeNodeServerList(RooAbsCollection*, RooAbsArg const*, bool, bool, bool, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#7 0x00007f21b7bf880d in RooAbsArg::getObservables(RooArgSet const*, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#8 0x00007f21b7dd0362 in RooProdPdf::factorizeProduct(RooArgSet const&, RooArgSet const&, RooLinkedList&, RooLinkedList&, RooLinkedList&, RooLinkedList&, RooLinkedList&) const () from /opt/root/cur/lib/libRooFitCore.so
#9 0x00007f21b7dd0f20 in RooProdPdf::getPartIntList(RooArgSet const*, RooArgSet const*, char const*) const () from /opt/root/cur/lib/libRooFitCore.so
#10 0x00007f21b7dd5487 in RooProdPdf::getParametersHook(RooArgSet const*, RooArgSet*, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#11 0x00007f21b7bf8758 in RooAbsArg::addParameters(RooArgSet&, RooArgSet const*, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#12 0x00007f21b7bf869d in RooAbsArg::addParameters(RooArgSet&, RooArgSet const*, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#13 0x00007f21b7bfab85 in RooAbsArg::getParameters(RooArgSet const*, bool) const () from /opt/root/cur/lib/libRooFitCore.so
#14 0x00007f21b7c3e251 in RooAbsPdf::createNLL(RooAbsData&, RooLinkedList const&) () from /opt/root/cur/lib/libRooFitCore.so
#15 0x00007f21b7c4447a in RooAbsPdf::fitTo(RooAbsData&, RooLinkedList const&) () from /opt/root/cur/lib/libRooFitCore.so
#16 0x00007f21b7c42c78 in RooAbsPdf::fitTo(RooAbsData&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&) () from /opt/root/cur/lib/libRooFitCore.so
#17 0x000055cbe4ef65ad in fit_small_rho(std::vector<double, std::allocator >, std::vector<double, std::allocator >, std::vector<double, std::allocator >, double, char const*) ()
#18 0x000055cbe4ef2964 in main ()
===========================================================Command exited with non-zero status 139