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

TTreeProcessorMT segfaults when constructed from a tree that is not on disk

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 6.10/04
    • Fix Version/s: 6.14/00
    • Component/s: None
    • Labels:
      None
    • Environment:

      any

    • Development:

      Description

      Reproducer:

      #include "TFile.h"
      #include "TTree.h"
      #include "ROOT/TTreeProcessorMT.hxx"
       
      int main() {
         TFile f("f.root", "RECREATE");
         TTree t("t", "t");
         ROOT::TTreeProcessorMT tp(t);
         return 0;
      }

      Stacktrace:

      Error in <TFile::ReadBuffer>: error reading all requested bytes from file f.root, got 208 of 300
      Error in <TFile::Init>: f.root failed to read the file type data.
       
       *** Break *** segmentation violation
       
       
       
      ===========================================================
      There was a crash.
      This is the entire stack trace of all threads:
      ===========================================================
      #0  0x00007fab4f4e5fba in __GI___waitpid (pid=8276, stat_loc=stat_loc
      entry=0x7ffc5b4fa6e0, options=options
      entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
      #1  0x00007fab4f46d07b in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
      #2  0x00007fab538598c2 in TUnixSystem::Exec (shellcmd=<optimized out>, this=0x5595a0b4f4f0) at /home/eguiraud/ROOT/root/core/unix/src/TUnixSystem.cxx:2118
      #3  TUnixSystem::StackTrace (this=0x5595a0b4f4f0) at /home/eguiraud/ROOT/root/core/unix/src/TUnixSystem.cxx:2412
      #4  0x00007fab5385bd2c in TUnixSystem::DispatchSignals (this=0x5595a0b4f4f0, sig=kSigSegmentationViolation) at /home/eguiraud/ROOT/root/core/unix/src/TUnixSystem.cxx:3643
      #5  <signal handler called>
      #6  ROOT::Internal::TTreeView::Init (this=<optimized out>) at /home/eguiraud/ROOT/root_build/include/ROOT/TTreeProcessorMT.hxx:86
      #7  ROOT::Internal::TTreeView::TTreeView (this=0x5595a1a46560, tree=...) at /home/eguiraud/ROOT/root_build/include/ROOT/TTreeProcessorMT.hxx:146
      #8  0x00007fab505953c1 in ROOT::TThreadedObject<ROOT::Internal::TTreeView>::TThreadedObject<TTree&> (this=0x7ffc5b4fcf60) at /home/eguiraud/ROOT/root_build/include/ROOT/TThreadedObject.hxx:161
      #9  ROOT::TTreeProcessorMT::TTreeProcessorMT (this=0x7ffc5b4fcf60, tree=...) at /home/eguiraud/ROOT/root/tree/treeplayer/src/TTreeProcessorMT.cxx:51
      #10 0x00005595a01d1ee9 in main () at asd.cpp:8
      ===========================================================
       
       
      The lines below might hint at the cause of the crash.
      You may get help by asking at the ROOT forum http://root.cern.ch/forum.
      Only if you are really convinced it is a bug in ROOT then please submit a
      report at http://root.cern.ch/bugs. Please post the ENTIRE stack trace
      from above as an attachment in addition to anything else
      that might help us fixing this issue.
      ===========================================================
      #6  ROOT::Internal::TTreeView::Init (this=<optimized out>) at /home/eguiraud/ROOT/root_build/include/ROOT/TTreeProcessorMT.hxx:86
      #7  ROOT::Internal::TTreeView::TTreeView (this=0x5595a1a46560, tree=...) at /home/eguiraud/ROOT/root_build/include/ROOT/TTreeProcessorMT.hxx:146
      #8  0x00007fab505953c1 in ROOT::TThreadedObject<ROOT::Internal::TTreeView>::TThreadedObject<TTree&> (this=0x7ffc5b4fcf60) at /home/eguiraud/ROOT/root_build/include/ROOT/TThreadedObject.hxx:161
      #9  ROOT::TTreeProcessorMT::TTreeProcessorMT (this=0x7ffc5b4fcf60, tree=...) at /home/eguiraud/ROOT/root/tree/treeplayer/src/TTreeProcessorMT.cxx:51
      #10 0x00005595a01d1ee9 in main () at asd.cpp:8
      ===========================================================

        Attachments

          Activity

            People

            Assignee:
            etejedor Enric Tejedor Saavedra
            Reporter:
            eguiraud Enrico Guiraud
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Actual End: