-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Access of deleted object during hadd tear down. #9017
Copy link
Copy link
Closed
Description
As reported in https://root-forum.cern.ch/t/pure-virtual-method-called-on-hadding-tfiles-with-tfriendelements/46836/6
(see there for reproducer), hadd at tear down accesses already deleted objects.
In version of ROOT equal or newer than v6.22/08 and v6.24/00, the problem appears only in a slow merge. (for example hadd -f0 output.root testroot_1,root testroot_2.root)
The resulting stack trace is:
==1241== Process terminating with default action of signal 6 (SIGABRT)
==1241== at 0x5BB618B: raise (raise.c:51)
==1241== by 0x5B9592D: abort (abort.c:100)
==1241== by 0x58C2910: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1241== by 0x58CE38B: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1241== by 0x58CE3F6: std::terminate() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1241== by 0x58CF154: __cxa_pure_virtual (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1241== by 0x551449A: TCollection::RecursiveRemove(TObject*) (TCollection.cxx:579)
==1241== by 0x4A345D0: TTree::RecursiveRemove(TObject*) (TTree.cxx:7857)
==1241== by 0x551F16F: TList::RecursiveRemove(TObject*) (TList.cxx:813)
==1241== by 0x5518879: THashList::RecursiveRemove(TObject*) (THashList.cxx:354)
==1241== by 0x543C003: TROOT::RecursiveRemove(TObject*) (TROOT.cxx:2455)
==1241== by 0x496B26E: ROOT::CallRecursiveRemoveIfNeeded(TObject&) (TROOT.h:398)
==1241== by 0x5512E61: TCollection::~TCollection() (TCollection.cxx:189)
==1241== by 0x5506D19: TSeqCollection::~TSeqCollection() (TSeqCollection.h:37)
==1241== by 0x551BE8E: TList::~TList() (TList.cxx:92)
==1241== by 0x551BEAD: TList::~TList() (TList.cxx:95)
==1241== by 0x4A1DE02: TTree::~TTree() (TTree.cxx:975)
==1241== by 0x4A1E2C7: TTree::~TTree() (TTree.cxx:1023)
==1241== by 0x4A308E9: TTree::Merge(TCollection*, TFileMergeInfo*) (TTree.cxx:6908)
==1241== by 0x4960BA2: ROOT::merge_TTree(void*, TCollection*, TFileMergeInfo*) (G__Tree.cxx:4209)
==1241== by 0x4E739D6: TFileMerger::MergeOne(TDirectory*, TList*, int, TFileMergeInfo&, TString&, THashList&, bool&, bool&, TString const&, TDirectory*, TFile*, TKey*, TObject*, TIter&) (TFileMerger.cxx:660)
==1241== by 0x4E74D94: TFileMerger::MergeRecursive(TDirectory*, TList*, int) (TFileMerger.cxx:878)
==1241== by 0x4E756AF: TFileMerger::PartialMerge(int) (TFileMerger.cxx:968)
==1241== by 0x4E72210: TFileMerger::Merge(bool) (TFileMerger.cxx:372)
==1241== by 0x119013: main::{lambda(TFileMerger&)#1}::operator()(TFileMerger&) const (hadd.cxx:473)
==1241== by 0x119407: main::{lambda(TFileMerger&, int, int)#2}::operator()(TFileMerger&, int, int) const (hadd.cxx:501)
==1241== by 0x11B82E: main (hadd.cxx:543)
Reactions are currently unavailable