Message: application crashed by segmentation fault; clhep-2.1.0.1 error? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question application crashed by segmentation fault; clhep-2.1.0.1 error? 

Forum: Event and Track Management
Date: 27 Apr, 2011
From: Hirokazu Hosoda <Hirokazu Hosoda>

I have a trouble in my Genat4 application.

My environment are as follows.
OS : CentOS 5.6 or RHEL Server 5.4
Geant4 version : geant4.9.4.01
CLHEP version : clhep-2.1.0.1

The application calculates transport of 2.5-MeV neutrons from the center of
 the World Volume to detector.

It sometimes crashes because of "segmentation fault" in calculating the
 transport inside "IronShell" located at the center of the World Volume.
The "IronShell" is a shell with 174 cm diameter and 8 cm thickness, which has
 60 apertures with various size.
The "IronShell" is generated as the result of boolean operations of CSG Solids.
Apertures of the "IronShell" is covered by "SteelFlange".

A geometrical collision check was performed by using an option of the
 G4PVPlacemant, then no collision was detected for all physicalvolumes
 that is installed in the geometry.

When I was tracing the CLHEP Engine Status in GeneratePrimaries method of
 PrimaryGeneratorAction class, I found that application crashed in certain
 Status.

Restoring the engine status in GeneratePrimaries, the application showed
 reproducible behavior in first event.

Following data is the user output in SteppingAction for the event.
The parameters are
time, particle name, track id, parent id, volume name, position, momentum direction and kinetic energy, respectively. 
0   neutron   1   0   World   (0,0,0)   (0.762807,0.398079,-0.509567)   2.44969
36.565   neutron   1   0   IronShell   (602.618,314.482,-402.558)   (0.454889,0.0848611,-0.886496)   2.44969
36.8588   Fe56[0.0]   2   1   IronShell   (607.46,317.009,-405.792)   (0.535422,0.542123,0.647631)   0.0147915
36.8588   Fe56[0.0]   2   1   IronShell   (607.46,317.009,-405.792)   (0.535422,0.542123,0.647631)   0
36.8588   neutron   1   0   IronShell   (607.46,317.009,-405.792)   (-0.0807224,-0.456109,0.886255)   2.4349
37.0464   Fe56[0.0]   3   1   IronShell   (609.298,317.352,-409.375)   (0.281133,0.277218,-0.918757)   0.158436
37.0464   Fe56[0.0]   3   1   IronShell   (609.298,317.352,-409.375)   (0.281133,0.277218,-0.918757)   0
37.0464   neutron   1   0   IronShell   (609.298,317.352,-409.375)   (0.406099,-0.231193,0.8841)   2.27651
37.6562   Fe57[0.0]   4   1   IronShell   (608.273,311.558,-398.116)   (-0.907191,-0.420643,0.00799901)   0.0115769
37.6562   Fe57[0.0]   4   1   IronShell   (608.273,311.558,-398.116)   (-0.907191,-0.420643,0.00799901)   0
37.6562   neutron   1   0   IronShell   (608.273,311.558,-398.116)   (0.406099,-0.231193,0.8841)   2.26493
37.8571   neutron   1   0   World   (609.968,310.593,-394.426)   (0.406099,-0.231193,0.8841)   2.26493
54.4912   neutron   1   0   IronShell   (750.325,230.687,-88.86)   (0.406099,-0.231193,0.8841)   2.26493
58.1961   gamma   7   1   IronShell   (781.587,212.889,-20.8004)   (0.188072,-0.63675,-0.747782)   0.846102
58.2631   gamma   7   1   IronShell   (780.244,228.083,-33.8615)   (0.940975,-0.33808,-0.0163884)   0.308183
58.2672   gamma   7   1   IronShell   (780.476,227.297,-34.7838)   (0.469389,-0.555326,-0.686504)   0.22576
58.3654   gamma   7   1   IronShell   (808.162,217.35,-35.266)   (-0.409439,-0.412496,-0.813761)   0.193911
58.3657   gamma   7   1   IronShell   (808.202,217.303,-35.3246)   (0.668941,-0.726521,0.157114)   0.170507
58.4367   gamma   7   1   IronShell   (799.479,208.514,-52.6619)   (0.912645,-0.33151,-0.239125)   0.119288
58.4732   gamma   7   1   IronShell   (806.79,200.574,-50.9449)   (0.895126,-0.34424,0.283281)   0.113705
58.5408   gamma   7   1   IronShell   (825.295,193.853,-55.7934)   (0.895126,-0.34424,0.283281)   0.110279
58.5558   e-   15   7   IronShell   (829.324,192.303,-54.5181)   (0.440728,-0.892028,0.10022)   0.103167
58.5408   e-   14   7   IronShell   (825.295,193.853,-55.7934)   (0.135267,0.0117982,-0.990739)   0.00341648
58.4732   e-   13   7   IronShell   (806.79,200.574,-50.9449)   (-0.352663,-0.738991,0.574039)   0.00552484
58.4367   e-   12   7   IronShell   (799.479,208.514,-52.6619)   (-0.711691,-0.0185853,-0.702247)   0.0503681
58.3657   e-   11   7   IronShell   (808.202,217.303,-35.3246)   (0.969155,-0.240898,0.0520281)   0.0233426
58.3654   e-   10   7   IronShell   (808.162,217.35,-35.266)   (0.701325,0.172942,0.691545)   0.03179
58.2672   e-   9   7   IronShell   (780.476,227.297,-34.7838)   (-0.515923,-0.392845,-0.761247)   0.0824138
58.2631   e-   8   7   IronShell   (780.244,228.083,-33.8615)   (-0.11304,0.52198,0.845434)   0.530807
58.2634   e-   8   7   IronShell   (780.234,228.139,-33.813)   (-0.840238,0.0534105,-0.53958)   0.32236
58.2635   e-   8   7   IronShell   (780.201,228.153,-33.8135)   (-0.840238,0.0534105,-0.53958)   0.117411
58.1961   Fe56[0.0]   6   1   IronShell   (781.587,212.889,-20.8004)   (0.35521,0.439818,0.824855)   0.0588521
58.1961   Fe56[0.0]   6   1   IronShell   (781.587,212.889,-20.8004)   (0.35521,0.439818,0.824855)   0
58.1961   neutron   5   1   IronShell   (781.587,212.889,-20.8004)   (-0.112824,-0.447532,-0.887122)   1.35965
60.4999   Fe56[0.0]   16   5   IronShell   (780.672,176.076,-25.4395)   (0.0930189,-0.585434,0.805366)   0.0215443
60.5   Fe56[0.0]   16   5   IronShell   (780.672,176.076,-25.4395)   (0.0930189,-0.585434,0.805366)   0
60.4999   neutron   5   1   IronShell   (780.672,176.076,-25.4395)   (-0.112824,-0.447532,-0.887122)   1.33811
63.2304   gamma   19   5   IronShell   (775.749,156.546,-64.1517)   (-0.348011,-0.908439,0.231576)   0.847
63.2784   gamma   19   5   IronShell   (782.817,144.396,-61.1167)   (-0.433635,-0.894804,0.106234)   0.568917
63.2798   gamma   19   5   IronShell   (782.669,144.008,-61.0178)   (-0.538807,-0.760881,0.36159)   0.564715
63.304   gamma   19   5   IronShell   (779.527,137.526,-60.2481)   (-0.339243,-0.559197,0.756448)   0.537673
63.3048   gamma   19   5   IronShell   (779.389,137.331,-60.1558)   (-0.413877,0.313513,0.854643)   0.479057
63.32   gamma   19   5   IronShell   (777.846,134.788,-56.715)   (-0.413877,0.313513,0.854643)   0.357274
63.3319   gamma   19   5   World   (776.369,135.906,-53.6655)   (-0.413877,0.313513,0.854643)   0.357274
65.4972   gamma   19   5   IronShell   (507.698,339.425,501.132)   (0.551765,-0.707909,0.440932)   0.357274
65.5312   gamma   19   5   IronShell   (503.481,342.62,509.841)   (-0.473605,-0.879737,0.0419622)   0.205527
65.5512   gamma   19   5   IronShell   (506.786,338.379,512.483)   (-0.00373186,-0.709192,-0.705006)   0.166666
65.5552   gamma   19   5   IronShell   (506.227,337.339,512.533)   (-0.00373186,-0.709192,-0.705006)   0.146107
65.5793   gamma   19   5   World   (506.2,332.215,507.44)   (-0.00373186,-0.709192,-0.705006)   0.146107
69.846   gamma   19   5   SteelFlange   (501.426,-574.929,-394.35)   (-0.237526,0.0841222,-0.967732)   0.14610
69.8629   gamma   19   5   SteelFlange   (501.407,-578.54,-397.939)   (-0.237526,0.0841222,-0.967732)   0.132108
69.8751   e-   29   19   SteelFlange   (500.544,-578.234,-401.458)   (-0.0127579,0.776034,-0.630562)   0.124996
69.8629   e-   28   19   SteelFlange   (501.407,-578.54,-397.939)   (0.256193,-0.949649,0.180365)   0.0139896
65.5552   e-   27   19   IronShell   (506.227,337.339,512.533)   (-0.513091,-0.307192,0.80148)   0.0205005
65.5512   e-   26   19   IronShell   (506.786,338.379,512.483)   (0.907086,-0.0131421,0.420741)   0.0388022
65.5312   e-   25   19   IronShell   (503.481,342.62,509.841)   (-0.611131,0.606987,0.508022)   0.151738
63.32   e-   24   19   IronShell   (777.846,134.788,-56.715)   (-0.0483945,-0.987566,0.149567)   0.121724
63.3048   e-   23   19   IronShell   (779.389,137.331,-60.1558)   (-0.510114,-0.556837,-0.655527)   0.0586075
63.304   e-   22   19   IronShell   (779.527,137.526,-60.2481)   (0.391616,-0.614616,-0.68475)   0.0261913
63.2798   e-   21   19   IronShell   (782.669,144.008,-61.0178)   (0.70257,0.110612,0.702966)   0.00347587
63.2784   e-   20   19   IronShell   (782.817,144.396,-61.1167)   (0.666525,-0.655078,0.355834)   0.277357
63.2785   e-   20   19   IronShell   (782.816,144.373,-61.0998)   (0.666525,-0.655078,0.355834)   0.0654629
63.2304   Fe56[0.0]   18   5   IronShell   (775.749,156.546,-64.1517)   (0.236845,-0.775974,-0.58461)   0.025262
63.2304   Fe56[0.0]   18   5   IronShell   (775.749,156.546,-64.1517)   (0.236845,-0.775974,-0.58461)   0
63.2304   neutron   17   5   IronShell   (775.749,156.546,-64.1517)   (-0.616133,0.612596,-0.495082)   0.465546
64.1975   neutron   17   5   World   (770.128,162.135,-68.6683)   (-0.616133,0.612596,-0.495082)   0.465546
138.094   neutron   17   5   IronShell   (340.623,589.175,-413.789)   (-0.964633,-0.162663,0.207422)   0.465546
140.958   Fe56[0.0]   30   17   IronShell   (323.973,605.729,-427.168)   (0.30824,0.704352,-0.639434)   0.010123
140.958   Fe56[0.0]   30   17   IronShell   (323.973,605.729,-427.168)   (0.30824,0.704352,-0.639434)   0
140.958   neutron   17   5   IronShell   (323.973,605.729,-427.168)   (-0.964633,-0.162663,0.207422)   0.455426
Segmentation fault


I also check the core by using gdb command.
#0  0x00002aafe5380bb1 in CLHEP::sp::ctrl_block_pd<CLHEP::HepRandomEngine, CLHEP::do_nothing_deleter>::get_deleter (this=<value optimized out>, ti=@0xc9)
    at ../CLHEP/Utility/memory.h:307
307	../CLHEP/Utility/memory.h: No such file or directory.
	in ../CLHEP/Utility/memory.h
(gdb) bt
#0  0x00002aafe5380bb1 in CLHEP::sp::ctrl_block_pd<CLHEP::HepRandomEngine, CLHEP::do_nothing_deleter>::get_deleter (this=<value optimized out>, ti=@0xc9)
    at ../CLHEP/Utility/memory.h:307
#1  0x00002aafe313a117 in G4ContinuumGammaTransition::SelectGamma () from /usr/local/geant4/lib/Linux-g++/libG4processes.so
#2  0x00002aafe31447e6 in G4VGammaDeexcitation::GenerateGamma () from /usr/local/geant4/lib/Linux-g++/libG4processes.so
#3  0x00002aafe314491c in G4VGammaDeexcitation::DoChain () from /usr/local/geant4/lib/Linux-g++/libG4processes.so
#4  0x00002aafe3143565 in G4PhotonEvaporation::BreakItUp () from /usr/local/geant4/lib/Linux-g++/libG4processes.so
#5  0x00002aafe2ccc588 in G4NeutronHPCaptureFS::ApplyYourself () from /usr/local/geant4/lib/Linux-g++/libG4processes.so
#6  0x00002aafe2cceed2 in G4NeutronHPChannel::ApplyYourself () from /usr/local/geant4/lib/Linux-g++/libG4processes.so
#7  0x00002aafe2cc8f13 in G4NeutronHPCapture::ApplyYourself () from /usr/local/geant4/lib/Linux-g++/libG4processes.so
#8  0x00002aafe2a706b1 in G4HadronicProcess::PostStepDoIt () from /usr/local/geant4/lib/Linux-g++/libG4processes.so
#9  0x00002aafe206b199 in G4SteppingManager::InvokePSDIP () from /usr/local/geant4/lib/Linux-g++/libG4tracking.so
#10 0x00002aafe206b54b in G4SteppingManager::InvokePostStepDoItProcs () from /usr/local/geant4/lib/Linux-g++/libG4tracking.so
#11 0x00002aafe2068669 in G4SteppingManager::Stepping () from /usr/local/geant4/lib/Linux-g++/libG4tracking.so
#12 0x00002aafe206fbb9 in G4TrackingManager::ProcessOneTrack () from /usr/local/geant4/lib/Linux-g++/libG4tracking.so
#13 0x00002aafe1e062c0 in G4EventManager::DoProcessing () from /usr/local/geant4/lib/Linux-g++/libG4event.so
#14 0x00002aafe1bcb36d in G4RunManager::DoEventLoop () from /usr/local/geant4/lib/Linux-g++/libG4run.so
#15 0x00002aafe1bca432 in G4RunManager::BeamOn () from /usr/local/geant4/lib/Linux-g++/libG4run.so
#16 0x00002aafe1bd1de0 in G4RunMessenger::SetNewValue () from /usr/local/geant4/lib/Linux-g++/libG4run.so
#17 0x00002aafe4e2409b in G4UIcommand::DoIt () from /usr/local/geant4/lib/Linux-g++/libG4intercoms.so
#18 0x00002aafe4e34099 in G4UImanager::ApplyCommand () from /usr/local/geant4/lib/Linux-g++/libG4intercoms.so
#19 0x00002aafe4e12434 in G4UIbatch::ExecCommand () from /usr/local/geant4/lib/Linux-g++/libG4intercoms.so
#20 0x00002aafe4e13b1e in G4UIbatch::SessionStart () from /usr/local/geant4/lib/Linux-g++/libG4intercoms.so
#21 0x00002aafe4e30125 in G4UImanager::ExecuteMacroFile () from /usr/local/geant4/lib/Linux-g++/libG4intercoms.so
#22 0x00002aafe4e2ada4 in G4UIcontrolMessenger::SetNewValue () from /usr/local/geant4/lib/Linux-g++/libG4intercoms.so
#23 0x00002aafe4e2409b in G4UIcommand::DoIt () from /usr/local/geant4/lib/Linux-g++/libG4intercoms.so
#24 0x00002aafe4e34099 in G4UImanager::ApplyCommand () from /usr/local/geant4/lib/Linux-g++/libG4intercoms.so
#25 0x0000000000411b5d in main ()
Current language:  auto; currently c++


The file "../CLHEP/Utility/memory.h" exists as "$CLHEP_BASE_DIR/CLHEP/Utility/memory.h".
So, I think the causes of this crash is in clhep-2.1.0.1.

Can anyone give me an advice to avoid this crash or correct my code?

One of the easiest way to avoid/neglect this error is restarting simulation
 by different random seed.
But I am looking for another countermeasure to solve this problem.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: application crashed by segmentation fault; clhep-2.1.0.1 error?   (Vladimir Ivanchenko - 01 May, 2011)
(_ Ok: Re: application crashed by segmentation fault; clhep-2.1.0.1 error?   (Hirokazu Hosoda - 02 May, 2011)
 Add Message Add Message
to: "application crashed by segmentation fault; clhep-2.1.0.1 error?"

 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 ]