Application: digikam (2.6.0) KDE Platform Version: 4.8.4 (4.8.4) (Compiled from sources) Qt Version: 4.8.2 Operating System: Linux 3.4.0-gentoo x86_64 Distribution: "NAME="Gentoo"" -- Information about the crash: - What I was doing when the application crashed: Digikam was quite unresponsive while running a full face recognition. I could not find a way to stop it (this may be a bug in itself :)), so I closed digikam, at which point it crashed with the attached backtrace. Hope it helps.. -- Backtrace: Application: digiKam (digikam), signal: Aborted Using host libthread_db library "/lib64/libthread_db.so.1". pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 [Current thread is 1 (Thread 0x7f77e175b800 (LWP 9159))] Thread 8 (Thread 0x7f77bbfff700 (LWP 9434)): #0 0x00007f77dad3dffd in read () at ../sysdeps/unix/syscall-template.S:82 #1 0x00007f77cea454bc in ?? () from /usr/lib64/libGL.so.1 #2 0x00007f77c9890b27 in ?? () from /usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.302.17 #3 0x00007f77d33b1290 in read (__nbytes=16, __buf=0x7f77bbffeaf0, __fd=<optimized out>) at /usr/include/bits/unistd.h:45 #4 g_wakeup_acknowledge (wakeup=0x7f77bc001fb0) at gwakeup.c:212 #5 0x00007f77d3374104 in g_main_context_check (context=0x7f77b40009c0, max_priority=2147483647, fds=0x7f77b4002a10, n_fds=1) at gmain.c:2980 #6 0x00007f77d337454c in g_main_context_iterate (context=0x7f77b40009c0, block=1, dispatch=1, self=<optimized out>) at gmain.c:3143 #7 0x00007f77d33746c4 in g_main_context_iteration (context=0x7f77b40009c0, may_block=1) at gmain.c:3207 #8 0x00007f77dbc47d66 in QEventDispatcherGlib::processEvents (this=0x7f77b40008e0, flags=...) at kernel/qeventdispatcher_glib.cpp:426 #9 0x00007f77dbc178d2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149 #10 0x00007f77dbc17b85 in QEventLoop::exec (this=0x7f77bbffec80, flags=...) at kernel/qeventloop.cpp:204 #11 0x00007f77dbb15148 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501 #12 0x00007f77dbbf65f8 in QInotifyFileSystemWatcherEngine::run (this=0x1db4760) at io/qfilesystemwatcher_inotify.cpp:248 #13 0x00007f77dbb177bb in QThreadPrivate::start (arg=0x1db4760) at thread/qthread_unix.cpp:307 #14 0x00007f77cea464d4 in ?? () from /usr/lib64/libGL.so.1 #15 0x00007f77d8ca9d96 in start_thread (arg=0x7f77bbfff700) at pthread_create.c:305 #16 0x00007f77dad4ba1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 Thread 7 (Thread 0x7f77a2e6b700 (LWP 14575)): #0 0x00007f77dad3dffd in read () at ../sysdeps/unix/syscall-template.S:82 #1 0x00007f77cea454bc in ?? () from /usr/lib64/libGL.so.1 #2 0x00007f77c9890b27 in ?? () from /usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.302.17 #3 0x00007f77d33b1290 in read (__nbytes=16, __buf=0x7f77a2e6aaf0, __fd=<optimized out>) at /usr/include/bits/unistd.h:45 #4 g_wakeup_acknowledge (wakeup=0x7f7788001f50) at gwakeup.c:212 #5 0x00007f77d3374104 in g_main_context_check (context=0x7f779c001700, max_priority=2147483647, fds=0x7f779c060720, n_fds=1) at gmain.c:2980 #6 0x00007f77d337454c in g_main_context_iterate (context=0x7f779c001700, block=1, dispatch=1, self=<optimized out>) at gmain.c:3143 #7 0x00007f77d33746c4 in g_main_context_iteration (context=0x7f779c001700, may_block=1) at gmain.c:3207 #8 0x00007f77dbc47d66 in QEventDispatcherGlib::processEvents (this=0x7f779c004800, flags=...) at kernel/qeventdispatcher_glib.cpp:426 #9 0x00007f77dbc178d2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149 #10 0x00007f77dbc17b85 in QEventLoop::exec (this=0x7f77a2e6ac80, flags=...) at kernel/qeventloop.cpp:204 #11 0x00007f77dbb15148 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501 #12 0x00007f77dbbf65f8 in QInotifyFileSystemWatcherEngine::run (this=0x6a6eaa0) at io/qfilesystemwatcher_inotify.cpp:248 #13 0x00007f77dbb177bb in QThreadPrivate::start (arg=0x6a6eaa0) at thread/qthread_unix.cpp:307 #14 0x00007f77cea464d4 in ?? () from /usr/lib64/libGL.so.1 #15 0x00007f77d8ca9d96 in start_thread (arg=0x7f77a2e6b700) at pthread_create.c:305 #16 0x00007f77dad4ba1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 Thread 6 (Thread 0x7f7779639700 (LWP 14937)): #0 pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f77dbb186cb in wait (time=18446744073709551615, this=0x729fb30) at thread/qwaitcondition_unix.cpp:86 #2 QWaitCondition::wait (this=<optimized out>, mutex=0x729ed18, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158 #3 0x00007f77a70663f4 in KIPIPlugins::KPRawThumbThread::run (this=0x729f1a0) at /var/tmp/portage/media-plugins/kipi-plugins-2.6.0/work/digikam-2.6.0/extra/kipi-plugins/common/libkipiplugins/tools/kprawthumbthread.cpp:107 #4 0x00007f77dbb177bb in QThreadPrivate::start (arg=0x729f1a0) at thread/qthread_unix.cpp:307 #5 0x00007f77cea464d4 in ?? () from /usr/lib64/libGL.so.1 #6 0x00007f77d8ca9d96 in start_thread (arg=0x7f7779639700) at pthread_create.c:305 #7 0x00007f77dad4ba1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 Thread 5 (Thread 0x7f7797cb3700 (LWP 17663)): #0 0x00007f77dad42c33 in *__GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87 #1 0x00007f77d33745a6 in g_main_context_poll (n_fds=1, fds=0x7f7754b0c850, timeout=-1, context=0x7f775491c330, priority=<optimized out>) at gmain.c:3440 #2 g_main_context_iterate (context=0x7f775491c330, block=1, dispatch=1, self=<optimized out>) at gmain.c:3141 #3 0x00007f77d33746c4 in g_main_context_iteration (context=0x7f775491c330, may_block=1) at gmain.c:3207 #4 0x00007f77dbc47d66 in QEventDispatcherGlib::processEvents (this=0x7f77540028d0, flags=...) at kernel/qeventdispatcher_glib.cpp:426 #5 0x00007f77dbc178d2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149 #6 0x00007f77dbc17b85 in QEventLoop::exec (this=0x7f7797cb2c40, flags=...) at kernel/qeventloop.cpp:204 #7 0x00007f77defccfce in Digikam::WorkerObjectRunnable::run (this=0x523f960) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/libs/threads/threadmanager.cpp:196 #8 0x00007f77dbb0bd10 in QThreadPoolThread::run (this=0x6169f40) at concurrent/qthreadpool.cpp:107 #9 0x00007f77dbb177bb in QThreadPrivate::start (arg=0x6169f40) at thread/qthread_unix.cpp:307 #10 0x00007f77cea464d4 in ?? () from /usr/lib64/libGL.so.1 #11 0x00007f77d8ca9d96 in start_thread (arg=0x7f7797cb3700) at pthread_create.c:305 #12 0x00007f77dad4ba1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 Thread 4 (Thread 0x7f777ae3c700 (LWP 17764)): #0 __pthread_mutex_lock (mutex=0x7f7754b0d780) at pthread_mutex_lock.c:89 #1 0x00007f77d33b1fc1 in g_mutex_lock (mutex=<optimized out>) at gthread-posix.c:208 #2 0x00007f77d33740ad in g_main_context_check (context=0x7f7754b15480, max_priority=2147483647, fds=<optimized out>, n_fds=<optimized out>) at gmain.c:3025 #3 0x00007f77d337454c in g_main_context_iterate (context=0x7f7754b15480, block=1, dispatch=1, self=<optimized out>) at gmain.c:3143 #4 0x00007f77d33746c4 in g_main_context_iteration (context=0x7f7754b15480, may_block=1) at gmain.c:3207 #5 0x00007f77dbc47d66 in QEventDispatcherGlib::processEvents (this=0x7f7754b15110, flags=...) at kernel/qeventdispatcher_glib.cpp:426 #6 0x00007f77dbc178d2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149 #7 0x00007f77dbc17b85 in QEventLoop::exec (this=0x7f777ae3bc40, flags=...) at kernel/qeventloop.cpp:204 #8 0x00007f77defccfce in Digikam::WorkerObjectRunnable::run (this=0x60ab2b0) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/libs/threads/threadmanager.cpp:196 #9 0x00007f77dbb0bd10 in QThreadPoolThread::run (this=0x49e9c20) at concurrent/qthreadpool.cpp:107 #10 0x00007f77dbb177bb in QThreadPrivate::start (arg=0x49e9c20) at thread/qthread_unix.cpp:307 #11 0x00007f77cea464d4 in ?? () from /usr/lib64/libGL.so.1 #12 0x00007f77d8ca9d96 in start_thread (arg=0x7f777ae3c700) at pthread_create.c:305 #13 0x00007f77dad4ba1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 Thread 3 (Thread 0x7f777a63b700 (LWP 17765)): [KCrash Handler] #6 0x00007f77dac96a35 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #7 0x00007f77dac97d35 in *__GI_abort () at abort.c:91 #8 0x00007f77dbb0d9b4 in qt_message_output (msgType=<optimized out>, buf=<optimized out>) at global/qglobal.cpp:2260 #9 0x00007f77dbb0db4d in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7f77de9fa640 "Fatal Error: Accessed global static '%s *%s()' after destruction. Defined at %s:%d", ap=0x7f777a639b10) at global/qglobal.cpp:2306 #10 0x00007f77dbb0dce5 in qFatal (msg=<optimized out>) at global/qglobal.cpp:2489 #11 0x00007f77de94e0bf in operator-> (this=<optimized out>) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/libs/database/imagetagpair.cpp:75 #12 Digikam::ImageTagPairPriv::isNull (this=0x7f77566c7930) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/libs/database/imagetagpair.cpp:113 #13 0x00007f77de94e341 in Digikam::ImageTagPairPriv::init (this=0x7f77566c7930, i=..., t=40) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/libs/database/imagetagpair.cpp:89 #14 0x00007f77de94fbd7 in Digikam::ImageTagPair::ImageTagPair (this=0x7f777a639eb0, imageId=39268, tagId=40) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/libs/database/imagetagpair.cpp:124 #15 0x000000000069e479 in Digikam::FaceIface::writeUnconfirmedResults (this=0x7f777a63a190, image=..., imageid=39268, faceList=...) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/utilities/facedetection/faceiface.cpp:347 #16 0x00000000006a968b in Digikam::DatabaseWriter::process (this=0x94b77d0, package=...) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/utilities/facedetection/facepipeline.cpp:568 #17 0x00000000006a9a67 in Digikam::DatabaseWriter::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0_build/digikam/facepipeline_p.moc:494 #18 0x00007f77dbc2d806 in QObject::event (this=0x94b77d0, e=<optimized out>) at kernel/qobject.cpp:1195 #19 0x00007f77dc6400a4 in QApplicationPrivate::notify_helper (this=0x1b70020, receiver=0x94b77d0, e=0x7f7754b62fb0) at kernel/qapplication.cpp:4551 #20 0x00007f77dc644b7f in QApplication::notify (this=<optimized out>, receiver=0x94b77d0, e=0x7f7754b62fb0) at kernel/qapplication.cpp:4412 #21 0x00007f77dd38c5b6 in KApplication::notify (this=0x7fffaa530e70, receiver=0x94b77d0, event=0x7f7754b62fb0) at /var/tmp/portage/kde-base/kdelibs-4.8.4/work/kdelibs-4.8.4/kdeui/kernel/kapplication.cpp:311 #22 0x00007f77dbc18b6b in QCoreApplication::notifyInternal (this=0x7fffaa530e70, receiver=0x94b77d0, event=0x7f7754b62fb0) at kernel/qcoreapplication.cpp:915 #23 0x00007f77dbc1c137 in sendEvent (event=0x7f7754b62fb0, receiver=0x94b77d0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231 #24 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5c47310) at kernel/qcoreapplication.cpp:1539 #25 0x00007f77dbc47b73 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236 #26 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279 #27 0x00007f77d33742c2 in g_main_dispatch (context=0x7f7754b118e0) at gmain.c:2539 #28 g_main_context_dispatch (context=0x7f7754b118e0) at gmain.c:3075 #29 0x00007f77d3374608 in g_main_context_iterate (context=0x7f7754b118e0, block=1, dispatch=1, self=<optimized out>) at gmain.c:3146 #30 0x00007f77d33746c4 in g_main_context_iteration (context=0x7f7754b118e0, may_block=1) at gmain.c:3207 #31 0x00007f77dbc47d0f in QEventDispatcherGlib::processEvents (this=0x7f7754c15d20, flags=...) at kernel/qeventdispatcher_glib.cpp:424 #32 0x00007f77dbc178d2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149 #33 0x00007f77dbc17b85 in QEventLoop::exec (this=0x7f777a63ac40, flags=...) at kernel/qeventloop.cpp:204 #34 0x00007f77defccfce in Digikam::WorkerObjectRunnable::run (this=0x8607f40) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/libs/threads/threadmanager.cpp:196 #35 0x00007f77dbb0bd10 in QThreadPoolThread::run (this=0x5f91f20) at concurrent/qthreadpool.cpp:107 #36 0x00007f77dbb177bb in QThreadPrivate::start (arg=0x5f91f20) at thread/qthread_unix.cpp:307 #37 0x00007f77cea464d4 in ?? () from /usr/lib64/libGL.so.1 #38 0x00007f77d8ca9d96 in start_thread (arg=0x7f777a63b700) at pthread_create.c:305 #39 0x00007f77dad4ba1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 Thread 2 (Thread 0x7f77877fe700 (LWP 17774)): #0 g_mutex_lock (mutex=0x7f7754c05300) at gthread-posix.c:205 #1 0x00007f77d337456a in g_main_context_iterate (context=0x7f7754c05300, block=1, dispatch=1, self=<optimized out>) at gmain.c:3150 #2 0x00007f77d33746c4 in g_main_context_iteration (context=0x7f7754c05300, may_block=1) at gmain.c:3207 #3 0x00007f77dbc47d66 in QEventDispatcherGlib::processEvents (this=0x7f7754c58a30, flags=...) at kernel/qeventdispatcher_glib.cpp:426 #4 0x00007f77dbc178d2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149 #5 0x00007f77dbc17b85 in QEventLoop::exec (this=0x7f77877fdc40, flags=...) at kernel/qeventloop.cpp:204 #6 0x00007f77defccfce in Digikam::WorkerObjectRunnable::run (this=0x9537d60) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/libs/threads/threadmanager.cpp:196 #7 0x00007f77dbb0bd10 in QThreadPoolThread::run (this=0x689ded0) at concurrent/qthreadpool.cpp:107 #8 0x00007f77dbb177bb in QThreadPrivate::start (arg=0x689ded0) at thread/qthread_unix.cpp:307 #9 0x00007f77cea464d4 in ?? () from /usr/lib64/libGL.so.1 #10 0x00007f77d8ca9d96 in start_thread (arg=0x7f77877fe700) at pthread_create.c:305 #11 0x00007f77dad4ba1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 Thread 1 (Thread 0x7f77e175b800 (LWP 9159)): #0 pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f77dbb186cb in wait (time=18446744073709551615, this=0x1c33770) at thread/qwaitcondition_unix.cpp:86 #2 QWaitCondition::wait (this=<optimized out>, mutex=0x1cf6058, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158 #3 0x00007f77dbb0b0f6 in QThreadPoolPrivate::waitForDone (this=0x1cf5fd0, msecs=-1) at concurrent/qthreadpool.cpp:298 #4 0x00007f77dbb0c544 in QThreadPool::~QThreadPool (this=0x1e849b0, __in_chrg=<optimized out>) at concurrent/qthreadpool.cpp:440 #5 0x00007f77dbb0c589 in QThreadPool::~QThreadPool (this=0x1e849b0, __in_chrg=<optimized out>) at concurrent/qthreadpool.cpp:442 #6 0x00007f77dbc2bd64 in QObjectPrivate::deleteChildren (this=0x1cf3e70) at kernel/qobject.cpp:1908 #7 0x00007f77dbc2f620 in QObject::~QObject (this=0x1dbed70, __in_chrg=<optimized out>) at kernel/qobject.cpp:927 #8 0x00007f77defcc807 in ~ThreadManagerCreator (this=0x1dbed70, __in_chrg=<optimized out>) at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/libs/threads/threadmanager.cpp:236 #9 destroy () at /var/tmp/portage/media-gfx/digikam-2.6.0/work/digikam-2.6.0/core/libs/threads/threadmanager.cpp:241 #10 0x00007f77dac993f1 in __run_exit_handlers (status=0, listp=0x7f77db0045a8, run_list_atexit=true) at exit.c:78 #11 0x00007f77dac99445 in *__GI_exit (status=29570972) at exit.c:100 #12 0x00007f77dac834c4 in __libc_start_main (main=0x496440 <main(int, char**)>, argc=5, ubp_av=0x7fffaa531698, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffaa531688) at libc-start.c:258 #13 0x0000000000498d05 in _start () Reported using DrKonqi
Thread is running during destruction, crash occurs when a singleton is accessed which was already destroyed. We need to cancel + wait for the thread in the shutdown process.
Git commit 4268f3bb05b21b512aa6e9de79d048520db1a845 by Marcel Wiesweg. Committed on 01/07/2012 at 14:18. Pushed by mwiesweg into branch 'master'. Add a wait() method to FacePipeline which is called on destruction and waits for all dependent threads. M +8 -0 libs/threads/parallelworkers.cpp M +2 -0 libs/threads/parallelworkers.h M +44 -0 utilities/facedetection/facepipeline.cpp M +2 -0 utilities/facedetection/facepipeline_p.h http://commits.kde.org/digikam/4268f3bb05b21b512aa6e9de79d048520db1a845
Gilles, FaceDetector is a maintenance tool. Is there code which, at shutdown from DigikamApp::~DigikamApp() and similiar to FileActionMngr::requestShutDown(), waits for all remaining active maintenance tasks and then deletes the objects?
Marcel, Nothing is implemented to kill all maintenance tools properly at shutdown if something is under process. I forget to do it. I just take a look in DigikamApp and MaintenanceMngr destructors. Gilles Caulier
Git commit 6af91def84f71b69c4b1767db23bb8ff34395d3d by Gilles Caulier. Committed on 28/10/2013 at 20:38. Pushed by cgilles into branch 'master'. add eventloop in ProgressManager to wait progressitem deletion is complete when slotAbortAll() is called. By this way, if user close digiKam when progressitems are currently running in background (as some maintenance tools), this prevent violent crash due to close remain active objects in memory. FIXED-IN: 4.0.0 M +14 -1 libs/progressmanager/progressmanager.cpp M +1 -0 libs/progressmanager/progressmanager.h M +9 -2 libs/progressmanager/progressview.cpp M +4 -0 libs/progressmanager/progressview.h http://commits.kde.org/digikam/6af91def84f71b69c4b1767db23bb8ff34395d3d