Hi,
I found that the following code crashed with multiple files on PROOF-Lite.
[code]void mySelector::Init(TTree *tree)
{
if (!newTree) {
newTree = (TTree*)tree->CloneTree(0);
newTree->SetName(“newTree”);
newTree->SetDirectory(fFile);
newTree->AutoSave();
} else {
tree->CopyAddresses(newTree);
}
}
Bool_t tmySelector::Process(Long64_t entry)
{
GetEntry(entry);
… selection here …
newTree->Fill();
return kTRUE;
}
[/code]
and got error at processing the second file on each worker:
[quote]15:55:45 19124 Wrk-0.0 | *** Break ***: segmentation violation
There was a crash.
This is the entire stack trace of all threads:
#0 0x00002b95caf7c335 in waitpid () from /lib64/libc.so.6
#1 0x00002b95caf1f2e1 in do_system () from /lib64/libc.so.6
#2 0x00002b95c8fb6e9a in TUnixSystem::StackTrace ()
from /afs/usatlas.bnl.gov/cernsw/lcg/app/releases/ROOT/5.26.00/x86_64-slc5-gcc43
-opt/root/lib/libCore.so
#3 0x00002b95c8fb7895 in TUnixSystem::DispatchSignals ()
from /afs/usatlas.bnl.gov/cernsw/lcg/app/releases/ROOT/5.26.00/x86_64-slc5-gcc43
-opt/root/lib/libCore.so
#4
#5 0x00002b95cc648402 in TBranch::GetFile ()
from /afs/usatlas.bnl.gov/cernsw/lcg/app/releases/ROOT/5.26.00/x86_64-slc5-gcc43
-opt/root/lib/libTree.so
#6 0x00002b95cc64114e in TBasket::WriteBuffer ()
from /afs/usatlas.bnl.gov/cernsw/lcg/app/releases/ROOT/5.26.00/x86_64-slc5-gcc43
-opt/root/lib/libTree.so
#7 0x00002b95cc648f15 in TBranch::WriteBasket ()
from /afs/usatlas.bnl.gov/cernsw/lcg/app/releases/ROOT/5.26.00/x86_64-slc5-gcc43
-opt/root/lib/libTree.so
#8 0x00002b95cc649543 in TBranch::Fill ()
from /afs/usatlas.bnl.gov/cernsw/lcg/app/releases/ROOT/5.26.00/x86_64-slc5-gcc43-opt/root/lib/libTree.so
#9 0x00002b95cc68f8d5 in TTree::Fill ()
from /afs/usatlas.bnl.gov/cernsw/lcg/app/releases/ROOT/5.26.00/x86_64-slc5-gcc43-opt/root/lib/libTree.so
#10 0x00002b95ceae9980 in mySelector::Process ()
[/quote]
But if I changed the directory to fFile prior to CloneTree, everything started to work fine.
[code]void mySelector::Init(TTree *tree)
{
if (!newTree) {
fFile->cd();
newTree = (TTree*)tree->CloneTree(0);
newTree->SetName(“newTree”);
// newTree->SetDirectory(fFile);
newTree->AutoSave();
} else {
tree->CopyAddresses(newTree);
}
}
[/code]
Any idea why the first one without “fFile->cd()” failed on PROOF?
–Shuwei