Hello all,
I finished a code to analyze alpha source data. It’s too long to share with you the file, so I just wanna talk about it roughly for your suggestion about the crash of my code.
There are some arrays of objects like TH1F/TGraph/TGraphErrors/TCanvas/TF1, the code finished everything I wrote, the objects in output root file is fine to Draw(), but once I try to quit the root prompt after the execution of the code, following crash happens(same output with flag -q):
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
Thread 12 (Thread 0x7fc25f363700 (LWP 3709634)):
#0 0x00007fc2f47b648c in pthread_cond_wait
GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007fc2f606ac8f in TCondition::Wait() () from /home/cai/local/lib/libThread.so
#2 0x00007fc2faf5499c in TThreadPool<art::TLoopControl, art::TLoop*>::Executor (arg=0x9c519f0) at /home/cai/local/include/TVirtualMutex.h:86
#3 0x00007fc2f6079319 in TThread::Function(void*) () from /home/cai/local/lib/libThread.so
#4 0x00007fc2f47b02de in start_thread () from /lib64/libpthread.so.0
#5 0x00007fc2f44e1e83 in clone () from /lib64/libc.so.6
Thread 11 (Thread 0x7fc25fb64700 (LWP 3709633)):
#0 0x00007fc2f47b648c in pthread_cond_wait
GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007fc2f606ac8f in TCondition::Wait() () from /home/cai/local/lib/libThread.so
#2 0x00007fc2faf5499c in TThreadPool<art::TLoopControl, art::TLoop*>::Executor (arg=0x9c519f0) at /home/cai/local/include/TVirtualMutex.h:86
#3 0x00007fc2f6079319 in TThread::Function(void*) () from /home/cai/local/lib/libThread.so
#4 0x00007fc2f47b02de in start_thread () from /lib64/libpthread.so.0
#5 0x00007fc2f44e1e83 in clone () from /lib64/libc.so.6
Thread 10 (Thread 0x7fc260365700 (LWP 3709632)):
#0 0x00007fc2f47b648c in pthread_cond_wait
GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f643537cc8f in TCondition::Wait() () from /home/cai/local/lib/libThread.so
#2 0x00007f643a26699c in TThreadPool<art::TLoopControl, art::TLoop*>::Executor (arg=0x9f96140) at /home/cai/local/include/TVirtualMutex.h:86
#3 0x00007f643538b319 in TThread::Function(void*) () from /home/cai/local/lib/libThread.so
#4 0x00007f6433ac22de in start_thread () from /lib64/libpthread.so.0
#5 0x00007f64337f3e83 in clone () from /lib64/libc.so.6
Thread 9 (Thread 0x7f63a15e7700 (LWP 3729142)):
#0 0x00007f6433ac848c in pthread_cond_wait
GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f643537cc8f in TCondition::Wait() () from /home/cai/local/lib/libThread.so
#2 0x00007f643a26699c in TThreadPool<art::TLoopControl, art::TLoop*>::Executor (arg=0x9f96140) at /home/cai/local/include/TVirtualMutex.h:86
#3 0x00007f643538b319 in TThread::Function(void*) () from /home/cai/local/lib/libThread.so
#4 0x00007f6433ac22de in start_thread () from /lib64/libpthread.so.0
#5 0x00007f64337f3e83 in clone () from /lib64/libc.so.6
Thread 8 (Thread 0x7f63a1de8700 (LWP 3729141)):
#0 0x00007f6433ac848c in pthread_cond_wait
GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f643537cc8f in TCondition::Wait() () from /home/cai/local/lib/libThread.so
#2 0x00007f643a26699c in TThreadPool<art::TLoopControl, art::TLoop*>::Executor (arg=0x9f96140) at /home/cai/local/include/TVirtualMutex.h:86
#3 0x00007f643538b319 in TThread::Function(void*) () from /home/cai/local/lib/libThread.so
#4 0x00007f6433ac22de in start_thread () from /lib64/libpthread.so.0
#5 0x00007f64337f3e83 in clone () from /lib64/libc.so.6
Thread 7 (Thread 0x7f63a25e9700 (LWP 3729140)):
#0 0x00007f6433ac848c in pthread_cond_wait
GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f643537cc8f in TCondition::Wait() () from /home/cai/local/lib/libThread.so
#2 0x00007f643a26699c in TThreadPool<art::TLoopControl, art::TLoop*>::Executor (arg=0x9f96140) at /home/cai/local/include/TVirtualMutex.h:86
#3 0x00007f643538b319 in TThread::Function(void*) () from /home/cai/local/lib/libThread.so
#4 0x00007f6433ac22de in start_thread () from /lib64/libpthread.so.0
#5 0x00007f64337f3e83 in clone () from /lib64/libc.so.6
Thread 6 (Thread 0x7f63a2dea700 (LWP 3729139)):
#0 0x00007f6433ac848c in pthread_cond_wait
GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f643537cc8f in TCondition::Wait() () from /home/cai/local/lib/libThread.so
#2 0x00007f643a26699c in TThreadPool<art::TLoopControl, art::TLoop*>::Executor (arg=0x9f96140) at /home/cai/local/include/TVirtualMutex.h:86
#3 0x00007f643538b319 in TThread::Function(void*) () from /home/cai/local/lib/libThread.so
#4 0x00007f6433ac22de in start_thread () from /lib64/libpthread.so.0
#5 0x00007f64337f3e83 in clone () from /lib64/libc.so.6
Thread 5 (Thread 0x7f63a35eb700 (LWP 3729138)):
#0 0x00007f6433ac848c in pthread_cond_wait
GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f643537cc8f in TCondition::Wait() () from /home/cai/local/lib/libThread.so
#2 0x00007f643a26699c in TThreadPool<art::TLoopControl, art::TLoop*>::Executor (arg=0x9f96140) at /home/cai/local/include/TVirtualMutex.h:86
#3 0x00007f643538b319 in TThread::Function(void*) () from /home/cai/local/lib/libThread.so
#4 0x00007f6433ac22de in start_thread () from /lib64/libpthread.so.0
#5 0x00007f64337f3e83 in clone () from /lib64/libc.so.6
Thread 4 (Thread 0x7f63a3dec700 (LWP 3729137)):
#0 0x00007f6433ac848c in pthread_cond_wait
GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f643537cc8f in TCondition::Wait() () from /home/cai/local/lib/libThread.so
#2 0x00007f643a26699c in TThreadPool<art::TLoopControl, art::TLoop*>::Executor (arg=0x9f96140) at /home/cai/local/include/TVirtualMutex.h:86
#3 0x00007f643538b319 in TThread::Function(void*) () from /home/cai/local/lib/libThread.so
#4 0x00007f6433ac22de in start_thread () from /lib64/libpthread.so.0
#5 0x00007f64337f3e83 in clone () from /lib64/libc.so.6
Thread 3 (Thread 0x7f63a45ed700 (LWP 3729136)):
#0 0x00007f6433ac848c in pthread_cond_wait
GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f643537cc8f in TCondition::Wait() () from /home/cai/local/lib/libThread.so
#2 0x00007f643a26699c in TThreadPool<art::TLoopControl, art::TLoop*>::Executor (arg=0x9f96140) at /home/cai/local/include/TVirtualMutex.h:86
#3 0x00007f643538b319 in TThread::Function(void*) () from /home/cai/local/lib/libThread.so
#4 0x00007f6433ac22de in start_thread () from /lib64/libpthread.so.0
#5 0x00007f64337f3e83 in clone () from /lib64/libc.so.6
Thread 2 (Thread 0x7f64208c0700 (LWP 3728944)):
#0 0x00007f6433ac848c in pthread_cond_wait
GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f643537cc8f in TCondition::Wait() () from /home/cai/local/lib/libThread.so
#2 0x00007f6420a580e0 in TThreadPool<art::TArtemisCanvas::Control, std::vector<art::TArtemisCanvas*, std::allocator<art::TArtemisCanvas*> >&>::Executor (arg=0x2ac9450) at /home/cai/local/include/TVirtualMutex.h:86
#3 0x00007f643538b319 in TThread::Function(void*) () from /home/cai/local/lib/libThread.so
#4 0x00007f6433ac22de in start_thread () from /lib64/libpthread.so.0
#5 0x00007f64337f3e83 in clone () from /lib64/libc.so.6
Thread 1 (Thread 0x7f643affdb40 (LWP 3728879)):
#0 0x00007f64337bff82 in waitpid () from /lib64/libc.so.6
#1 0x00007f643373c83f in do_system () from /lib64/libc.so.6
#2 0x00007f643862e4d3 in TUnixSystem::StackTrace() () from /home/cai/local/lib/libCore.so
#3 0x00007f64386305b4 in TUnixSystem::DispatchSignals(ESignals) () from /home/cai/local/lib/libCore.so
#4 <signal handler called>
#5 0x000000000060c9c0 in vtable for TObject ()
#6 0x00007f643708c9ee in TPaveStats::~TPaveStats() () from /home/cai/local/lib/libGraf.so
#7 0x00007f643708ca59 in TPaveStats::~TPaveStats() () from /home/cai/local/lib/libGraf.so
#8 0x00007f64385a0908 in TList::Clear(char const*) () from /home/cai/local/lib/libCore.so
#9 0x00007f6436ab9bd6 in TPad::Close(char const*) () from /home/cai/local/lib/libGpad.so
#10 0x00007f6436a9a88d in TCanvas::Close(char const*) () from /home/cai/local/lib/libGpad.so
#11 0x00007f6436a959b4 in TCanvas::Destructor() () from /home/cai/local/lib/libGpad.so
#12 0x00007f6436a9a4d0 in TCanvas::~TCanvas() () from /home/cai/local/lib/libGpad.so
#13 0x00007f6436a9a559 in TCanvas::~TCanvas() () from /home/cai/local/lib/libGpad.so
#14 0x00007f64385a3328 in TList::Delete(char const*) () from /home/cai/local/lib/libCore.so
#15 0x00007f64384f4d18 in TROOT::EndOfProcessCleanups() () from /home/cai/local/lib/libCore.so
#16 0x00007f643862b74f in TUnixSystem::Exit(int, bool) () from /home/cai/local/lib/libCore.so
#17 0x00007f6438500975 in TApplication::Terminate(int) () from /home/cai/local/lib/libCore.so
#18 0x000000000040766e in art::TArtRint::Terminate(int) ()
#19 0x00007f64361d7406 in TRint::Run(bool) () from /home/cai/local/lib/libRint.so
#20 0x00000000004097d9 in main ()
===========================================================
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 0x000000000060c9c0 in vtable for TObject ()
#6 0x00007f643708c9ee in TPaveStats::~TPaveStats() () from /home/cai/local/lib/libGraf.so
#7 0x00007f643708ca59 in TPaveStats::~TPaveStats() () from /home/cai/local/lib/libGraf.so
#8 0x00007f64385a0908 in TList::Clear(char const*) () from /home/cai/local/lib/libCore.so
#9 0x00007f6436ab9bd6 in TPad::Close(char const*) () from /home/cai/local/lib/libGpad.so
#10 0x00007f6436a9a88d in TCanvas::Close(char const*) () from /home/cai/local/lib/libGpad.so
#11 0x00007f6436a959b4 in TCanvas::Destructor() () from /home/cai/local/lib/libGpad.so
#12 0x00007f6436a9a4d0 in TCanvas::~TCanvas() () from /home/cai/local/lib/libGpad.so
#13 0x00007f6436a9a559 in TCanvas::~TCanvas() () from /home/cai/local/lib/libGpad.so
#14 0x00007f64385a3328 in TList::Delete(char const*) () from /home/cai/local/lib/libCore.so
#15 0x00007f64384f4d18 in TROOT::EndOfProcessCleanups() () from /home/cai/local/lib/libCore.so
#16 0x00007f643862b74f in TUnixSystem::Exit(int, bool) () from /home/cai/local/lib/libCore.so
#17 0x00007f6438500975 in TApplication::Terminate(int) () from /home/cai/local/lib/libCore.so
#18 0x000000000040766e in art::TArtRint::Terminate(int) ()
#19 0x00007f64361d7406 in TRint::Run(bool) () from /home/cai/local/lib/libRint.so
#20 0x00000000004097d9 in main ()
===========================================================
So may I ask for a general solution to or possible root of this crash?
ROOT Version: 6.20/04
Platform: 4.18.0-193.14.2.el8_2.x86_64
Compiler: linuxx8664gcc