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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • master
    • 6.12/08, 6.14/00
    • None
    • None
    • 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

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

            Dates

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