BxCppDev / Bayeux

Core Persistency, Geometry and Data Processing C++ Library for Particle and Nuclear Physics Experiments
GNU General Public License v3.0
4 stars 9 forks source link

bxdpp_processing failed for some mctools examples with preliminary support for sequential G4 10.5 #43

Open fmauger opened 5 years ago

fmauger commented 5 years ago

In examples/mctools/ex00:

### WARNING: G4EmProcessOptions class is obsolete and will be removed in the next public release 
    Please, try to use G4EmParameters class and/or UI interface to EM parameters
Warning : Region <ShieldingRegion> does not have specific production cuts,
even though it appears in the current tracking world.
Default cuts are used for this region.
...
HepRandomEngine::put called -- no effect!
[debug:virtual void mctools::g4::event_action::BeginOfEventAction(const G4Event*):192] Event #0 starts.
[notice:virtual void mctools::g4::event_action::BeginOfEventAction(const G4Event*):209] Event #0
[debug:virtual void mctools::g4::event_action::BeginOfEventAction(const G4Event*):230] Record PRNG states for event #0
[debug:virtual void mctools::g4::event_action::EndOfEventAction(const G4Event*):269] Event #0 is killed and thus not tracked!
[debug:virtual void mctools::g4::event_action::EndOfEventAction(const G4Event*):306] Event data #0
[debug:virtual void mctools::g4::event_action::EndOfEventAction(const G4Event*):307] Save this event = 0
[debug:virtual void mctools::g4::event_action::BeginOfEventAction(const G4Event*):192] Event #1 starts.
...
...
 *** Break *** segmentation violation
...

===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================

Thread 2 (Thread 0x7f210b156700 (LWP 25228)):
#0  0x00007f21316176c2 in __GI___waitpid (pid=25231, stat_loc=stat_loc
entry=0x7f210b149668, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1  0x00007f2131582067 in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:149
#2  0x00007f212fea7f83 in TUnixSystem::StackTrace() () from /scratch/ubuntu18.04/BxInstall/root-6.16.00/lib/root/libCore.so.6.16
#3  0x00007f212feaa974 in TUnixSystem::DispatchSignals(ESignals) () from /scratch/ubuntu18.04/BxInstall/root-6.16.00/lib/root/libCore.so.6.16
#4  <signal handler called>
#5  0x00007f211d851e78 in G4HCofThisEvent::AddHitsCollection(int, G4VHitsCollection*) () from /scratch/ubuntu18.04/BxInstall/geant4-10.5/lib/libG4digits_hits.so
#6  0x00007f2124eaefd6 in mctools::g4::event_action::_clear_hits_collections_(G4Event const*) () from /home/mauger/Documents/Private/Software/BxCppDev/Bayeux/Bayeux.git/_install.d/develop-boost169-g4/bin/../lib/../lib/libBayeux_mctools_geant4.so
#7  0x00007f2124eb3e95 in mctools::g4::event_action::EndOfEventAction(G4Event const*) () from /home/mauger/Documents/Private/Software/BxCppDev/Bayeux/Bayeux.git/_install.d/develop-boost169-g4/bin/../lib/../lib/libBayeux_mctools_geant4.so
#8  0x00007f212226e202 in G4EventManager::DoProcessing(G4Event*) () from /scratch/ubuntu18.04/BxInstall/geant4-10.5/lib/libG4event.so
#9  0x00007f212250a9a5 in G4RunManager::ProcessOneEvent(int) () from /scratch/ubuntu18.04/BxInstall/geant4-10.5/lib/libG4run.so
#10 0x00007f2122508acb in G4RunManager::BeamOn(int, char const*, int) () from /scratch/ubuntu18.04/BxInstall/geant4-10.5/lib/libG4run.so
#11 0x00007f2122526db3 in G4RunMessenger::SetNewValue(G4UIcommand*, G4String) () from /scratch/ubuntu18.04/BxInstall/geant4-10.5/lib/libG4run.so
#12 0x00007f211c8d115b in G4UIcommand::DoIt(G4String) () from /scratch/ubuntu18.04/BxInstall/geant4-10.5/lib/libG4intercoms.so
#13 0x00007f211c8f124f in G4UImanager::ApplyCommand(char const*) () from /scratch/ubuntu18.04/BxInstall/geant4-10.5/lib/libG4intercoms.so
#14 0x00007f2124e8da14 in mctools::g4::manager::run_simulation_impl() () from /home/mauger/Documents/Private/Software/BxCppDev/Bayeux/Bayeux.git/_install.d/develop-boost169-g4/bin/../lib/../lib/libBayeux_mctools_geant4.so
#15 0x00007f2124e89586 in mctools::g4::manager::run_simulation() () from /home/mauger/Documents/Private/Software/BxCppDev/Bayeux/Bayeux.git/_install.d/develop-boost169-g4/bin/../lib/../lib/libBayeux_mctools_geant4.so
#16 0x00007f2124e70214 in mctools::g4::simulation_ctrl::start_simulation_run() () from /home/mauger/Documents/Private/Software/BxCppDev/Bayeux/Bayeux.git/_install.d/develop-boost169-g4/bin/../lib/../lib/libBayeux_mctools_geant4.so
#17 0x00007f21234dffba in thread_proxy () from /scratch/ubuntu18.04/BxInstall/boost-1.69.0/lib/libboost_thread.so.1.69.0
#18 0x00007f212e3826db in start_thread (arg=0x7f210b156700) at pthread_create.c:463
#19 0x00007f213165488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f2133f81d80 (LWP 25210)):
#0  0x00007f212e3889f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x559377e0d6e0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x559377e0d690, cond=0x559377e0d6b8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x559377e0d6b8, mutex=0x559377e0d690) at pthread_cond_wait.c:655
#3  0x00007f2124ef8078 in mctools::g4::simulation_module::_simulate_event(datatools::things&) () from /home/mauger/Documents/Private/Software/BxCppDev/Bayeux/Bayeux.git/_install.d/develop-boost169-g4/bin/../lib/../lib/libBayeux_mctools_geant4.so
#4  0x00007f2124ef8e1a in mctools::g4::simulation_module::process(datatools::things&) () from /home/mauger/Documents/Private/Software/BxCppDev/Bayeux/Bayeux.git/_install.d/develop-boost169-g4/bin/../lib/../lib/libBayeux_mctools_geant4.so
#5  0x00007f21330a997f in dpp::dpp_driver::run() () from /home/mauger/Documents/Private/Software/BxCppDev/Bayeux/Bayeux.git/_install.d/develop-boost169-g4/bin/../lib/libBayeux.so.3
#6  0x0000559376d9b7cd in main ()
===========================================================
fmauger commented 2 years ago

A port to G4 11 is in preparation. For now it will not use G4's MT support because of incompatibility of its multithreading approach with the modular threaded pipeline in Bayeux (and Falaise), issues in I/O and PRNGs in MT env which is rather rigid in G4.