Break Segmentation violation with geant4


ROOT Version: 6.16/00
Platform: Centos 7 lxplus
Compiler: gcc (GCC) 7.3.0


Dear All,
I am running geant4 simulation and writing a root tree with histograms and tree. I have checked geometry overlaps and it all came out OK ! But when I try to run the program, I get the following break segmentation violation and I am not sure of the cause. Can anyone please help to fix this as I am unable to finish the run every time .Thank you very much in advance,

Dipanwita

—> Begin of event: 12000

—> End of event: 12000

*** Break *** segmentation violation

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

There was a crash.

This is the entire stack trace of all threads:

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

#0 0x00007fd519c37a3c in waitpid () from /lib64/libc.so.6

#1 0x00007fd519bb5de2 in do_system () from /lib64/libc.so.6

#2 0x00007fd51fd8974d in TUnixSystem::StackTrace() () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.16.00-42022/x86_64-centos7-gcc7-opt/lib/libCore.so

#3 0x00007fd51fd8bfe4 in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.16.00-42022/x86_64-centos7-gcc7-opt/lib/libCore.so

#4 <signal handler called>

#5 0x0000000000417d46 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size (this=0x18) at /cvmfs/sft.cern.ch/lcg/releases/gcc/7.3.0-cb1ee/x86_64-centos7/include/c++/7.3.0/bits/basic_string.h:912

#6 0x0000000000424d26 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare (this=0x18, __s=0x4316bd “Vol4”) at /cvmfs/sft.cern.ch/lcg/releases/gcc/7.3.0-cb1ee/x86_64-centos7/include/c++/7.3.0/bits/basic_string.tcc:1421

#7 0x0000000000424b7b in G4String::operator== (this=0x18, str=0x4316bd “Vol4”) at /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/include/Geant4/G4String.icc:122

#8 0x000000000042a45c in SteppingAction::UserSteppingAction (this=0x295cbe0, step=0x2765ac0) at /afs/cern.ch/work/d/dibanerj/PBC_NA64/NA64_KaonTest/src/SteppingAction.cc:293

#9 0x00007fd5260e9315 in G4SteppingManager::Stepping() () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4tracking.so

#10 0x00007fd5260f4c02 in G4TrackingManager::ProcessOneTrack(G4Track*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4tracking.so

#11 0x00007fd52632ed24 in G4EventManager::DoProcessing(G4Event*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4event.so

#12 0x00007fd5265d0395 in G4RunManager::ProcessOneEvent(int) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4run.so

#13 0x00007fd5265cea4b in G4RunManager::BeamOn(int, char const*, int) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4run.so

#14 0x00007fd5265ec8a1 in G4RunMessenger::SetNewValue(G4UIcommand*, G4String) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4run.so

#15 0x00007fd51b0020de in G4UIcommand::DoIt(G4String) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#16 0x00007fd51b01a3f3 in G4UImanager::ApplyCommand(char const*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#17 0x00007fd51afec0c7 in G4UIbatch::ExecCommand(G4String const&) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#18 0x00007fd51afede95 in G4UIbatch::SessionStart() () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#19 0x00007fd51b01ad32 in G4UImanager::ExecuteMacroFile(char const*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#20 0x00007fd51b00b808 in G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#21 0x00007fd51b0020de in G4UIcommand::DoIt(G4String) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#22 0x00007fd51b01a3f3 in G4UImanager::ApplyCommand(char const*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#23 0x0000000000415edf in main (argc=1, argv=0x7ffd7fe0ddc8) at /afs/cern.ch/work/d/dibanerj/PBC_NA64/NA64_KaonTest/exampleN03.cc:117

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

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.

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

#5 0x0000000000417d46 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size (this=0x18) at /cvmfs/sft.cern.ch/lcg/releases/gcc/7.3.0-cb1ee/x86_64-centos7/include/c++/7.3.0/bits/basic_string.h:912

#6 0x0000000000424d26 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare (this=0x18, __s=0x4316bd “Vol4”) at /cvmfs/sft.cern.ch/lcg/releases/gcc/7.3.0-cb1ee/x86_64-centos7/include/c++/7.3.0/bits/basic_string.tcc:1421

#7 0x0000000000424b7b in G4String::operator== (this=0x18, str=0x4316bd “Vol4”) at /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/include/Geant4/G4String.icc:122

#8 0x000000000042a45c in SteppingAction::UserSteppingAction (this=0x295cbe0, step=0x2765ac0) at /afs/cern.ch/work/d/dibanerj/PBC_NA64/NA64_KaonTest/src/SteppingAction.cc:293

#9 0x00007fd5260e9315 in G4SteppingManager::Stepping() () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4tracking.so

#10 0x00007fd5260f4c02 in G4TrackingManager::ProcessOneTrack(G4Track*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4tracking.so

#11 0x00007fd52632ed24 in G4EventManager::DoProcessing(G4Event*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4event.so

#12 0x00007fd5265d0395 in G4RunManager::ProcessOneEvent(int) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4run.so

#13 0x00007fd5265cea4b in G4RunManager::BeamOn(int, char const*, int) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4run.so

#14 0x00007fd5265ec8a1 in G4RunMessenger::SetNewValue(G4UIcommand*, G4String) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4run.so

#15 0x00007fd51b0020de in G4UIcommand::DoIt(G4String) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#16 0x00007fd51b01a3f3 in G4UImanager::ApplyCommand(char const*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#17 0x00007fd51afec0c7 in G4UIbatch::ExecCommand(G4String const&) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#18 0x00007fd51afede95 in G4UIbatch::SessionStart() () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#19 0x00007fd51b01ad32 in G4UImanager::ExecuteMacroFile(char const*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#20 0x00007fd51b00b808 in G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#21 0x00007fd51b0020de in G4UIcommand::DoIt(G4String) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#22 0x00007fd51b01a3f3 in G4UImanager::ApplyCommand(char const*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc7-opt/lib64/libG4intercoms.so

#23 0x0000000000415edf in main (argc=1, argv=0x7ffd7fe0ddc8) at /afs/cern.ch/work/d/dibanerj/PBC_NA64/NA64_KaonTest/exampleN03.cc:117

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

WARNING - Attempt to delete the physical volume store while geometry closed !

WARNING - Attempt to delete the logical volume store while geometry closed !

WARNING - Attempt to delete the solid store while geometry closed !

WARNING - Attempt to delete the region store while geometry closed !

Hi Dipa,

this one really looks like a g4 related issue: did you try to reach out to some simulation forum?

Cheers,
Danilo

Hi Danilo,
Not yet. The suggestion in the stack trace was to contact a root forum thats why I reached out here first. I will try the geant4 forum then. Thanks a lot for the reply…

Best Regards,
Dipanwita

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.