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

TMinuit and TH2::DoProjection interfere when using threads

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 6.10/00, 6.08/08
    • 6.08/06
    • Core Libraries
    • None
    • SL6

    Description

      CMS has been seeing a periodic crash involving TH2::DoProjection while another thread happens to be doing a minimization. The incidents can be seen here
      https://github.com/cms-sw/cmssw/issues/18620

      The problem is the following:
      TH2::DoProjection calls TROOT::FindObject
      https://root.cern.ch/doc/master/TH2_8cxx_source.html#l02086

      TROOT::FindObject reads fSpecials without taking the lock
      https://root.cern.ch/doc/master/TROOT_8cxx_source.html#l01202

      while TMinuit manipulates the list of specials while holding a lock. E.g.
      https://root.cern.ch/doc/master/TMinuit_8cxx_source.html#l00463

      If TH2::DoProjection is running concurrently as TMinuit is begin used, it leads to a data race which causes the crash.

      Attachments

        Activity

          People

            pcanal Philippe Canal
            chrjones Christopher Jones
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual End: