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

TMinuit::TMinuit data race

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 6.06/04
    • Fix Version/s: 6.08/00, 6.06/06
    • Component/s: Math Libraries
    • Labels:
      None
    • Environment:

      slc6_amd64_gcc530

      Description

      The two TMinuit::TMinuit constructors attempt to protect the specials list from data races:

      gMinuit = this;

      { R__LOCKGUARD2(gROOTMutex); gROOT->GetListOfSpecials()->Add(gMinuit); }

      but unfortunately the protection has a bug, in that gMinuit can be updated by a different thread before being added to the list of specials. CMS is seeing crashes due to corruption of the specials list when the the gMinuit gets added to the list twice. More correct is

      { R__LOCKGUARD2(gROOTMutex); gROOT->GetListOfSpecials()->Add(this); }

      gMinuit = this;

      which adds "this" to the list of specials, and only sets gMinuit after the constructor is done with all other work.

        Attachments

          Activity

            People

            • Assignee:
              pcanal Philippe Canal
              Reporter:
              dsr Daniel Sherman Riley
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: