G4 Segfault
Summary
G4 Segfault
Steps to reproduce
Start from the detector_passive example and modify the deposition config to (don't know if this is needed, just makes things much faster):
[DepositionGeant4]
physics_list = FTFP_BERT_LIV
particle_type = "e-"
source_energy = 1GeV
source_type = "beam"
flat_beam = true
beam_size = 15mm
beam_direction = 0 0 1
source_position = 0 0 -20mm
number_of_particles = 1
max_step_length = 1um
increase the number of events and in the geometry comment out the [sphere1]
and [cylinder1]
(speeds up everything).
Run ./allpix -c ../examples/passive_volume/passive_volume.conf -j 5 -v WARNING
Example Configuration
See above
What is the current bug behavior?
[Switching to Thread 0x7fffccce3640 (LWP 504717)]
G4VPhysicalVolume::GetTranslation (this=this@entry=0x21)
at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/geometry/management/src/G4VPhysicalVolume.cc:152
warning: 152 /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/geometry/management/src/G4VPhysicalVolume.cc: No such file or directory
(gdb) bt
#0 G4VPhysicalVolume::GetTranslation (this=this@entry=0x21)
at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/geometry/management/src/G4VPhysicalVolume.cc:152
#1 0x00007ffff31767a7 in G4VoxelNavigation::ComputeStep (this=0x7fffc0052240, localPoint=..., localDirection=..., currentProposedStepLength=0.0042139265588076163, newSafety=@0x7fffccbc68c8: 0,
history=..., validExitNormal=@0x7fffc004db0c: false, exitNormal=..., exiting=@0x7fffc004db0b: false, entering=@0x7fffc004db0a: false, pBlockedPhysical=0x7fffc004daf0,
blockedReplicaNo=@0x7fffc004daf8: -1) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/geometry/navigation/src/G4VoxelNavigation.cc:188
#2 0x00007ffff3160bdf in G4Navigator::ComputeStep (this=0x7fffc004da00, pGlobalpoint=..., pDirection=..., pCurrentProposedStepLength=<optimized out>, pNewSafety=@0x7fffccbc68c8: 0)
at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/geometry/navigation/src/G4Navigator.cc:823
#3 0x00007ffff475f8ab in G4Transportation::AlongStepGetPhysicalInteractionLength (this=0x7fffc00e27e0, track=..., currentMinimumStep=0.0042139265588076163, currentSafety=@0x7fffccbc68c8: 0,
selection=<optimized out>) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/processes/transportation/src/G4Transportation.cc:286
#4 0x00007ffff66b55ea in G4VProcess::AlongStepGPIL (selection=0x7fffc004d5fc, proposedSafety=@0x7fffccbc68c8: 0, currentMinimumStep=<optimized out>, previousStepSize=<optimized out>, track=...,
this=<optimized out>) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/processes/management/include/G4VProcess.hh:471
#5 G4SteppingManager::DefinePhysicalStepLength (this=this@entry=0x7fffc004d470)
at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/tracking/src/G4SteppingManager.cc:531
#6 0x00007ffff66b689b in G4SteppingManager::Stepping (this=0x7fffc004d470)
at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/tracking/src/G4SteppingManager.cc:193
#7 0x00007ffff66c1400 in G4TrackingManager::ProcessOneTrack (this=0x7fffc004bf70, apValueG4Track=apValueG4Track@entry=0x7fffc067d8e0)
at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/tracking/src/G4TrackingManager.cc:133
#8 0x00007ffff5fc033c in G4EventManager::DoProcessing (this=0x7fffc001a910, anEvent=<optimized out>)
at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/event/src/G4EventManager.cc:211
#9 0x00007ffff5fc0754 in G4EventManager::ProcessOneEvent (this=<optimized out>, anEvent=<optimized out>)
at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/event/src/G4EventManager.cc:447
#10 0x00007ffff547a595 in G4WorkerRunManager::ProcessOneEvent (this=0x7fffc004bd30, i_event=<optimized out>)
at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/run/src/G4WorkerRunManager.cc:287
#11 0x00007ffff6689798 in allpix::WorkerRunManager::DoEventLoop (this=0x7fffc004bd30, n_event=<optimized out>, macroFile=<optimized out>, n_select=<optimized out>)
at /net/e4-nfs-home.e4.physik.tu-dortmund.de/home/tbisanz/ap2-pure/src/tools/geant4/WorkerRunManager.cpp:114
#12 0x00007ffff5450ff2 in G4RunManager::BeamOn (this=this@entry=0x7fffc004bd30, n_event=n_event@entry=1, macroFile=macroFile@entry=0x0, n_select=n_select@entry=-1)
at /build/jenkins/workspace/lcg_release_pipeline/build/projects/Geant4-11.2.0/src/Geant4/11.2.0/source/run/src/G4RunManager.cc:261
#13 0x00007ffff6689fc1 in allpix::WorkerRunManager::BeamOn (this=0x7fffc004bd30, n_event=1, macroFile=0x0, n_select=-1)
at /net/e4-nfs-home.e4.physik.tu-dortmund.de/home/tbisanz/ap2-pure/src/tools/geant4/WorkerRunManager.cpp:71
#14 0x00007ffff2ddb850 in allpix::DepositionGeant4Module::run (this=0x2c360a0, event=0x7fffc0250b10)
at /net/e4-nfs-home.e4.physik.tu-dortmund.de/home/tbisanz/ap2-pure/src/modules/DepositionGeant4/DepositionGeant4Module.cpp:387
#15 0x00007ffff1eed7e5 in operator()<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>&>(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module>, std::allocator<std::shared_ptr<allpix::Module> > >::iterator, int64_t, struct {...} &) (
__closure=0xc251788, event=..., module_iter=..., event_time=0, self_func=...) at /net/e4-nfs-home.e4.physik.tu-dortmund.de/home/tbisanz/ap2-pure/src/core/module/ModuleManager.cpp:816
#16 0x00007ffff1eee5c2 in std::__invoke_impl<void, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>&, std::nullptr_t&, std::_List_iterator<std::shared_ptr<allpix::Module> >&, int&, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>&> (__f=...) at /cvmfs/sft.cern.ch/lcg/releases/gcc/13.1.0-b3d18/x86_64-el9/include/c++/13.1.0/bits/invoke.h:61
#17 std::__invoke<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>&, std::nullptr_t&, std::_List_iterator<std::shared_ptr<allpix::Module> >&, int&, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>&> (__fn=...) at /cvmfs/sft.cern.ch/lcg/releases/gcc/13.1.0-b3d18/x86_64-el9/include/c++/13.1.0/bits/invoke.h:96
#18 std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>)>::__call<void, 0, 1, 2, 3> (__args=..., this=<optimized out>)
at /cvmfs/sft.cern.ch/lcg/releases/gcc/13.1.0-b3d18/x86_64-el9/include/c++/13.1.0/functional:506
#19 std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>)>::operator()<> (this=<optimized out>) at /cvmfs/sft.cern.ch/lcg/releases/gcc/13.1.0-b3d18/x86_64-el9/include/c++/13.1.0/functional:591
#20 std::__invoke_impl<void, std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>)>&> (__f=...) at /cvmfs/sft.cern.ch/lcg/releases/gcc/13.1.0-b3d18/x86_64-el9/include/c++/13.1.0/bits/invoke.h:61
#21 std::__invoke<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>)>&> (__fn=...) at /cvmfs/sft.cern.ch/lcg/releases/gcc/13.1.0-b3d18/x86_64-el9/include/c++/13.1.0/bits/invoke.h:96
#22 std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>)>()>::__call<void> (__args=..., this=<optimized out>)
at /cvmfs/sft.cern.ch/lcg/releases/gcc/13.1.0-b3d18/x86_64-el9/include/c++/13.1.0/functional:506
#23 std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, int64_t, auto:52&&)>)>()>::operator()<> (this=<optimized out>) at /cvmfs/sft.cern.ch/lcg/releases/gcc/13.1.0-b3d18/x86_64-el9/include/c++/13.1.0/functional:591
What is the expected correct behavior?
No segfault
Relevant event logs and/or screenshots
See above
(Please use code blocks (```) to format console output, logs, and code as it is hard to read otherwise.)
Build environment information
EL9, LCG_105 (86_64-el9-gcc13) with G4 11.2.0-52c79, AP2 current master (at a7156f0c)
(Please paste the full output of CMake as executed from an empty build directory)