Bug 274713 - Digikam crashed unexpectedly
Summary: Digikam crashed unexpectedly
Status: RESOLVED UPSTREAM
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Runtime (show other bugs)
Version: 2.0.0
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-02 00:26 UTC by Graham Watson
Modified: 2017-07-20 10:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Watson 2011-06-02 00:26:37 UTC
Application: digikam (2.0.0-beta6)
KDE Platform Version: 4.6.2 (4.6.2)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-8-generic x86_64
Distribution: Ubuntu 11.04

-- Information about the crash:
Not exactly sure what triggered this but hopefully the attached trace will help.

Steps that led to this crash:

1) Started a people search across my entire photo collection.
2) Left that search running in the background and continued with the next steps. This was still running when the crash occurred.
3) Connected a USB camera and used the USB drive import to copy the photos off it and delete them from the camera.
4) Used the RAW import tool to import and edit one of those photos and save it as a JPEG.
5) Moved the resulting JPEG to another album (created a new album which did not appear in the albums pane afterwards even when I hit refresh - I guess this could be related?)

This next bit seemed to be the trigger:

6) Minimise Digikam (still people searching)
7) Turn off my router (dropped my internet wireless connection).
8) Wait 10 seconds and turn on my router again.

At the exact time when my wireless connection reconnected to the router, Digikam crashed.

-- Backtrace:
Application: digiKam (digikam), signal: Aborted
pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
	in ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
[Current thread is 1 (Thread 0x7fb00ecd1a20 (LWP 8133))]

Thread 10 (Thread 0x7fafef6d5700 (LWP 8135)):
#0  0x00007fb00635cf03 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fb00029c104 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb00029c9f2 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007faffb373c44 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fb0002c33e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb00606cd8c in start_thread (arg=0x7fafef6d5700) at pthread_create.c:304
#6  0x00007fb00636a04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7fafe0b70700 (LWP 8137)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb00739582b in wait (this=<value optimized out>, mutex=0x1ad2208, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x1ad2208, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00000000005b64a8 in Digikam::ScanController::run (this=0x1aa26a0) at /build/buildd/digikam2-2.0.0~beta6/core/digikam/database/scancontroller.cpp:618
#4  0x00007fb007395175 in QThreadPrivate::start (arg=0x1aa26a0) at thread/qthread_unix.cpp:320
#5  0x00007fb00606cd8c in start_thread (arg=0x7fafe0b70700) at pthread_create.c:304
#6  0x00007fb00636a04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7fafe036f700 (LWP 8138)):
#0  0xffffffffff60017b in ?? ()
#1  0x00007fafe036e840 in ?? ()
#2  0x00007fff18d497b2 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 7 (Thread 0x7fafc9454700 (LWP 8278)):
[KCrash Handler]
#6  0x00007fb0062b7d05 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x00007fb0062bbab6 in abort () at abort.c:92
#8  0x00007fb0062b07c5 in __assert_fail (assertion=0x7fafec5ca622 "*_head == _item", file=<value optimized out>, line=701, function=<value optimized out>) at assert.c:81
#9  0x00007fafec5c6629 in avahi_service_browser_free () from /usr/lib/x86_64-linux-gnu/libavahi-client.so.3
#10 0x00007fafba328a38 in net_avahi_callback (c=0x2621e30, state=<value optimized out>, userdata=<value optimized out>) at net.c:854
#11 0x00007fafec5c297e in ?? () from /usr/lib/x86_64-linux-gnu/libavahi-client.so.3
#12 0x00007faffd223ac6 in dbus_connection_dispatch () from /lib/x86_64-linux-gnu/libdbus-1.so.3
#13 0x00007fafec5c9ad6 in ?? () from /usr/lib/x86_64-linux-gnu/libavahi-client.so.3
#14 0x00007fafec7d6620 in avahi_simple_poll_dispatch () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#15 0x00007fafec7d690d in avahi_simple_poll_loop () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#16 0x00007fafec7d698c in ?? () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#17 0x00007fb00606cd8c in start_thread (arg=0x7fafc9454700) at pthread_create.c:304
#18 0x00007fb00636a04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#19 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fafb09b3700 (LWP 8665)):
#0  0xffffffffff60017b in ?? ()
#1  0x00007fafb09b2800 in ?? ()
#2  0x00007fff18d497b2 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 5 (Thread 0x7fafabfff700 (LWP 8706)):
#0  0x00007fb00606f3c4 in __pthread_mutex_lock (mutex=0x343f2c8) at pthread_mutex_lock.c:61
#1  0x00007fb00029c0cb in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb00029c639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb0074a7446 in QEventDispatcherGlib::processEvents (this=0x279d440, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fb00747b882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fb00747babc in QEventLoop::exec (this=0x7fafabffeb00, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fb00b7f661f in Digikam::WorkerObjectRunnable::run (this=0x7fafb67cb840) at /build/buildd/digikam2-2.0.0~beta6/core/libs/threads/threadmanager.cpp:196
#7  0x00007fb00738a188 in QThreadPoolThread::run (this=0x1883cd0) at concurrent/qthreadpool.cpp:106
#8  0x00007fb007395175 in QThreadPrivate::start (arg=0x1883cd0) at thread/qthread_unix.cpp:320
#9  0x00007fb00606cd8c in start_thread (arg=0x7fafabfff700) at pthread_create.c:304
#10 0x00007fb00636a04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fafca76b700 (LWP 8707)):
#0  0x00007fb00635cf03 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fb00029c104 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb00029c639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb0074a7446 in QEventDispatcherGlib::processEvents (this=0x34112e0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fb00747b882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fb00747babc in QEventLoop::exec (this=0x7fafca76ab00, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fb00b7f661f in Digikam::WorkerObjectRunnable::run (this=0x7fafb6672c70) at /build/buildd/digikam2-2.0.0~beta6/core/libs/threads/threadmanager.cpp:196
#7  0x00007fb00738a188 in QThreadPoolThread::run (this=0x7fafe41d03f0) at concurrent/qthreadpool.cpp:106
#8  0x00007fb007395175 in QThreadPrivate::start (arg=0x7fafe41d03f0) at thread/qthread_unix.cpp:320
#9  0x00007fb00606cd8c in start_thread (arg=0x7fafca76b700) at pthread_create.c:304
#10 0x00007fb00636a04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fafc5607700 (LWP 8713)):
#0  0x00007fb00029afe3 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fb00029bf9d in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb00029c639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb0074a7446 in QEventDispatcherGlib::processEvents (this=0x33aa8f0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fb00747b882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fb00747babc in QEventLoop::exec (this=0x7fafc5606b00, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fb00b7f661f in Digikam::WorkerObjectRunnable::run (this=0x7fafb72d73c0) at /build/buildd/digikam2-2.0.0~beta6/core/libs/threads/threadmanager.cpp:196
#7  0x00007fb00738a188 in QThreadPoolThread::run (this=0x7fafe48645d0) at concurrent/qthreadpool.cpp:106
#8  0x00007fb007395175 in QThreadPrivate::start (arg=0x7fafe48645d0) at thread/qthread_unix.cpp:320
#9  0x00007fb00606cd8c in start_thread (arg=0x7fafc5607700) at pthread_create.c:304
#10 0x00007fb00636a04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fafc8c53700 (LWP 8783)):
#0  0x00007fb00c098de7 in cmsTetrahedralInterp8 () from /usr/lib/liblcms.so.1
#1  0x00007fb00c0a837c in ?? () from /usr/lib/liblcms.so.1
#2  0x00007fb00b6b8430 in Digikam::IccTransform::transform (this=0x7fafc8c51cc0, image=..., description=<value optimized out>, observer=0x0) at /build/buildd/digikam2-2.0.0~beta6/core/libs/dimg/filters/icc/icctransform.cpp:720
#3  0x00007fb00b6ba460 in Digikam::IccTransform::apply (this=0x7fafc8c51cc0, image=..., observer=0x0) at /build/buildd/digikam2-2.0.0~beta6/core/libs/dimg/filters/icc/icctransform.cpp:648
#4  0x00007fb00b6b1bf8 in Digikam::IccManager::transformForDisplay (this=0x7fafc8c51f30, profile=<value optimized out>) at /build/buildd/digikam2-2.0.0~beta6/core/libs/dimg/filters/icc/iccmanager.cpp:370
#5  0x00007fb00b7c74aa in Digikam::SharedLoadingTask::postProcess (this=0x7fafb70618d0) at /build/buildd/digikam2-2.0.0~beta6/core/libs/threadimageio/loadsavetask.cpp:326
#6  0x00007fb00b7cbca4 in Digikam::PreviewLoadingTask::execute (this=0x7fafb70618d0) at /build/buildd/digikam2-2.0.0~beta6/core/libs/threadimageio/previewtask.cpp:401
#7  0x00007fb00b7b7e96 in Digikam::LoadSaveThread::run (this=0x32694b0) at /build/buildd/digikam2-2.0.0~beta6/core/libs/threadimageio/loadsavethread.cpp:118
#8  0x00007fb00b7f857e in Digikam::DynamicThread::DynamicThreadPriv::run (this=0x32695e0) at /build/buildd/digikam2-2.0.0~beta6/core/libs/threads/dynamicthread.cpp:328
#9  0x00007fb00738a188 in QThreadPoolThread::run (this=0x7fafe4221d10) at concurrent/qthreadpool.cpp:106
#10 0x00007fb007395175 in QThreadPrivate::start (arg=0x7fafe4221d10) at thread/qthread_unix.cpp:320
#11 0x00007fb00606cd8c in start_thread (arg=0x7fafc8c53700) at pthread_create.c:304
#12 0x00007fb00636a04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fb00ecd1a20 (LWP 8133)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb00739582b in wait (this=<value optimized out>, mutex=0x7fafe4174030, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x7fafe4174030, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fb0073897b1 in QThreadPoolPrivate::waitForDone (this=0x7fafe4173fa0) at concurrent/qthreadpool.cpp:295
#4  0x00007fb00738a7bf in QThreadPool::~QThreadPool (this=0x7fafe41eadb0, __in_chrg=<value optimized out>) at concurrent/qthreadpool.cpp:428
#5  0x00007fb00738a7f9 in QThreadPool::~QThreadPool (this=0x7fafe41eadb0, __in_chrg=<value optimized out>) at concurrent/qthreadpool.cpp:430
#6  0x00007fb00748ec14 in QObjectPrivate::deleteChildren (this=0x7fafe4173ea0) at kernel/qobject.cpp:1964
#7  0x00007fb0074935f4 in QObject::~QObject (this=0x7fafe416c920, __in_chrg=<value optimized out>) at kernel/qobject.cpp:946
#8  0x00007fb00b7f5ef7 in ~ThreadManagerCreator () at /build/buildd/digikam2-2.0.0~beta6/core/libs/threads/threadmanager.cpp:237
#9  destroy () at /build/buildd/digikam2-2.0.0~beta6/core/libs/threads/threadmanager.cpp:241
#10 0x00007fb0062bd961 in __run_exit_handlers (status=1) at exit.c:78
#11 exit (status=1) at exit.c:100
#12 0x00007faffb86f066 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#13 0x00007fb008db1638 in KApplication::xioErrhandler (this=0x7fff18c2a680, dpy=0x18191b0) at ../../kdeui/kernel/kapplication.cpp:419
#14 0x00007fb004e7bdee in _XIOError (dpy=0x18191b0) at ../../src/XlibInt.c:1618
#15 0x00007fb004e7962d in _XEventsQueued (dpy=0x18191b0, mode=<value optimized out>) at ../../src/xcb_io.c:307
#16 0x00007fb004e69f1f in XEventsQueued (dpy=0x18191b0, mode=2) at ../../src/Pending.c:43
#17 0x00007fb00813ac4c in x11EventSourceCheck (s=0x1817df0) at kernel/qguieventdispatcher_glib.cpp:85
#18 0x00007fb00029b854 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007fb00029c122 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007fb00029c639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fb0074a73ef in QEventDispatcherGlib::processEvents (this=0x178f910, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#22 0x00007fb00813adfe in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#23 0x00007fb00747b882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#24 0x00007fb00747babc in QEventLoop::exec (this=0x7fff18c2a4d0, flags=...) at kernel/qeventloop.cpp:201
#25 0x00007fb00747fecb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#26 0x000000000068ae34 in main (argc=5, argv=0x7fff18c2aed8) at /build/buildd/digikam2-2.0.0~beta6/core/digikam/main/main.cpp:232

Reported using DrKonqi
Comment 1 caulier.gilles 2011-06-08 14:08:07 UTC
From your backtrace :

Thread 7 (Thread 0x7fafc9454700 (LWP 8278)):
[KCrash Handler]
#6  0x00007fb0062b7d05 in raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x00007fb0062bbab6 in abort () at abort.c:92
#8  0x00007fb0062b07c5 in __assert_fail (assertion=0x7fafec5ca622 "*_head ==
_item", file=<value optimized out>, line=701, function=<value optimized out>)
at assert.c:81
#9  0x00007fafec5c6629 in avahi_service_browser_free () from
/usr/lib/x86_64-linux-gnu/libavahi-client.so.3
#10 0x00007fafba328a38 in net_avahi_callback (c=0x2621e30, state=<value
optimized out>, userdata=<value optimized out>) at net.c:854
#11 0x00007fafec5c297e in ?? () from
/usr/lib/x86_64-linux-gnu/libavahi-client.so.3
#12 0x00007faffd223ac6 in dbus_connection_dispatch () from
/lib/x86_64-linux-gnu/libdbus-1.so.3
#13 0x00007fafec5c9ad6 in ?? () from
/usr/lib/x86_64-linux-gnu/libavahi-client.so.3
#14 0x00007fafec7d6620 in avahi_simple_poll_dispatch () from
/usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#15 0x00007fafec7d690d in avahi_simple_poll_loop () from
/usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#16 0x00007fafec7d698c in ?? () from
/usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#17 0x00007fb00606cd8c in start_thread (arg=0x7fafc9454700) at
pthread_create.c:304
#18 0x00007fb00636a04d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#19 0x0000000000000000 in ?? ()

==> internal system problem (libusb, libavahi, etc...)

There is no digiKam source code relevant from your backtrace.

Gilles Caulier
Comment 2 Graham Watson 2011-06-08 21:29:49 UTC
Hi,

I don't see how you can say that it isn't a digikam problem - it was clearly the digikam exe that crashed, even if the actual assert is coming from one of the support libraries. Sure it is thread 7 which asserted, but that thread 'belongs' to Digikam.

I'm a programmer myself (professional c++). I've not done much programming in Linux, but from the backtrace it looks to me like something (not me) has caused the application to exit, and thread 1 is in the process of exiting digikam and in the middle of calling the ThreadManagerCreator destructor, which is waiting inside a QThreadPool destructor for the threadpool thread to exit. The assert appears to be from an unrelated thread (probably the QThreadPool thread) but I would guess that it is busy with something that digikam is in the middle of destroying or has just destroyed prior to destroying the QThreadPool. Is it possible that you are cleaning up the data that the thread pool is using before stopping the thread pool?

Reading it again - libavahi has called abort, which is perhaps the reason for digikam to be shutting down, but perhaps my above hypothesis still stands - it should shut down cleanly in all situations. It does look network related so might be reproducible by the steps I described earlier. Perhaps an interdependency between yanking the network cable whilst the threadpool is at work and it not handling a clean shutdown?

Loving Digikam btw, if there's anything I can help with give me a shout :)

Regards
Graham
Comment 3 Marcel Wiesweg 2011-06-11 16:18:59 UTC
There is not much difference between calling abort() or doing ((int*)0)++. If libavahi chooses to call abort in the digikam process, it will tear down the process immediately. And it seems quite consistent that a software dealing with network awareness will show activity after and change in network state.

So this is an upstream bug in libavahi unless
- a backtrace, possibly produced from running under gdb instead of core dump analysis after the crash, suddenly shows the crash occured in digikam code, or
- the crash can be reproduced (suspend + resume) with varying backtraces, and or
- valgrind shows invalid memory operations by digikam causing memory corruption (probably coninciding with the previous point)

At the moment, there is nothing in digikam listening to network state change, so I doubt the hypothesis.