Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-5335

Crash (and fix) related to ROOT::Math::Factory::CreateMinimizer and TPluginManger during parallel fitting

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.34/00
    • Fix Version/s: None
    • Component/s: Math Libraries
    • Labels:
      None
    • Environment:

      Ubuntu 12.04

      Description

      Hello,

      Performing multi-threaded fitting using Minuit2 and the ROOT::Math::Fitter class resulted in random crashes in random parts of ROOT which were called during fitting. They seemed to be linked to the ROOT::Math::Factory::CreateMinimizer function and the TPluginManager class.

      ROOT forum topics related to the problem are:
      http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=16722
      http://root.cern.ch/phpBB3/viewtopic.php?f=13&t=15472

      Adding a guarding mutex in the CreateMinimizer function of Factory.cxx solved the problem and ROOT is now happily fitting in parallel!

      I am aware that not all of ROOT's minimizers are thread safe (standard Minuit is not), but it works now nicely with Minuit2!

      Attached is (1) an example ROOT script to demonstrate the crash, and (2) an updated Factory.cxx which fixes the issue: Only two lines of code have been added:
      #include "TVirtualMutex.h" and
      R__LOCKGUARD2(gROOTMutex); just before the plugin manager is called.

      While this solves the immediate issues in the math library, in the long run you should make the plugin manager thread safe.

      Cheers,
      Andreas

        Attachments

          Activity

            People

            • Assignee:
              moneta Lorenzo Moneta
              Reporter:
              7c1a9eb1ba422186dff9 zog@ssl.berkeley.edu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Actual End: