Hi Wile_E_Coyote,
thanks, these commands allows to compile both libbPEMPos.so
and test_geom
without problem (earlier I was able to compile without problem too, so this will help me to understand right sequence for gcc), but now when I run test_geom
it segfaults:
(Archlinux box):
Populating 'geometry.root' file:
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007fc2ee229e8a in waitpid () from /usr/lib/libc.so.6
#1 0x00007fc2ee1a7bcf in do_system () from /usr/lib/libc.so.6
#2 0x00007fc2f27886d4 in TUnixSystem::StackTrace() () from /usr/lib/root/libCore.so.6.12
#3 0x00007fc2f278ae7e in TUnixSystem::DispatchSignals(ESignals) () from /usr/lib/root/libCore.so.6.12
#4 <signal handler called>
#5 0x00007fc2f2a495a0 in vtable for TString () from /usr/lib/root/libCore.so.6.12
#6 0x000055d9a6c5fcfc in write_geom() ()
#7 0x000055d9a6c5fdc9 in main ()
===========================================================
The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum.
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5 0x00007fc2f2a495a0 in vtable for TString () from /usr/lib/root/libCore.so.6.12
#6 0x000055d9a6c5fcfc in write_geom() ()
#7 0x000055d9a6c5fdc9 in main ()
===========================================================
under gdb:
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./test_geom...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/vladimir/baikal-gvd/root/test_geom
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Populating 'geometry.root' file:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b7b5a0 in vtable for TString () from /usr/lib/root/libCore.so.6.12
(gdb) bt
#0 0x00007ffff7b7b5a0 in vtable for TString () from /usr/lib/root/libCore.so.6.12
#1 0x0000555555555cfc in write_geom() ()
#2 0x0000555555555dc9 in main ()
On Fedora box (in VM, precomiled ROOT binaries) I don’t get any valuable info just segfault:
Populating 'geometry.root' file:
*** Break *** segmentation violation
Generating stack trace...
under gdb:
GNU gdb (GDB) Fedora 8.0.1-33.fc27
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./test_geom...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/vladimir/tmp/root/test_geom
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.26-16.fc27.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Populating 'geometry.root' file:
Detaching after fork from child process 28744.
Detaching after fork from child process 28746.
Detaching after fork from child process 28748.
Detaching after fork from child process 28750.
Detaching after fork from child process 28752.
Detaching after fork from child process 28754.
Detaching after fork from child process 28758.
Program received signal SIGSEGV, Segmentation fault.
0x000000000207cdd0 in ?? ()
Missing separate debuginfos, use: dnf debuginfo-install libcrypt-nss-2.26-16.fc27.x86_64 libgcc-7.2.1-2.fc27.x86_64 libstdc++-7.2.1-2.fc27.x86_64 ncurses-libs-6.0-13.20170722.fc27.x86_64 nss-mdns-0.10-20.fc27.x86_64 nss-softokn-freebl-3.34.0-1.0.fc27.x86_64 openssl-libs-1.1.0g-1.fc27.x86_64 sssd-client-1.16.0-5.fc27.x86_64 systemd-libs-234-9.fc27.x86_64 zlib-1.2.11-4.fc27.x86_64
(gdb) bt
#0 0x000000000207cdd0 in ?? ()
#1 0x00000000004019ca in write_geom() ()
#2 0x0000000000401a73 in main ()
On (L)Ubuntu box (in VM) with self-compiled ROOT I get:
Populating 'geometry.root' file:
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007f9dca14a89a in __GI___waitpid (pid=2054, stat_loc=stat_loc
entry=0x7ffc0bb2b1a8, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1 0x00007f9dca0b99cb in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
#2 0x00007f9dcb8bb767 in TUnixSystem::Exec (shellcmd=<optimized out>, this=0x5615d2c727c0) at /home/vladimir/tmp/root-6.12.04/core/unix/src/TUnixSystem.cxx:2118
#3 TUnixSystem::StackTrace (this=0x5615d2c727c0) at /home/vladimir/tmp/root-6.12.04/core/unix/src/TUnixSystem.cxx:2412
#4 0x00007f9dcb8bdecc in TUnixSystem::DispatchSignals (this=0x5615d2c727c0, sig=kSigSegmentationViolation) at /home/vladimir/tmp/root-6.12.04/core/unix/src/TUnixSystem.cxx:3643
#5 <signal handler called>
#6 0x00005615d1de9bdd in write_geom() ()
#7 0x00005615d1de9cb9 in main ()
===========================================================
The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum.
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#6 0x00005615d1de9bdd in write_geom() ()
#7 0x00005615d1de9cb9 in main ()
===========================================================
under gdb:
GNU gdb (Ubuntu 8.0.1-0ubuntu1) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./test_geom...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/vladimir/tmp/root/test_geom
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Populating 'geometry.root' file:
Program received signal SIGSEGV, Segmentation fault.
0x0000555555555bdd in write_geom() ()
(gdb) bt
#0 0x0000555555555bdd in write_geom() ()
#1 0x0000555555555cb9 in main ()
(seems that I compiled ROOT without debug symbols).
To conclude:
- now test library and test program are compiling fine,
- but running
test_geom
gives segfault, seems to be related with my previous problem (I see reference to vtable
in debug info).
I will appreciate if you guys give some hints about what is going on here. I have some experience with C++ programming both this is beyond my knowledge about C++. It looks like using ROOT classes and libraries in standalone program is too far advanced that I thought.
WBR, Vladimir Lomov