Hi,
We often merge ntuples, which do include some multidimensional arrays, using hadd. Recently we attempted merging 104 ntuple files, which are 11 GB all togetgher, using ROOT v5.16’s hadd. This failed with a segmentation fault. I’ve tried some modifications such as adjusting the compression level as an option to hadd, to force the “fast” option to be turned off. Then I went and created a stand alone ROOT application that uses TChain::Merge (without fast specified in the option string), and we do TTree::SetMaxTreeSize large so that all the data is saved to one ROOT file, and that run failed as well with the following backtrace from gdb:
#0 0xffffe410 in __kernel_vsyscall ()
#1 0x56fe37a5 in ldexpf () from /lib/tls/libc.so.6
#2 0x56fe5209 in sighold () from /lib/tls/libc.so.6
#3 0x56f661f7 in __cxa_vec_delete3 () from /usr/lib/libstdc++.so.5
#4 0x56f66244 in __cxa_vec_delete3 () from /usr/lib/libstdc++.so.5
#5 0x56f663b6 in __cxa_vec_delete3 () from /usr/lib/libstdc++.so.5
#6 0x56f66612 in __cxa_vec_delete3 () from /usr/lib/libstdc++.so.5
#7 0x56f666ff in __cxa_vec_delete3 () from /usr/lib/libstdc++.so.5
#8 0x556ad503 in TStorage::ReAllocChar ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libCore.so
#9 0x55677804 in TBuffer::Expand ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libCore.so
#10 0x560f9c33 in TBufferFile::WriteFastArray ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libRIO.so
#11 0x56165b34 in TStreamerInfo::WriteBufferAux<char**> ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libRIO.so
#12 0x560fc2a3 in TBufferFile::WriteClassBuffer ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libRIO.so
—Type to continue, or q to quit—
#13 0x563054c3 in TBranch::Streamer ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libTree.so
#14 0x55706e41 in TClass::Streamer ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libCore.so
#15 0x560fa54f in TBufferFile::WriteObject ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libRIO.so
#16 0x560fa658 in TBufferFile::WriteObjectAny ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libRIO.so
#17 0x556eb2fb in TObjArray::Streamer ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libCore.so
#18 0x55706e41 in TClass::Streamer ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libCore.so
#19 0x560f9ee5 in TBufferFile::WriteFastArray ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libRIO.so
#20 0x561642fd in TStreamerInfo::WriteBufferAux<char**> ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/—Type to continue, or q to quit—
libRIO.so
#21 0x560fc2a3 in TBufferFile::WriteClassBuffer ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libRIO.so
#22 0x56348f93 in TTree::Streamer ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libTree.so
#23 0x561218ec in TKey::TKey ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libRIO.so
#24 0x5610d365 in TFile::CreateKey ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libRIO.so
#25 0x56104909 in TDirectoryFile::WriteTObject ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libRIO.so
#26 0x556909a9 in TObject::Write ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libCore.so
#27 0x55690a1b in TObject::Write ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libCore.so
#28 0x5633e0a7 in TTree::AutoSave ()
—Type to continue, or q to quit—
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libTree.so
#29 0x56342399 in TTree::Fill ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libTree.so
#30 0x5631fd2b in TChain::Merge ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libTree.so
#31 0x5631f787 in TChain::Merge ()
from /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v5.16.00-gl1/root/lib/libTree.so
So I see things are going awry in one of the AutoSaves when trying to resize an array of chars. The memory usage and swap space use is on the high side:
Max Memory : 2127 MB
Max Swap : 2712 MB
I’m wondering if there are any suggestions to work around this - perhaps using SetAutoSave to force writing more often? I’ll go back and try the TChain::Merge with the fast option back on. Any other ideas?
Thanks,
Heather