SIGSEGV signal with h2root version 5.22.00

Hello,

The h2root program from version 5.22.00 of ROOT crashes
while old version works fine (eg. with 5.18.00d):

h2root ped_7072.rz

*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library “/lib64/tls/libthread_db.so.1”.
Attaching to program: /proc/17032/exe, process 17032
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
[Thread debugging using libthread_db enabled]
[New Thread 182954234432 (LWP 17032)]
(no debugging symbols found)…done.
(no debugging symbols found)…done.
0x000000375d78f504 in waitpid ()
from /lib64/tls/libc.so.6
#1 0x000000375d739a1f in do_system () from /lib64/tls/libc.so.6
#2 0x0000002a957c30ab in TUnixSystem::StackTrace ()
from /usr/local/root/root_v5.22.00/root//lib/root/libCore.so
#3 0x0000002a957bfc7a in TUnixSystem::DispatchSignals ()
from /usr/local/root/root_v5.22.00/root//lib/root/libCore.so
#4
#5 0x0000002a984b1927 in mzstor_ ()
from /usr/local/root/root_v5.22.00/root//lib/root/libminicern.so
#6 0x0000002a984b12ae in mzpaw_ ()
from /usr/local/root/root_v5.22.00/root//lib/root/libminicern.so
#7 0x0000002a984a653c in hlimit_ ()
from /usr/local/root/root_v5.22.00/root//lib/root/libminicern.so
#8 0x00000000004042fe in main ()

gdb which h2root
GNU gdb Red Hat Linux (6.3.0.0-1.143.el4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “x86_64-redhat-linux-gnu”…(no debugging symbols found)
Using host libthread_db library “/lib64/tls/libthread_db.so.1”.

(gdb) run ped_7072.rz
Starting program: /afs/in2p3.fr/system/amd64_sl4/usr/local/root/root_v5.22.00/root/bin/h2root ped_7072.rz
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 182954234432 (LWP 17182)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182954234432 (LWP 17182)]
0x0000002a984b1927 in mzstor_ () from /usr/local/root/root_v5.22.00/root//lib/root/libminicern.so
(gdb) where
#0 0x0000002a984b1927 in mzstor_ () from /usr/local/root/root_v5.22.00/root//lib/root/libminicern.so
#1 0x0000002a984b12ae in mzpaw_ () from /usr/local/root/root_v5.22.00/root//lib/root/libminicern.so
#2 0x0000002a984a653c in hlimit_ () from /usr/local/root/root_v5.22.00/root//lib/root/libminicern.so
#3 0x00000000004042fe in main ()
(gdb)

Note that h2root v5.22.00 is using some shared librairies which are not used by h2root v5.18.0d:

ldd which h2root
libCore.so => /usr/local/root/root_v5.22.00/root//lib/root/libCore.so (0x0000002a95557000)
libCint.so => /usr/local/root/root_v5.22.00/root//lib/root/libCint.so (0x0000002a95e13000)
libRIO.so => /usr/local/root/root_v5.22.00/root//lib/root/libRIO.so (0x0000002a9692a000)
libNet.so => /usr/local/root/root_v5.22.00/root//lib/root/libNet.so (0x0000002a96bbb000)
libHist.so => /usr/local/root/root_v5.22.00/root//lib/root/libHist.so (0x0000002a96def000)
libGraf.so => /usr/local/root/root_v5.22.00/root//lib/root/libGraf.so (0x0000002a972ff000)
libGraf3d.so => /usr/local/root/root_v5.22.00/root//lib/root/libGraf3d.so (0x0000002a97616000)
libGpad.so => /usr/local/root/root_v5.22.00/root//lib/root/libGpad.so (0x0000002a9783a000)
libTree.so => /usr/local/root/root_v5.22.00/root//lib/root/libTree.so (0x0000002a97a1b000)
libMatrix.so => /usr/local/root/root_v5.22.00/root//lib/root/libMatrix.so (0x0000002a97d19000)
libMathCore.so => /usr/local/root/root_v5.22.00/root//lib/root/libMathCore.so (0x0000002a98077000)
libThread.so => /usr/local/root/root_v5.22.00/root//lib/root/libThread.so (0x0000002a9834d000)
libminicern.so => /usr/local/root/root_v5.22.00/root//lib/root/libminicern.so (0x0000002a984a0000)
libg2c.so.0 => /usr/lib64/libg2c.so.0 (0x0000002a98d9c000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x000000375e800000)
libdl.so.2 => /lib64/libdl.so.2 (0x000000375dc00000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x000000375fb00000)
libm.so.6 => /lib64/tls/libm.so.6 (0x000000375da00000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x000000375f900000)
libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x000000375e000000)
libc.so.6 => /lib64/tls/libc.so.6 (0x000000375d700000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000375e200000)
/lib64/ld-linux-x86-64.so.2 (0x000000375d500000)

ldd /usr/local/root/root_v5.18.00d/root/bin/h2root
libCore.so => /usr/local/root/root_v5.18.00d/root//lib/libCore.so (0x0000002a95557000)
libCint.so => /usr/local/root/root_v5.18.00d/root//lib/libCint.so (0x0000002a95e0f000)
libRIO.so => /usr/local/root/root_v5.18.00d/root//lib/libRIO.so (0x0000002a96672000)
libNet.so => /usr/local/root/root_v5.18.00d/root//lib/libNet.so (0x0000002a968af000)
libHist.so => /usr/local/root/root_v5.18.00d/root//lib/libHist.so (0x0000002a96ad8000)
libGraf.so => /usr/local/root/root_v5.18.00d/root//lib/libGraf.so (0x0000002a96ee8000)
libGraf3d.so => /usr/local/root/root_v5.18.00d/root//lib/libGraf3d.so (0x0000002a972c3000)
libGpad.so => /usr/local/root/root_v5.18.00d/root//lib/libGpad.so (0x0000002a974e8000)
libTree.so => /usr/local/root/root_v5.18.00d/root//lib/libTree.so (0x0000002a976c8000)
libMatrix.so => /usr/local/root/root_v5.18.00d/root//lib/libMatrix.so (0x0000002a979a5000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003df9a00000)
libg2c.so.0 => /usr/lib64/libg2c.so.0 (0x0000002a97d16000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003df8e00000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003dfad00000)
libm.so.6 => /lib64/tls/libm.so.6 (0x0000003df8c00000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003dfab00000)
libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000003df9200000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000003df8900000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003df9400000)
/lib64/ld-linux-x86-64.so.2 (0x0000003df8700000)

A diff between the libraries used by the versions of h2root gives the following differences:

diff h2root_v5.18.00d h2root_v5.22.00
8a9
libMathCore.so
11a13
libThread.so
18a21
libminicern.so

Could you please help me to fix the segmentation fault problem with the new version of h2root? Let me know if you need more informations :wink:

Thanks,

Yvan

can you send me the hbook file you are trying to concert ? (or put it on afs)

I put it in my cern afs area:

[lxplus255-17:20:50] /afs/cern.ch/user/y/ycalas (19) > ll /afs/cern.ch/user/y/ycalas/public/ped_7072.rz
-rw-r–r-- 1 ycalas d9 12910592 Feb 10 17:19 /afs/cern.ch/user/y/ycalas/public/ped_7072.rz
[lxplus255-17:20:52] /afs/cern.ch/user/y/ycalas (20) >

I just tried to convert your file on my linux box with the latest version of h2root and it works for me. My machine is:

pcphsft55> uname -a
Linux pcphsft55 2.6.9-78.0.8.EL.cernsmp #1 SMP Thu Nov 27 15:19:42 CET 
2008 i686 i686 i386 GNU/Linux

I guess your machine is 64 bits ?

Yes my machine is 64 bits:

Linux xxxxxx 2.6.9-78.0.8.ELsmp #1 SMP Wed Nov 19 13:11:58 CST 2008 x86_64 x86_64 x86_64 GNU/Linux

Ok I am investigating. I 'll let you know.

Thanks :wink: Note that I have the same problem with root v5.20.00 :frowning:

Yvan

Hi Yvan

You said it was working before ? was it also on a 64 bits machine ?

In the past h2root was directly linked with cernlib. Now we have extracted the needed code in a " mini cernlib" library. I thought that relinking back with cernlib would have make it work (on 64 bits) but it does not. It still crashes (in a different way). So that is why I am asking you what kind of machine you where using (32 or 64 bits) when it worked for you ?

Olivier

Hi Olivier,

You said it was working before ? was it also on a 64 bits machine ?

Yes it works well with a previous version of ROOT (eg. 5.18.00d) compiled on a 64 bits, but fails with versions >= 5.20.00 (have a look on my first message):

[xxxxx-16:33:25] > export ROOTSYS=/usr/local/root/root_v5.18.00d/root/

[xxxxx-16:33:55] > root_env

[xxxxx-16:33:59] > which h2root
/usr/local/root/root_v5.18.00d/root/bin/h2root

[xxxxx-16:34:08] > fs sysname
Current sysname is ‘amd64_sl4’

[xxxxx-16:34:27] > ldd which h2root
libCore.so => /usr/local/root/root_v5.18.00d/root//lib/libCore.so (0x0000002a95557000)
libCint.so => /usr/local/root/root_v5.18.00d/root//lib/libCint.so (0x0000002a95e0f000)
libRIO.so => /usr/local/root/root_v5.18.00d/root//lib/libRIO.so (0x0000002a96672000)
libNet.so => /usr/local/root/root_v5.18.00d/root//lib/libNet.so (0x0000002a968af000)
libHist.so => /usr/local/root/root_v5.18.00d/root//lib/libHist.so (0x0000002a96ad8000)
libGraf.so => /usr/local/root/root_v5.18.00d/root//lib/libGraf.so (0x0000002a96ee8000)
libGraf3d.so => /usr/local/root/root_v5.18.00d/root//lib/libGraf3d.so (0x0000002a972c3000)
libGpad.so => /usr/local/root/root_v5.18.00d/root//lib/libGpad.so (0x0000002a974e8000)
libTree.so => /usr/local/root/root_v5.18.00d/root//lib/libTree.so (0x0000002a976c8000)
libMatrix.so => /usr/local/root/root_v5.18.00d/root//lib/libMatrix.so (0x0000002a979a5000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003ac1000000)
libg2c.so.0 => /usr/lib64/libg2c.so.0 (0x0000002a97d15000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003ac0400000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003ac2300000)
libm.so.6 => /lib64/tls/libm.so.6 (0x0000003ac0200000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003ac2100000)
libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000003ac0800000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000003abff00000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003ac0a00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003abfd00000)

[xxxxx-16:35:22] > h2root ~/public/ped_7072.rz
RZOPEN. Cannot determine record length - EXCHANGE mode is used.
Converting directory //example
Converting CWN with ID= 99, nentries = 1000
Creating branch:Irntu, block:E_HEADER, fullname:Irntu/I, nsub=0, itype=2, isize=4, ielem=1
[…]
TDirectoryFile* RUN_INFO RUN_INFO
KEY: TTree h98;1 R_Header
KEY: TTree h99;1 Events
KEY: TDirectory RUN_INFO;1 RUN_INFO

[xxxxx-16:35:33] > echo $?
0
[xxxxx-16:35:44] >

Yvan

yes, minicern was introduced in 5.20:
root.cern.ch/root/v520/Version520.news.html#misc
Weird I cannot make it work again using cernlib. I will investigate.

[quote=“couet”]yes, minicern was introduced in 5.20:
root.cern.ch/root/v520/Version520.news.html#misc
Weird I cannot make it work again using cernlib. I will investigate.[/quote]

I forgot to tell you that h2root (version 5.22) had not been compiled by default (it was not in <path_to_root>/bin) since f77 had not been found by the configure script… I had to help it a little bit by using option --with-f77=/usr/bin/g77 (cf. file <path_to_root/main/Module.mk).

===============================================
[xxxxx-21:17:35] > ls -l which f77
lrwxrwxrwx 1 root root 3 Nov 2 2007 /usr/bin/f77 -> g77
[xxxxx-21:17:49] > ls -l which g77
-rwxr-xr-x 1 root root 107328 May 7 2007 /usr/bin/g77
[xxxxx-21:18:03] > g77 --version
GNU Fortran (GCC) 3.4.6 20060404 (Red Hat 3.4.6-8)
Copyright © 2006 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
or type the command `info -f g77 Copying’.
[xxxxx-21:18:12] > fs sysname
Current sysname is ‘amd64_sl4’
[xxxxx-21:18:23] > uname -a
Linux xxxxx 2.6.9-55.0.9.ELsmp #1 SMP Fri Sep 28 09:24:48 CDT 2007 x86_64 x86_64 x86_64 GNU/Linux

I have no problem on lxplus . Typing " make" build h2root but gfortran is used not g77.
(ask Fons Rademakers for Makefile questions)

[quote=“couet”]I have no problem on lxplus . Typing " make" build h2root but gfortran is used not g77.
(ask Fons Rademakers for Makefile questions)[/quote]

I just tried with gfortran (instead of g77), but if failed too:

h2root /scratch/ycalas/ped_7072.rz

*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library “/lib64/tls/libthread_db.so.1”.
Attaching to program: /proc/32723/exe, process 32723
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
[Thread debugging using libthread_db enabled]
[New Thread 182954683584 (LWP 32723)]
(no debugging symbols found)…done.

0x0000003da8b8f504 in waitpid () from /lib64/tls/libc.so.6
#1 0x0000003da8b39a1f in do_system () from /lib64/tls/libc.so.6
#2 0x0000002a957c40ab in TUnixSystem::StackTrace ()
from /scratch/ycalas/TMP/ROOT//lib/root/libCore.so
#3 0x0000002a957c0c7a in TUnixSystem::DispatchSignals ()
from /scratch/ycalas/TMP/ROOT//lib/root/libCore.so
#4
#5 0x0000002a984c2a0f in mzstor_ ()
from /scratch/ycalas/TMP/ROOT//lib/root/libminicern.so
#6 0x0000002a984c2e2f in mzpaw_ ()
from /scratch/ycalas/TMP/ROOT//lib/root/libminicern.so
#7 0x0000002a984aedcc in hlimit_ ()
from /scratch/ycalas/TMP/ROOT//lib/root/libminicern.so
#8 0x00000000004042fe in main ()

:frowning:

Yvan

I am still working on that. I have not found the solution yet. I see that the prebuild version 5.18 is working. I did not succeed yet to rebuilt a working version using cernlib. I had no time today to look at it.

Hi Olivier,

Do you have any news related to this issue?

Thanks,

Yvan

h2root in version 5.23/02 should work on 64 bits machines

Rene

Hi Yvan,
Sorry, I forgot to tell you here that, as Rene said, it should now work.
Cheers, Olivier

[quote=“couet”]Hi Yvan,
Sorry, I forgot to tell you here that, as Rene said, it should now work.
Cheers, Olivier[/quote]

Ok, so if I understand well, it should only work with the development version of ROOT, ie. 5.23/02. Probably better to wait the production one in June then :wink:

Thanks,

Yvan

Yes that’s right. You can give it a try if you want.