Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RF] Segfault for RooMomentMorph for ROOT>6.24 #11061

Closed
1 task
VanyaBelyaev opened this issue Jul 27, 2022 · 3 comments · Fixed by #11064
Closed
1 task

[RF] Segfault for RooMomentMorph for ROOT>6.24 #11061

VanyaBelyaev opened this issue Jul 27, 2022 · 3 comments · Fixed by #11064

Comments

@VanyaBelyaev
Copy link

  • Checked for duplicates

There is a segfault in segfault for RooMomentMorph for ROOT>6.24

I am using the example from https://gist.github.com/cranmer/46fff8d22015e5a26619
it was OK for ROOT 6.24 but fails for e.g. dev3 LCG nightly build

Describe the bug

There is a segfault in segfault for RooMomentMorph for ROOT>6.24

Expected behavior

no segfault

To Reproduce

at lxplus:

source /cvmfs/sft.cern.ch/lcg/views/LCG_102/x86_64-centos7-gcc11-opt/setup.sh
python test.py 

where tst.py is a content of https://gist.github.com/cranmer/46fff8d22015e5a26619 with a fixed print statement

Setup

  1. Fails for ROOT > 6.24
  2. lxplus
  3. LCG

Additional context

actuallt my examples are more complicated, but since it fails even for the example from the expert, I use his example

@VanyaBelyaev
Copy link
Author

and a kind of "official" example/tutorial for the RooMomentMorph and RooMomentMorphND will be very useful

@guitargeek guitargeek changed the title segfault for RooMomentMorph for ROOT>6.24 [RF] Segfault for RooMomentMorph for ROOT>6.24 Jul 27, 2022
guitargeek added a commit to guitargeek/root that referenced this issue Jul 27, 2022
In commit 0d1f0bb, some of the legacy iterator usage in
RooMomentMorph was repaced, but not all of it. When the code branches of
the remaining usage is hit now, there will be a crash because the
iterators are uninitialized. This commit fixes that problem by not using
the iterators anymore.

Closes root-project#11061.

Doesn't need any backport, because the problem only got introduced in
this development cycle.
@guitargeek
Copy link
Contributor

Hi, thanks a lot for reporting this! I opened a PR to fix this:
#11064

Are you sure the claim that the version specification "segfault for ROOT>6.24" is correct? I don't get the segfault with ROOT 6.26 for example, only with ROOT 'master`.

@guitargeek guitargeek self-assigned this Jul 28, 2022
guitargeek added a commit to guitargeek/root that referenced this issue Aug 1, 2022
In commit 0d1f0bb, some of the legacy iterator usage in
RooMomentMorph and friends was repaced, but not all of it. When the code
branches of the remaining usage is hit now, there will be a crash
because the iterators are uninitialized. This commit fixes that problem
by not using the iterators anymore.

Closes root-project#11061.

Doesn't need any backport, because the problem only got introduced in
this development cycle.
guitargeek added a commit that referenced this issue Aug 1, 2022
In commit 0d1f0bb, some of the legacy iterator usage in
RooMomentMorph and friends was repaced, but not all of it. When the code
branches of the remaining usage is hit now, there will be a crash
because the iterators are uninitialized. This commit fixes that problem
by not using the iterators anymore.

Closes #11061.

Doesn't need any backport, because the problem only got introduced in
this development cycle.
@VanyaBelyaev
Copy link
Author

Thank you very much for the fix!
I confirm that using LCG nightlies dev3 slot my (more complicated) code with
RooMomentMorph and RooMomentMorphND works perfectly now!
Thank you!

VanyaBelyaev added a commit to OstapHEP/ostap that referenced this issue Aug 3, 2022
VanyaBelyaev added a commit to OstapHEP/ostap that referenced this issue Aug 10, 2022
  1. re-enable again `test_fitting_morphing` for new ROOT,
     see [ROOT/issues/#11061](root-project/root#11061)
  1. add `MorphingN3_pdf` for morphing in 3 variables
  1. more owrisk on easy serialization.  Now we can bypass standard serialization fro almost
     all important Ostap classes.
  1. make Model2D & Model3D PDFS more safe
  1. fix `RooGaussian` serialization fo rOLD version of ROOT
  1. add serialization for `RooFFTConvPdf` instances
  1. add serialization for `RooSimultaneous` instances
  1. make RooCategory more uniform "interface" for RooCategory
  1. split `variables.py` into `variables.py` and `rooreduce.py`
  1. add the proper reduction for the effciency objects
  1. add serisalisation for `RooEfficiency`
  1. add serisalisation for `RooFitResult` (the standard one often gives segfauts)
  1. reduce verbosity for `make_var`
  1. more polishing with verbosity for `make_var`
  1. more polishing for serialisation
  1. add reduction for Breit-Wigner related PDFs
  1. improve BWI model and pdf, add dedicated test

  1. couple of (small) fixes in `variables.py` module
  1. several typos are fixed in construction of 3D-models
  1. `funbasic` : fix typos
  1. fix the treatment of shifts in `Convolution`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants