acts: ActsSimGeantinoRecording is not thread-safe

After fixing #204 and #205, running the ActsSimGeantinoRecording example on a couple of events leads to a pretty fancy crash:

<Acts source dir>/Examples $ ${ACTS_BUILD_DIR}/bin/ActsSimGeantinoRecording -n100

    ... insufferable levels of DD4hep and Geant4 verbosity ensue ...

### Run 0 start.

--------------------End of Run------------------------------

------------------------------------------------------------


-------- WWWW ------- G4Exception-START -------- WWWW -------

*** ExceptionHandler is not defined ***
*** G4Exception : Run0023
      issued by : G4RunManagerKernel::RunInitialization
Geant4 kernel not in Idle state : method ignored.
*** This is just a warning message. ***
-------- WWWW ------- G4Exception-END -------- WWWW -------

08:45:42    Sequencer      INFO      finished event 0

-------- WWWW ------- G4Exception-START -------- WWWW -------

*** ExceptionHandler is not defined ***
*** G4Exception : Event0002
      issued by : G4EventManager::ProcessOneEvent
IllegalApplicationState -- Geometry is not closed : cannot process an event.
*** This is just a warning message. ***
-------- WWWW ------- G4Exception-END -------- WWWW -------

    ... many repetitions of the exact same error message ...

--------------------End of Run------------------------------

------------------------------------------------------------

08:45:42    Sequencer      INFO      finished event 25

 *** Break *** segmentation violation



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

Thread 4 (Thread 0x7fed3e158700 (LWP 5656)):
#0  0x00007fed497313f7 in wait4 () from /lib64/libc.so.6
#1  0x00007fed496adee7 in do_system () from /lib64/libc.so.6
#2  0x00007fed4fdcff10 in TUnixSystem::Exec (shellcmd=<optimized out>, this=0xf97180) at /tmp/root/spack-stage/spack-stage-root-6.20.04-ekpuvio2rkctqk54hcy6e2ekknwwm3i5/spack-src/core/unix/src/TUnixSystem.cxx:2107
#3  TUnixSystem::StackTrace (this=0xf97180) at /tmp/root/spack-stage/spack-stage-root-6.20.04-ekpuvio2rkctqk54hcy6e2ekknwwm3i5/spack-src/core/unix/src/TUnixSystem.cxx:2397
#4  0x00007fed4fdcd31c in TUnixSystem::DispatchSignals (this=0xf97180, sig=kSigSegmentationViolation) at /tmp/root/spack-stage/spack-stage-root-6.20.04-ekpuvio2rkctqk54hcy6e2ekknwwm3i5/spack-src/core/unix/src/TUnixSystem.cxx:3628
#5  <signal handler called>
#6  0x00007fed4a20763f in G4ParticleDefinition::GetProcessManager (this=0x6407740) at /tmp/root/spack-stage/spack-stage-geant4-10.6.1-zxjnolky3nvvvzj4qpufrpgewcdcseip/spack-src/source/particles/management/src/G4ParticleDefinition.cc:260
#7  0x00007fed4efe5ca7 in G4RunManagerKernel::SetupShadowProcess (this=<optimized out>) at /tmp/root/spack-stage/spack-stage-geant4-10.6.1-zxjnolky3nvvvzj4qpufrpgewcdcseip/spack-src/source/run/src/G4RunManagerKernel.cc:1038
#8  0x00007fed4efe941d in G4RunManagerKernel::RunInitialization (this=0x61eabb0, fakeRun=<optimized out>) at /tmp/root/spack-stage/spack-stage-geant4-10.6.1-zxjnolky3nvvvzj4qpufrpgewcdcseip/spack-src/source/run/src/G4RunManagerKernel.cc:695
#9  0x00007fed4efda107 in G4RunManager::RunInitialization (this=0x578a0d0) at /tmp/root/spack-stage/spack-stage-geant4-10.6.1-zxjnolky3nvvvzj4qpufrpgewcdcseip/spack-src/source/run/src/G4RunManager.cc:316
#10 0x00007fed4efd6cc0 in G4RunManager::BeamOn (this=0x578a0d0, n_event=100, macroFile=0x0, n_select=-1) at /tmp/root/spack-stage/spack-stage-geant4-10.6.1-zxjnolky3nvvvzj4qpufrpgewcdcseip/spack-src/source/run/src/G4RunManager.cc:275
#11 0x00007fed52002981 in ActsExamples::GeantinoRecording::execute (this=0x61eaad0, ctx=...) at /usr/include/c++/9/bits/unique_ptr.h:360
#12 0x00007fed51c0097b in FW::Sequencer::<lambda(const tbb::blocked_range<long unsigned int>&)>::operator()(const tbb::blocked_range<unsigned long> &) const (__closure=0x7fed3efdf860, r=...) at /tmp/root/spack-stage/spack-stage-acts-0.24.00-emjnzz4s6bax7zrielgz52gkzaygfdyx/spack-src/Examples/Framework/include/ACTFW/Framework/AlgorithmContext.hpp:36
#13 0x00007fed51c01348 in tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>::run_body (r=..., this=0x7fed3efdf840) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:113
#14 tbb::interface9::internal::dynamic_grainsize_mode<tbb::interface9::internal::adaptive_mode<tbb::interface9::internal::auto_partition_type> >::work_balance<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> > (range=..., start=..., this=0x7fed3efdf880) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/partitioner.h:438
#15 tbb::interface9::internal::partition_type_base<tbb::interface9::internal::auto_partition_type>::execute<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> > (range=..., start=..., this=0x7fed3efdf880) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/partitioner.h:256
#16 tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>::execute(void) (this=0x7fed3efdf840) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:142
#17 0x00007fed49620e75 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::process_bypass_loop (this=this
entry=0x7fed3efcfe00, context_guard=..., t=0x7fed3efdf840, isolation=isolation
entry=0) at ../../src/tbb/scheduler.h:630
#18 0x00007fed4962113b in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all (this=0x7fed3efcfe00, parent=..., child=<optimized out>) at ../../include/tbb/task.h:1003
#19 0x00007fed4961a26f in tbb::internal::arena::process (this=0x7fed3efeed00, s=...) at ../../src/tbb/arena.cpp:196
#20 0x00007fed49618ba0 in tbb::internal::market::process (this=0x7fed3efef580, j=...) at ../../src/tbb/market.cpp:667
#21 0x00007fed496150a1 in tbb::internal::rml::private_worker::run (this=0x7fed3ed03000) at ../../src/tbb/private_server.cpp:266
#22 0x00007fed496152a9 in tbb::internal::rml::private_worker::thread_routine (arg=<optimized out>) at ../../src/tbb/private_server.cpp:219
#23 0x00007fed4fad1efa in start_thread () from /lib64/libpthread.so.0
#24 0x00007fed497643bf in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fed36158700 (LWP 5657)):
#0  0x00007fed4fadbeec in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007fed4fad48b3 in pthread_mutex_lock () from /lib64/libpthread.so.0
#2  0x00007fed52002969 in __gthread_mutex_lock (__mutex=0x61eab40) at /usr/include/c++/9/x86_64-suse-linux/bits/gthr-default.h:749
#3  std::mutex::lock (this=0x61eab40) at /usr/include/c++/9/bits/std_mutex.h:100
#4  std::lock_guard<std::mutex>::lock_guard (__m=..., this=<synthetic pointer>) at /usr/include/c++/9/bits/std_mutex.h:159
#5  ActsExamples::GeantinoRecording::execute (this=0x61eaad0, ctx=...) at /tmp/root/spack-stage/spack-stage-acts-0.24.00-emjnzz4s6bax7zrielgz52gkzaygfdyx/spack-src/Examples/Algorithms/Geant4/src/GeantinoRecording.cpp:53
#6  0x00007fed51c0097b in FW::Sequencer::<lambda(const tbb::blocked_range<long unsigned int>&)>::operator()(const tbb::blocked_range<unsigned long> &) const (__closure=0x7fed3efdf660, r=...) at /tmp/root/spack-stage/spack-stage-acts-0.24.00-emjnzz4s6bax7zrielgz52gkzaygfdyx/spack-src/Examples/Framework/include/ACTFW/Framework/AlgorithmContext.hpp:36
#7  0x00007fed51c01348 in tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>::run_body (r=..., this=0x7fed3efdf640) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:113
#8  tbb::interface9::internal::dynamic_grainsize_mode<tbb::interface9::internal::adaptive_mode<tbb::interface9::internal::auto_partition_type> >::work_balance<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> > (range=..., start=..., this=0x7fed3efdf680) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/partitioner.h:438
#9  tbb::interface9::internal::partition_type_base<tbb::interface9::internal::auto_partition_type>::execute<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> > (range=..., start=..., this=0x7fed3efdf680) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/partitioner.h:256
#10 tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>::execute(void) (this=0x7fed3efdf640) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:142
#11 0x00007fed49620e75 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::process_bypass_loop (this=this
entry=0x7fed3efd7e00, context_guard=..., t=0x7fed3efdf640, isolation=isolation
entry=0) at ../../src/tbb/scheduler.h:630
#12 0x00007fed4962113b in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all (this=0x7fed3efd7e00, parent=..., child=<optimized out>) at ../../include/tbb/task.h:1003
#13 0x00007fed4961a26f in tbb::internal::arena::process (this=0x7fed3efeed00, s=...) at ../../src/tbb/arena.cpp:196
#14 0x00007fed49618ba0 in tbb::internal::market::process (this=0x7fed3efef580, j=...) at ../../src/tbb/market.cpp:667
#15 0x00007fed496150a1 in tbb::internal::rml::private_worker::run (this=0x7fed3ed03100) at ../../src/tbb/private_server.cpp:266
#16 0x00007fed496152a9 in tbb::internal::rml::private_worker::thread_routine (arg=<optimized out>) at ../../src/tbb/private_server.cpp:219
#17 0x00007fed4fad1efa in start_thread () from /lib64/libpthread.so.0
#18 0x00007fed497643bf in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fed3e559700 (LWP 5655)):
#0  0x00007fed4fadbeec in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007fed4fad48b3 in pthread_mutex_lock () from /lib64/libpthread.so.0
#2  0x00007fed52002969 in __gthread_mutex_lock (__mutex=0x61eab40) at /usr/include/c++/9/x86_64-suse-linux/bits/gthr-default.h:749
#3  std::mutex::lock (this=0x61eab40) at /usr/include/c++/9/bits/std_mutex.h:100
#4  std::lock_guard<std::mutex>::lock_guard (__m=..., this=<synthetic pointer>) at /usr/include/c++/9/bits/std_mutex.h:159
#5  ActsExamples::GeantinoRecording::execute (this=0x61eaad0, ctx=...) at /tmp/root/spack-stage/spack-stage-acts-0.24.00-emjnzz4s6bax7zrielgz52gkzaygfdyx/spack-src/Examples/Algorithms/Geant4/src/GeantinoRecording.cpp:53
#6  0x00007fed51c0097b in FW::Sequencer::<lambda(const tbb::blocked_range<long unsigned int>&)>::operator()(const tbb::blocked_range<unsigned long> &) const (__closure=0x7fed3efdfa60, r=...) at /tmp/root/spack-stage/spack-stage-acts-0.24.00-emjnzz4s6bax7zrielgz52gkzaygfdyx/spack-src/Examples/Framework/include/ACTFW/Framework/AlgorithmContext.hpp:36
#7  0x00007fed51c01348 in tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>::run_body (r=..., this=0x7fed3efdfa40) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:113
#8  tbb::interface9::internal::dynamic_grainsize_mode<tbb::interface9::internal::adaptive_mode<tbb::interface9::internal::auto_partition_type> >::work_balance<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> > (range=..., start=..., this=0x7fed3efdfa80) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/partitioner.h:438
#9  tbb::interface9::internal::partition_type_base<tbb::interface9::internal::auto_partition_type>::execute<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> > (range=..., start=..., this=0x7fed3efdfa80) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/partitioner.h:256
#10 tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>::execute(void) (this=0x7fed3efdfa40) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:142
#11 0x00007fed49620e75 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::process_bypass_loop (this=this
entry=0x7fed3efc7e00, context_guard=..., t=0x7fed3efdfa40, isolation=isolation
entry=0) at ../../src/tbb/scheduler.h:630
#12 0x00007fed4962113b in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all (this=0x7fed3efc7e00, parent=..., child=<optimized out>) at ../../include/tbb/task.h:1003
#13 0x00007fed4961a26f in tbb::internal::arena::process (this=0x7fed3efeed00, s=...) at ../../src/tbb/arena.cpp:196
#14 0x00007fed49618ba0 in tbb::internal::market::process (this=0x7fed3efef580, j=...) at ../../src/tbb/market.cpp:667
#15 0x00007fed496150a1 in tbb::internal::rml::private_worker::run (this=0x7fed3ed03080) at ../../src/tbb/private_server.cpp:266
#16 0x00007fed496152a9 in tbb::internal::rml::private_worker::thread_routine (arg=<optimized out>) at ../../src/tbb/private_server.cpp:219
#17 0x00007fed4fad1efa in start_thread () from /lib64/libpthread.so.0
#18 0x00007fed497643bf in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fed4931ed00 (LWP 5632)):
#0  0x00007fed4fadbeec in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007fed4fad48b3 in pthread_mutex_lock () from /lib64/libpthread.so.0
#2  0x00007fed52002969 in __gthread_mutex_lock (__mutex=0x61eab40) at /usr/include/c++/9/x86_64-suse-linux/bits/gthr-default.h:749
#3  std::mutex::lock (this=0x61eab40) at /usr/include/c++/9/bits/std_mutex.h:100
#4  std::lock_guard<std::mutex>::lock_guard (__m=..., this=<synthetic pointer>) at /usr/include/c++/9/bits/std_mutex.h:159
#5  ActsExamples::GeantinoRecording::execute (this=0x61eaad0, ctx=...) at /tmp/root/spack-stage/spack-stage-acts-0.24.00-emjnzz4s6bax7zrielgz52gkzaygfdyx/spack-src/Examples/Algorithms/Geant4/src/GeantinoRecording.cpp:53
#6  0x00007fed51c0097b in FW::Sequencer::<lambda(const tbb::blocked_range<long unsigned int>&)>::operator()(const tbb::blocked_range<unsigned long> &) const (__closure=0x7fed3efdfd60, r=...) at /tmp/root/spack-stage/spack-stage-acts-0.24.00-emjnzz4s6bax7zrielgz52gkzaygfdyx/spack-src/Examples/Framework/include/ACTFW/Framework/AlgorithmContext.hpp:36
#7  0x00007fed51c01348 in tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>::run_body (r=..., this=0x7fed3efdfd40) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:113
#8  tbb::interface9::internal::dynamic_grainsize_mode<tbb::interface9::internal::adaptive_mode<tbb::interface9::internal::auto_partition_type> >::work_balance<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> > (range=..., start=..., this=0x7fed3efdfd80) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/partitioner.h:438
#9  tbb::interface9::internal::partition_type_base<tbb::interface9::internal::auto_partition_type>::execute<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> > (range=..., start=..., this=0x7fed3efdfd80) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/partitioner.h:256
#10 tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>::execute(void) (this=0x7fed3efdfd40) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:142
#11 0x00007fed49620e75 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::process_bypass_loop (this=this
entry=0x7fed3efea600, context_guard=..., t=0x7fed3efdfd40, isolation=isolation
entry=0) at ../../src/tbb/scheduler.h:630
#12 0x00007fed4962113b in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all (this=0x7fed3efea600, parent=..., child=<optimized out>) at ../../include/tbb/task.h:1003
#13 0x00007fed4961e80f in tbb::internal::generic_scheduler::local_spawn_root_and_wait (this=0x7fed3efea600, first=0x7fed3efdfd40, next=
0x7fed3efdfd38: 0x0) at ../../src/tbb/scheduler_utility.h:41
#14 0x00007fed51c046b3 in tbb::task::spawn_root_and_wait (root=...) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/task.h:1003
#15 tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>::run (partitioner=..., body=..., range=...) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:95
#16 tbb::parallel_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)> > (body=..., range=...) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:201
#17 FW::Sequencer::run (this=this
entry=0x7ffc6a9710a0) at /tmp/root/spack-stage/spack-stage-acts-0.24.00-emjnzz4s6bax7zrielgz52gkzaygfdyx/spack-src/Examples/Framework/src/Framework/Sequencer.cpp:260
#18 0x000000000041157e in main (argc=<optimized out>, argv=<optimized out>) at /tmp/root/spack-stage/spack-stage-acts-0.24.00-emjnzz4s6bax7zrielgz52gkzaygfdyx/spack-src/Examples/Run/Geant4/RunSimGeantinoRecording.cpp:66
===========================================================


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  0x00007fed4a20763f in G4ParticleDefinition::GetProcessManager (this=0x6407740) at /tmp/root/spack-stage/spack-stage-geant4-10.6.1-zxjnolky3nvvvzj4qpufrpgewcdcseip/spack-src/source/particles/management/src/G4ParticleDefinition.cc:260
#7  0x00007fed4efe5ca7 in G4RunManagerKernel::SetupShadowProcess (this=<optimized out>) at /tmp/root/spack-stage/spack-stage-geant4-10.6.1-zxjnolky3nvvvzj4qpufrpgewcdcseip/spack-src/source/run/src/G4RunManagerKernel.cc:1038
#8  0x00007fed4efe941d in G4RunManagerKernel::RunInitialization (this=0x61eabb0, fakeRun=<optimized out>) at /tmp/root/spack-stage/spack-stage-geant4-10.6.1-zxjnolky3nvvvzj4qpufrpgewcdcseip/spack-src/source/run/src/G4RunManagerKernel.cc:695
#9  0x00007fed4efda107 in G4RunManager::RunInitialization (this=0x578a0d0) at /tmp/root/spack-stage/spack-stage-geant4-10.6.1-zxjnolky3nvvvzj4qpufrpgewcdcseip/spack-src/source/run/src/G4RunManager.cc:316
#10 0x00007fed4efd6cc0 in G4RunManager::BeamOn (this=0x578a0d0, n_event=100, macroFile=0x0, n_select=-1) at /tmp/root/spack-stage/spack-stage-geant4-10.6.1-zxjnolky3nvvvzj4qpufrpgewcdcseip/spack-src/source/run/src/G4RunManager.cc:275
#11 0x00007fed52002981 in ActsExamples::GeantinoRecording::execute (this=0x61eaad0, ctx=...) at /usr/include/c++/9/bits/unique_ptr.h:360
#12 0x00007fed51c0097b in FW::Sequencer::<lambda(const tbb::blocked_range<long unsigned int>&)>::operator()(const tbb::blocked_range<unsigned long> &) const (__closure=0x7fed3efdf860, r=...) at /tmp/root/spack-stage/spack-stage-acts-0.24.00-emjnzz4s6bax7zrielgz52gkzaygfdyx/spack-src/Examples/Framework/include/ACTFW/Framework/AlgorithmContext.hpp:36
#13 0x00007fed51c01348 in tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>::run_body (r=..., this=0x7fed3efdf840) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:113
#14 tbb::interface9::internal::dynamic_grainsize_mode<tbb::interface9::internal::adaptive_mode<tbb::interface9::internal::auto_partition_type> >::work_balance<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> > (range=..., start=..., this=0x7fed3efdf880) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/partitioner.h:438
#15 tbb::interface9::internal::partition_type_base<tbb::interface9::internal::auto_partition_type>::execute<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> > (range=..., start=..., this=0x7fed3efdf880) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/partitioner.h:256
#16 tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, FW::Sequencer::run()::<lambda(const tbb::blocked_range<long unsigned int>&)>, const tbb::auto_partitioner>::execute(void) (this=0x7fed3efdf840) at /opt/spack/opt/spack/linux-opensuse_tumbleweed20200516-x86_64/gcc-9.3.1/intel-tbb-2020.2-zhao2enkcc33ogfymodxfwuy6gdywtcg/include/tbb/parallel_for.h:142
#17 0x00007fed49620e75 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::process_bypass_loop (this=this
entry=0x7fed3efcfe00, context_guard=..., t=0x7fed3efdf840, isolation=isolation
entry=0) at ../../src/tbb/scheduler.h:630
#18 0x00007fed4962113b in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all (this=0x7fed3efcfe00, parent=..., child=<optimized out>) at ../../include/tbb/task.h:1003
#19 0x00007fed4961a26f in tbb::internal::arena::process (this=0x7fed3efeed00, s=...) at ../../src/tbb/arena.cpp:196
#20 0x00007fed49618ba0 in tbb::internal::market::process (this=0x7fed3efef580, j=...) at ../../src/tbb/market.cpp:667
#21 0x00007fed496150a1 in tbb::internal::rml::private_worker::run (this=0x7fed3ed03000) at ../../src/tbb/private_server.cpp:266
#22 0x00007fed496152a9 in tbb::internal::rml::private_worker::thread_routine (arg=<optimized out>) at ../../src/tbb/private_server.cpp:219
#23 0x00007fed4fad1efa in start_thread () from /lib64/libpthread.so.0
#24 0x00007fed497643bf in clone () from /lib64/libc.so.6

===========================================================


Segmentation fault (core dumped)

The crash and associated warnings do not happen when the example is forced to run in single-threaded mode via -j1, hinting that the root cause is a thread-safety issue:

<Acts source dir>/Examples $ ${ACTS_BUILD_DIR}/bin/ActsSimGeantinoRecording -n100 -j1

    ... insufferable levels of DD4hep and Geant4 verbosity ensue ...

### Run 0 start.

--------------------End of Run------------------------------

------------------------------------------------------------

08:53:44    Sequencer      INFO      finished event 0

    ... same output for the other 99 events ...

08:53:52    Sequencer      INFO      Processed 100 events in 45.976195 s (wall clock)
08:53:52    Sequencer      INFO      Average time per event: 459.693070 ms/event

Curiously enough, this is in spite of the GeantinoRecording algorithm protecting its execute() method with a lock. From the error messages, the problem seems to be a geometry initialization issue.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (15 by maintainers)

Most upvoted comments

As discussed in the meeting today, we will add a flag to the algorithms indicating whether they can run MT. The sequencer will check all algorithms before running and refuse to run in MT in this case.