a strange behavior in TTree::ChangeFile

From: Kazuyoshi Furutaka <furutaka_at_jb3.so-net.ne.jp>
Date: Tue, 03 Apr 2007 22:46:05 +0900 (JST)


Dear rooters,

I wrote a routine which loops over filling of a TTree consisting of about 40 C-style struct data (2 UShort_t's and a Float_t) and store the TTree in a .root file.

When the size of the file exceeds about
1.9GB, TTree::ChageFile is called; just
after the call a segmentation fault occurs. The size of the .root file is 1903347510 bytes.

If I break the filling loop before the file grows larger enough (say about a few thousand of the data), the error doesn't occur.

Also, if I double the max tree size
(TTree::SetMaxTreeSize(3800000000)),
it works without SegV.

How can I avoid the error without increasing the tree size?
I'll appreciate any suggestions.

The attached is a part of a backtrace of a gdb session.

My environment is:
Linux, Fedora Core release 6 (Zod), running kernel 2.6.20-1.2933.fc6 #1 SMP
on a Core 2 Duo machine (i386).
Root Version 5.15/04, built with
g++ (GCC) 4.1.1 20070105 (Red Hat 4.1.1-51). (The routine was also compiled using the ACLiC.)

Thanks in advance.

Yours,
Kazuyoshi

--
Kazuyoshi Furutaka
furutaka_at_jb3.so-net.ne.jp

nev = 34600000 nev = 34700000 Warning in <TTree::ChangeFile>: file coin18387_prjTreeKim_1.root already exist, trying with 2 underscores Warning in <TTree::ChangeFile>: file coin18387_prjTreeKim__1.root already exist, trying with 3 underscores Fill: Switching to new file: coin18387_prjTreeKim___1.root ====================================== Block number = 1698408 info: 0 type: 3 ID: 0 Serial: 60033 LastByte:3 ====================================== ====================================== I N F O ====================================== run#: 18387 evsize: 88 version:1 list-id:Coincidence date: Tue Nov 21 20:29:45 event: SAD\8192\0x8100\0xff00,FER\2048\0x8300\0xff00 (LAST) ====================================== Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1208834352 (LWP 21623)] 0x4613b538 in main_arena () from /lib/libc.so.6 (gdb) bt
#0 0x4613b538 in main_arena () from /lib/libc.so.6
#1 0x00ee84d9 in prjTreeKim (ifnam=@0xbfbac5d8, rootfnam=@0xbfbac5d4,
calfnam=@0xbfbac5cc) at /home/furutaka/res/ana/KUR2006Nov/Run18387-NaCl/./../prjTreeKim.C:366
#2 0x00ee8812 in G__fileKx8Fep__0_1293 (result7=0xbfbba004,
funcname=0x8d38250 "\001", libp=0xbfbb6560, hash=0) at /home/furutaka/res/ana/KUR2006Nov/Run18387-NaCl/./../fileKx8Fep.cxx:260
#3 0x009851ad in Cint::G__ExceptionWrapper ()
from /usr/local/root/lib/libCint.so
#4 0x00a5f0a8 in G__call_cppfunc () from /usr/local/root/lib/libCint.so
#5 0x00a3b212 in G__interpret_func () from /usr/local/root/lib/libCint.so
#6 0x00a2c796 in G__getfunction () from /usr/local/root/lib/libCint.so
#7 0x00a038fb in G__getitem () from /usr/local/root/lib/libCint.so
#8 0x00a12f73 in G__getexpr () from /usr/local/root/lib/libCint.so
#9 0x00a7ebd8 in G__exec_function () from /usr/local/root/lib/libCint.so
#10 0x00a8406d in G__exec_statement () from /usr/local/root/lib/libCint.so
#11 0x009ee645 in G__exec_tempfile_core () from /usr/local/root/lib/libCint.so
#12 0x009ee8c5 in G__exec_tempfile () from /usr/local/root/lib/libCint.so
#13 0x00a90cc7 in G__process_cmd () from /usr/local/root/lib/libCint.so
#14 0x003b54a3 in TCint::ProcessLine () from /usr/local/root/lib/libCore.so
#15 0x003b0114 in TCint::ProcessLineSynch ()
from /usr/local/root/lib/libCore.so
#16 0x003279af in TApplication::ProcessFile ()
from /usr/local/root/lib/libCore.so
#17 0x003259ae in TApplication::ProcessLine ()
from /usr/local/root/lib/libCore.so
#18 0x0011b534 in TRint::HandleTermInput () from /usr/local/root/lib/libRint.so
#19 0x0011abad in TTermInputHandler::Notify ()
from /usr/local/root/lib/libRint.so
#20 0x0011cbd6 in TTermInputHandler::ReadNotify ()
from /usr/local/root/lib/libRint.so
#21 0x003e060c in TUnixSystem::CheckDescriptors ()
from /usr/local/root/lib/libCore.so
#22 0x003e0be2 in TUnixSystem::DispatchOneEvent ()
---Type <return> to continue, or q <return> to quit--- from /usr/local/root/lib/libCore.so
#23 0x00376a33 in TSystem::InnerLoop () from /usr/local/root/lib/libCore.so
#24 0x00378041 in TSystem::Run () from /usr/local/root/lib/libCore.so
#25 0x00324b8c in TApplication::Run () from /usr/local/root/lib/libCore.so
#26 0x0011c9d9 in TRint::Run () from /usr/local/root/lib/libRint.so
#27 0x08048cb0 in main ()
(gdb) quit The program is running. Exit anyway? (y or n) y

Received on Tue Apr 03 2007 - 15:46:39 CEST

This archive was generated by hypermail 2.2.0 : Tue Apr 03 2007 - 17:50:03 CEST