Dear ROOTers,
I am having a tough problem and I would be extremely grateful if you could help to solve it.
I am getting a segmentation fault in analysis program (under ROOT 5.34/34). It happens rather randomly, but only after a significant number of events gets processed (order of a few M). The stack trace is below:
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007f90dfafcb4c in __libc_waitpid (pid=3111, stat_loc=stat_loc
entry=0x7ffd5142fc80, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:31
#1 0x00007f90dfa822e2 in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
#2 0x00007f90e079b073 in TUnixSystem::StackTrace() () from /usr/cern/root_v5.34.34/lib/libCore.so
#3 0x00007f90e079cd7c in TUnixSystem::DispatchSignals(ESignals) () from /usr/cern/root_v5.34.34/lib/libCore.so
#4 <signal handler called>
#5 0x00007f90e06f3177 in TObject::TObject(TObject const&) () from /usr/cern/root_v5.34.34/lib/libCore.so
#6 0x00007f90db8addb1 in TVector3::TVector3(TVector3 const&) () from /usr/cern/root_v5.34.34/lib/libPhysics.so
#7 0x00007f90dabe8f80 in StMuRpsTrack::thetaRp(unsigned int) const () from /home/rafal/.proof/STAR_analysis-QA_2015-CEP_analysis/session-120-D11-1455994104-30508/worker-0.2/./StMuRpsTrack_cxx.so
#8 0x00007f90d9d5a879 in StMuRpsUtil::recalcTrack(StMuRpsTrack const*, StMuRpsTrack*) () from /home/rafal/.proof/STAR_analysis-QA_2015-CEP_analysis/session-120-D11-1455994104-30508/worker-0.2/./StMuRpsUtil_cxx.so
#9 0x00007f90d9d5ac8d in StMuRpsUtil::process() () from /home/rafal/.proof/STAR_analysis-QA_2015-CEP_analysis/session-120-D11-1455994104-30508/worker-0.2/./StMuRpsUtil_cxx.so
#10 0x00007f90d8e96980 in star::RpTrackSelection() const () from /home/rafal/.proof/STAR_analysis-QA_2015-CEP_analysis/session-120-D11-1455994104-30508/worker-0.2/./star_C.so
#11 0x00007f90d8ea064b in star::Process(long long) () from /home/rafal/.proof/STAR_analysis-QA_2015-CEP_analysis/session-120-D11-1455994104-30508/worker-0.2/./star_C.so
#12 0x00007f90d912c289 in TProofPlayer::Process(TDSet*, char const*, char const*, long long, long long) () from /usr/cern/root_v5.34.34/lib/libProofPlayer.so
#13 0x00007f90dc2148c6 in TProofServ::HandleProcess(TMessage*, TString*) () from /usr/cern/root_v5.34.34/lib/libProof.so
#14 0x00007f90dc218fe8 in TProofServ::HandleSocketInput(TMessage*, bool) () from /usr/cern/root_v5.34.34/lib/libProof.so
#15 0x00007f90dc201e1f in TProofServ::HandleSocketInput() () from /usr/cern/root_v5.34.34/lib/libProof.so
#16 0x00007f90dc21b6a1 in TProofServLiteInputHandler::Notify() () from /usr/cern/root_v5.34.34/lib/libProof.so
#17 0x00007f90e079c545 in TUnixSystem::CheckDescriptors() () from /usr/cern/root_v5.34.34/lib/libCore.so
#18 0x00007f90e079d06a in TUnixSystem::DispatchOneEvent(bool) () from /usr/cern/root_v5.34.34/lib/libCore.so
#19 0x00007f90e071ffe6 in TSystem::InnerLoop() () from /usr/cern/root_v5.34.34/lib/libCore.so
#20 0x00007f90e0720bf0 in TSystem::Run() () from /usr/cern/root_v5.34.34/lib/libCore.so
#21 0x00007f90e06c636f in TApplication::Run(bool) () from /usr/cern/root_v5.34.34/lib/libCore.so
#22 0x0000000000401bbe in main ()
===========================================================
The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug 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 0x00007f90e06f3177 in TObject::TObject(TObject const&) () from /usr/cern/root_v5.34.34/lib/libCore.so
#6 0x00007f90db8addb1 in TVector3::TVector3(TVector3 const&) () from /usr/cern/root_v5.34.34/lib/libPhysics.so
#7 0x00007f90dabe8f80 in StMuRpsTrack::thetaRp(unsigned int) const () from /home/rafal/.proof/STAR_analysis-QA_2015-CEP_analysis/session-120-D11-1455994104-30508/worker-0.2/./StMuRpsTrack_cxx.so
#8 0x00007f90d9d5a879 in StMuRpsUtil::recalcTrack(StMuRpsTrack const*, StMuRpsTrack*) () from /home/rafal/.proof/STAR_analysis-QA_2015-CEP_analysis/session-120-D11-1455994104-30508/worker-0.2/./StMuRpsUtil_cxx.so
#9 0x00007f90d9d5ac8d in StMuRpsUtil::process() () from /home/rafal/.proof/STAR_analysis-QA_2015-CEP_analysis/session-120-D11-1455994104-30508/worker-0.2/./StMuRpsUtil_cxx.so
#10 0x00007f90d8e96980 in star::RpTrackSelection() const () from /home/rafal/.proof/STAR_analysis-QA_2015-CEP_analysis/session-120-D11-1455994104-30508/worker-0.2/./star_C.so
#11 0x00007f90d8ea064b in star::Process(long long) () from /home/rafal/.proof/STAR_analysis-QA_2015-CEP_analysis/session-120-D11-1455994104-30508/worker-0.2/./star_C.so
#12 0x00007f90d912c289 in TProofPlayer::Process(TDSet*, char const*, char const*, long long, long long) () from /usr/cern/root_v5.34.34/lib/libProofPlayer.so
#13 0x00007f90dc2148c6 in TProofServ::HandleProcess(TMessage*, TString*) () from /usr/cern/root_v5.34.34/lib/libProof.so
#14 0x00007f90dc218fe8 in TProofServ::HandleSocketInput(TMessage*, bool) () from /usr/cern/root_v5.34.34/lib/libProof.so
#15 0x00007f90dc201e1f in TProofServ::HandleSocketInput() () from /usr/cern/root_v5.34.34/lib/libProof.so
#16 0x00007f90dc21b6a1 in TProofServLiteInputHandler::Notify() () from /usr/cern/root_v5.34.34/lib/libProof.so
#17 0x00007f90e079c545 in TUnixSystem::CheckDescriptors() () from /usr/cern/root_v5.34.34/lib/libCore.so
#18 0x00007f90e079d06a in TUnixSystem::DispatchOneEvent(bool) () from /usr/cern/root_v5.34.34/lib/libCore.so
#19 0x00007f90e071ffe6 in TSystem::InnerLoop() () from /usr/cern/root_v5.34.34/lib/libCore.so
#20 0x00007f90e0720bf0 in TSystem::Run() () from /usr/cern/root_v5.34.34/lib/libCore.so
#21 0x00007f90e06c636f in TApplication::Run(bool) () from /usr/cern/root_v5.34.34/lib/libCore.so
#22 0x0000000000401bbe in main ()
===========================================================
To me it looks like ROOT crashes in TObject copy constructor. The lines of code which lead to described segmentation fault are as follows:
double StMuRpsTrack::thetaRp(unsigned int coordinate) const {
if(coordinate>rpsAngleTheta) return 0.0;
if(mType==rpsLocal) return theta(coordinate);
TVector3 deltaVector = trackPoint(1)->positionVec() - trackPoint(0)->positionVec();
return atan((coordinate<rpsAngleTheta ? deltaVector[coordinate] : deltaVector.Perp())/abs(deltaVector.z()));
}
The culprit is line where deltaVector is assigned with the difference of two vectors. I checked that at the moment of crash these two vectors “are OK”. Any guess what could be wrong?
Thank you,
Rafal