H2root fails on 64 bit computer

Hello,

I cannot convert hbook files into root files - h2root fails with segmentation violation during the conversion:

Creating branch:q_tot, block:GCPB, fullname:q_tot[gcpart]/F, nsub=1, itype=1, isize=4, ielem=20

*** Break *** segmentation violation
Using host libthread_db library “/lib64/libthread_db.so.1”.
Attaching to program: /proc/4311/exe, process 4311
[Thread debugging using libthread_db enabled]
[New Thread 47128245570112 (LWP 4311)]
0x00002adce6076de5 in waitpid () from /lib64/libc.so.6
#1 0x00002adce601f491 in do_system () from /lib64/libc.so.6
#2 0x00002adce286cad7 in TUnixSystem::StackTrace ()
from /installed/root/lib/libCore.so
#3 0x00002adce286bcba in TUnixSystem::DispatchSignals ()
from /installed/root/lib/libCore.so
#4
#5 0x000000000041561b in hgnt2_ ()
#6 0x00000000004144fe in hgnt1_ ()
#7 0x0000000000414261 in hgnt_ ()
#8 0x0000000000407c57 in convert_cwn ()
#9 0x0000000000409538 in convert_directory ()
#10 0x0000000000409994 in main ()

ROOT is installed on 64 bit version of openSUSE 10.2. The ROOT version is 5.14/00. The processor is 64 bit AMD. gcc version is 4.1.2 20061115 (prerelease) (SUSE Linux). ROOT was installed through compilation from source.

The ./configure command for ROOT installation is:

./configure --with-cern-libdir=/cernlib_root_64 --disable-rfio --disable-ldap --disable-xrootd

I have tried to get the libpacklib.a from two places:

/afs/cern.ch/sw/lcg/external/cernlib/2005/slc4_amd64_gcc34/lib/libpacklib_noshift.a

and from

/afs/desy.de/amd64_rhel30/products/cernlib/2005/lib64/libpacklib.a

Both resulted in same segmentation violation.

The only noteworthy output during ROOT’s installation are the following three lines - otherwise all went OK:

Checking for libpacklib_noshift, libpacklib, packmd, or packlib … /cernlib_root_64
Checking for libkernlib_noshift, libkernlib, kernmd, or kernlib … /cernlib_root_64
Checking for rfio in /cernlib_root_64/libpacklib.a … no

The hbook file is created on a 32 bit Linux computer. It can be successfully converted to root file on 32 bit computers. However, conversion fails on my computer with that and
earlier ROOT versions.

This looks like a 64 bit issue. Could it be because of some deficiency of my Fortran
installation? - I got g77 installed with some difficulties. The output of g77 -v yields:

Reading specs from /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/specs
Configured with: …/configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,f77 --disable-checking --libdir=/usr/lib64 --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-__cxa_atexit x86_64-suse-linux
Thread model: posix
gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)

Otherwise, the C, C++, Fortran compilers and my computer work without problems.

Thanks.

This problem was fixed in version 5.15/02

Rene

I tried that version - same result: h2root fails with segmentation violation.

Maybe I am picking up incorrect libpacklib? What is the correct source for 64 bit AMD?

Thank you.

From the log files (see root.cern.ch/viewcvs/main/src/h2root.cxx)
I see that the fix for AMD64 was introduced on February 19 only (ie 3 days after the 5.15/02 release). To get teh fix you should use the CVS head
or wait for 5.15/04 on March 21.

Rene

[quote=“brun”]From the log files (see root.cern.ch/viewcvs/main/src/h2root.cxx)
I see that the fix for AMD64 was introduced on February 19 only (ie 3 days after the 5.15/02 release). To get teh fix you should use the CVS head
or wait for 5.15/04 on March 21.

Rene[/quote]

I get the same error again.

I got the HEAD version from CVS. The h2root.cxx file in my ROOT installation begins with the following line:

// @(#)root/main:$Name: HEAD $:$Id: h2root.cxx,v 1.29 2007/02/19 08:20:01 brun Exp $

On the ROOT greeting screen, the following version appears:

Version 5.15/03 14 February 2007

Did you install ROOT from source? Which system?
Could you post an hbook file given problem?
We have tried with plenty of files without any problem.

Rene

I installed all the ROOT versions, including the HEAD version, from source. Installation went without problems.

The computer is 64 bit AMD, running openSUSE 10.2.

I have some doubts about libpacklib and my g77 installation. I can compile Fortran code, though.

Is there an independent way to check my Fortran and libpacklib installations for ROOT purposes?

The HBOOK file is attached.

Thank you.
q64.hbook.gz (7.52 KB)

I can reproduce the problem with your file.
Olivier will investigate the problem once he will be back next week.

Rene

I am investigating the problem now. I found that’s not an h2root problem but a hbook one. The ntuple 10 (in q64.hbook) cannot be read by a PAW module in 64 bits mode. So it needs more investigations (meanwhile you can convert your file on a 32 bits machine).

Colleagues confirm that the origin of the error is in cernlib, not in ROOT: when trying to book some histograms using cernlib, the program compiled fine but crashed with the same error during the execution, on 64 bit computer.

I have tried to use several libpacklib-s:

/afs/desy.de/amd64_rhel30/products/cernlib/2005/lib64/libpacklib.a
cernlib.web.cern.ch/cernlib/version.html
and from other places,

all with same segmentation violation. The segmentation violation occurs in Fedora, SUSE, RHEL.

This problem is now fixed in the latest h2root version in CVS. Thanks to have reported it.

Yes, the CVS version works with my Fortran installation and my libpacklib. Thank you.