Segmentation Violation in RooAbsReal::derivative if AsymptoticError enabled in RooAbsPdf::fitTo

Dear Rooters,

I am trying the new AsymptoticError flag introduced in Root 6.20. Sadly it breaks in RooAbsReal::derivative, as it seems, with the following stack trace:

===========================================================
#5  0x00007efd7156e447 in RooAbsReal::derivative(RooRealVar&, RooArgSet const&, int, double) () from /nfs/monet/products/ROOT/v6-20-04-gcc-4.9-amd64/lib/libRooFitCore.so
#6  0x00007efd71567cd7 in RooAbsPdf::fitTo(RooAbsData&, RooLinkedList const&) () from /nfs/monet/products/ROOT/v6-20-04-gcc-4.9-amd64/lib/libRooFitCore.so
#7  0x00007efd71564c5d in RooAbsPdf::fitTo(RooAbsData&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&) () from /nfs/monet/products/ROOT/v6-20-04-gcc-4.9-amd64/lib/libRooFitCore.so
#8  0x00007efd7e68f58c in ?? ()
#9  0x00007ffd7280d208 in ?? ()
#10 0x00007ffd7280d100 in ?? ()
#11 0x00007ffd7280cff8 in ?? ()
#12 0x00007efd7191d440 in ROOT::Internal::THashConsistencyHolder<RooClassFactory const&>::fgHashConsistency () from /nfs/monet/products/ROOT/v6-20-04-gcc-4.9-amd64/lib/libRooFitCore.so
#13 0x00007efd6f91aeda in ?? () from /nfs/monet/products/ROOT/v6-20-04-gcc-4.9-amd64/lib/libRooStats.so
#14 0x00000000875717a0 in ?? ()
#15 0x00000000021d5c5e in ?? ()
#16 0x00007ffd7280c604 in ?? ()
#17 0x00007efd000023f1 in ?? ()
#18 0x00007ffd7280c6d0 in ?? ()
#19 0x00007efd6f8cc9e0 in ?? () from /nfs/monet/products/ROOT/v6-20-04-gcc-4.9-amd64/lib/libRooStats.so
#20 0x00007ffd7280c6c0 in ?? ()
#21 0x000000000439bf60 in ?? ()
#22 0x0000000000000024 in ?? ()
#23 0x000000007280c684 in ?? ()
#24 0x0000000000000000 in ?? ()
===========================================================

Things checked

  • The segmentation violation does not depend on the Extended flag
  • I checked 2 different PDFs (Exponential and Gaussian). In both cases there is the segfault.
  • The example $ROOTSYS/tutorial/roofit/rf611_weightedfits.C is working.

Questions

  • Am I doing something wrong ? The fit is working fine without the AsymptoticError flag. So I hope there is no stupid mistake on my side.
  • Do you have any ideas, what I could try?

On the Example

  • 3 Variables:
    • Discriminating variable mass (Exponential Background, Gaussian Signal)
    • 2 Control variables:
      • Vgg (Gaussian Background, Gaussian Signal)
      • Vexex (Exponential Background, Exponential Signal)
  • The Configurator class holds the parameter values. The model is then build via the ModelBuilder class. The main macro is DoAsymptoticErrFit.C.
  • If you would like to reproduce the problem

ROOT version

Tested on:

    • ROOT Version: 6.20/00,
    • Built for linuxx8664gcc on Mar 02 2020, 19:27:00,
    • From tags/v6-20-00@v6-20-00
    • On Ubuntu 18.04.4 LTS
    • ROOT Version: 6.20/04,
    • Built for linuxx8664gcc on Apr 13 2020, 15:48:00
    • From v6-20-04@v6-20-04
    • On Debian GNU/Linux 8 (jessie)

Damn, I even pointed you to this as a new feature. :slight_smile:

I believe you are a victim of this bug:
https://sft.its.cern.ch/jira/browse/ROOT-10668

If you are able to test this on lxplus, you can use one of ROOT’s nightly versions:
https://root.cern/nightlies

A workaround until the next release is to use identical name and title.

Sorry for that :wink:

Sorry I have searched the Jira ticktets but I have overseen this :frowning_face:

I will check if it also happens in the nightlies and if setting name=title solves it. If so I will mark it as solution.

Thanks a lot :smile:

Setting the title equal to the name for the RooRealVars, the macro runs without segmentation violation. But I got tons of error messages like:

[#1] INFO:Fitting -- RooAbsPdf::fitTo(pdfExtVexexSig) Calculating
covariance matrix according to the asymptotically correct approach. If
you find this method useful please consider citing
https://arxiv.org/abs/1911.01303.
[#0] ERROR:Eval -- RooAbsReal::logEvalError(pdfExtVexexSig) evaluation
error,

[#0] ERROR:Eval -- RooAbsReal::logEvalError(pdfExtVexexSig) evaluation
error,
 origin       : RooExtendPdf::pdfExtVexexSig[ pdf=pdfVexexSig n=nSigFit ]
 message      : p.d.f value is Not-a-Number (-nan), forcing value to zero
 server values: pdf=pdfVexexSig=inf/inf, n=nSigFit=19995.6 ± 141.406

This could be solved by setting reasonable limits to the p.d.f. parameters.
On lxplus, using a nightly, only setting the parameter limits was necessary.

At the moment the errors returned using AsymptoticError look strange. But this is not the topic of this post. If necessary, I will open another topic :wink:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.