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

[TDF] Crash when snapshotting trees with friends from multiple threads

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: master
    • Fix Version/s: 6.12/08, 6.14/00
    • Component/s: None
    • Labels:
      None
    • Environment:

      any

      Description

      First reported by Kim Albertsson here.
      Reproducer:

      #include "ROOT/TDataFrame.hxx"
      using namespace ROOT::Experimental;
       
      int main()
      {
         TDataFrame(10).Define("x", []() { return 10; }).Snapshot<int>("t","f.root", {"x"});
         TDataFrame(10).Define("y", []() { return 10; }).Snapshot<int>("t","f2.root", {"y"});
       
         // uncomment to crash
         ROOT::EnableImplicitMT();
       
         TFile file("f.root");
         TTree *tree = static_cast<TTree*>(file.Get("t"));
         tree->AddFriend("t", "f2.root");
       
         TDataFrame df(*tree);
         // does not crash
         *df.Histo1D<int>("x");
         // crash
         df.Snapshot<int,int>("t", "out.root", {"x", "y"});
       
         return 0;
      }
      

        Attachments

          Activity

            People

            Assignee:
            eguiraud Enrico Guiraud
            Reporter:
            eguiraud Enrico Guiraud
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Actual Start:
              Actual End: