G4Exception: Cache001

Hello,

I get an error message at the very end of my application. It seems that the simulation runs well and the results look also valid to me. However, Geant4 (4-10-07-patch02, also tested with latest 4.11 Beta relase) raises an exception at the very end (full G4Backtrace below):

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** ExceptionHandler is not defined ***
*** G4Exception : Cache001
issued by : G4CacheReference::Destroy
Internal fatal error. Invalid G4Cache size (requested id: 6 but cache has size: 5 Possibly client created G4Cache object in a thread and tried to delete it from another thread!
*** Fatal Exception ***
-------- EEEE ------- G4Exception-END -------- EEEE -------

This exception only occurs when I simulate less than ~20primaries, but not always, so it seems that this error is not completely reproducible. When simulating more than 100primariers I was not able to get this exception.

I would like to know, whether this error indicates a severe problem or whether I can ignore it, since my results look valid. Ideally, of course, we can find the reason for this…but I do not even know where to start looking. Any help appriciated!

PS: I compiled Geant in single threaded mode and I therefore use the single threaded runmanager.

Thanks,
Steffen


-------- EEEE ------- G4Exception-START -------- EEEE -------

*** ExceptionHandler is not defined ***
*** G4Exception : Cache001
issued by : G4CacheReference::Destroy
Internal fatal error. Invalid G4Cache size (requested id: 12 but cache has size: 11 Possibly client created G4Cache object in a thread and tried to delete it from another thread!
*** Fatal Exception ***
-------- EEEE ------- G4Exception-END -------- EEEE -------

*** G4Exception: Aborting execution ***

CAUGHT SIGNAL: 6 ### address: 0x3e8000049af, signal = SIGABRT, value = 6, description = abort program (formerly SIGIOT).

Backtrace:
[PID=18863, TID=-2][ 0/14]> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x141) [0x7fdca3f96ce1]
[PID=18863, TID=-2][ 1/14]> /lib/x86_64-linux-gnu/libc.so.6(abort+0x123) [0x7fdca3f80537]
[PID=18863, TID=-2][ 2/14]> /opt/geant4/lib/libG4global.so(Z11G4ExceptionPKcS0_19G4ExceptionSeverityS0+0x10cc) [0x7fdca455d72c]
[PID=18863, TID=-2][ 3/14]> /opt/geant4/lib/libG4global.so(_Z11G4ExceptionPKcS0_19G4ExceptionSeverityRNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE+0xe0) [0x7fdca455d8c0]
[PID=18863, TID=-2][ 4/14]> /opt/geant4/lib/libG4event.so(+0x55e69) [0x7fdca4ceae69]
[PID=18863, TID=-2][ 5/14]> /opt/geant4/lib/libG4event.so(_ZN7G4CacheIN20G4SPSPosDistribution13thread_data_tEED1Ev+0x5a) [0x7fdca4ceb16a]
[PID=18863, TID=-2][ 6/14]> /opt/geant4/lib/libG4event.so(_ZN20G4SPSPosDistributionD1Ev+0x10) [0x7fdca4ce53c0]
[PID=18863, TID=-2][ 7/14]> /opt/geant4/lib/libG4event.so(_ZN22G4SingleParticleSourceD1Ev+0x47) [0x7fdca4cf26a7]
[PID=18863, TID=-2][ 8/14]> /opt/geant4/lib/libG4event.so(_ZN22G4SingleParticleSourceD0Ev+0x9) [0x7fdca4cf2719]
[PID=18863, TID=-2][ 9/14]> /opt/geant4/lib/libG4event.so(_ZN27G4GeneralParticleSourceDataD1Ev+0x2a) [0x7fdca4cba19a]
[PID=18863, TID=-2][10/14]> /lib/x86_64-linux-gnu/libc.so.6(+0x3e4d7) [0x7fdca3f994d7]
[PID=18863, TID=-2][11/14]> /lib/x86_64-linux-gnu/libc.so.6(+0x3e67a) [0x7fdca3f9967a]
[PID=18863, TID=-2][12/14]> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7fdca3f81d11]
[PID=18863, TID=-2][13/14]> ./Simulator(+0x1581a) [0x55f63203e81a]

: Aborted (Signal sent by tkill() 18863 1000)
Aborted

In the meanwhile I found out, that this exception is only raised, when more than one GPS Source is added via “/gps/source/add”.

Maybe this helps to track down the cause for this. Any help/hint appreciated!
Cheers,
Steffen