Message: Segmentation fault in G4NeutronHPInelastic::~G4NeutronHPInelastic() Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Segmentation fault in G4NeutronHPInelastic::~G4NeutronHPInelastic() 

Forum: Hadronic Processes
Date: 24 Mar, 2015
From: Neoh <Neoh>

Dear all,

I was testing Geant4.10.1 with two separate builds, one in sequential mode while another in multithreading mode. When I run the sequential build using basic exampleB1 with Qt enabled, I got segmentation fault (but the same steps have no issue in multithreading mode) similar to this thread : The only change I made in basic example B1 is changing reference physics list to QGSP_BIC_HP.

To be completely clear, this is how I build exampleB1 in sequential mode. Please advise if I am doing it correctly:

 $ mkdir B1-build
 $ ls
 B1  B1-build
 $ cd B1-build
 $ . ~/geant4.10.1-build/share/Geant4-10.1.0/geant4make/ <-- (source from sequential build)
 $ cmake ../B1
 $ make

When I use sequential build to run exampleB1 in gdb, gui menu first appears. Then I key in "exit" without running beam, and I got segmentation fault:

 Starting program: /home/geant4/geant4_workdir/examples/basic/B1-build/exampleB1 
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib64/".
 Available UI session types: [ Qt, GAG, tcsh, csh ]
[New Thread 0x7fffe5e8d700 (LWP 1102)]
[New Thread 0x7fffe568c700 (LWP 1103)]
[New Thread 0x7fffe4e8b700 (LWP 1104)]
[New Thread 0x7fffd7fff700 (LWP 1105)]
[New Thread 0x7fffd70e0700 (LWP 1107)]
[New Thread 0x7fffd68df700 (LWP 1108)]
Detaching after fork from child process 1109.
warning: Corrupted shared library list: 0x1089b30 != 0x9619b0
[Thread 0x7fffe4e8b700 (LWP 1104) exited]
[Thread 0x7fffd7fff700 (LWP 1105) exited]

 Graphics systems deleted.
 Visualization Manager deleting...
 G4 kernel has come to Quit state.
 UserDetectorConstruction deleted.
 UserPhysicsList deleted.
 UserActionInitialization deleted.
 UserRunAction deleted.
 UserPrimaryGenerator deleted.
 RunManager is deleting RunManagerKernel.
 EventManager deleted.
 Units table cleared.
 Total navigation history collections cleaned: 2
================== Deleting memory pools ===================
Number of memory pools allocated: 3; of which, static: 0
Dynamic pools deleted: 3 / Total memory freed: 0.0048 Mb
G4Allocator objects are deleted.
UImanager deleted.
StateManager deleted.
RunManagerKernel is deleted. Good bye :)

 Program received signal SIGSEGV, Segmentation fault.
0x00007ffff41ef220 in G4NeutronHPInelastic::~G4NeutronHPInelastic() ()
   from /home/geant4/geant4.10.1-build/outputs/library/Linux-g++/

Here is the stacktrace:

(gdb) bt
#0  0x00007ffff41ef220 in G4NeutronHPInelastic::~G4NeutronHPInelastic() ()
   from /home/geant4/geant4.10.1-build/outputs/library/Linux-g++/
#1  0x00007ffff41ef709 in G4NeutronHPInelastic::~G4NeutronHPInelastic() ()
   from /home/geant4/geant4.10.1-build/outputs/library/Linux-g++/
#2  0x00007ffff4193859 in G4HadronicInteractionRegistry::Clean() ()
   from /home/geant4/geant4.10.1-build/outputs/library/Linux-g++/
#3  0x00007ffff3ef5b61 in G4HadronicProcessStore::~G4HadronicProcessStore() ()
   from /home/geant4/geant4.10.1-build/outputs/library/Linux-g++/
#4  0x00007ffff3ef6ef7 in G4ThreadLocalSingleton<G4HadronicProcessStore>::Clear() ()
   from /home/geant4/geant4.10.1-build/outputs/library/Linux-g++/
#5  0x00007ffff3ef6f3f in G4ThreadLocalSingleton<G4HadronicProcessStore>::~G4ThreadLocalSingleton() ()
   from /home/geant4/geant4.10.1-build/outputs/library/Linux-g++/
#6  0x000000322f2390e9 in __run_exit_handlers (status=0, 
    listp=0x322f5b76c8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true)
    at exit.c:82
#7  0x000000322f239135 in __GI_exit (status=<optimized out>) at exit.c:104
#8  0x000000322f221d6c in __libc_start_main (main=0x408300 <main>, argc=1, 
    argv=0x7fffffffd898, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffd888) at libc-start.c:319
#9  0x0000000000408239 in _start ()

If the information helps, I am using gcc version 4.8.3 in Fedora 20, geant4 is compiled against c++11.

best regards


 Add Message Add Message
to: "Segmentation fault in G4NeutronHPInelastic::~G4NeutronHPInelastic()"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]