Bug 331578 - digikam deadlocks on batch renaming/moving images
Summary: digikam deadlocks on batch renaming/moving images
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: AdvancedRename-engine (show other bugs)
Version: 3.5.0
Platform: Gentoo Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-27 19:10 UTC by Johannes Hirte
Modified: 2022-02-01 06:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Hirte 2014-02-27 19:10:17 UTC
When renaming or moving a big number of images, digikam deadlocks. Sometimes this happens on 20 images in a batch, sometimes it takes many more. I was able to reproduce this with 1000 images in a batch reliably. I need to kill digikam when this happens.
When this happens on moving images, digikam "forgets" the last image processed. It appears neither on the new location nor the old one after restarting digikam. Most time it works to quit digikam, move the image outside to a new location digikam is aware of, and restart it to rescan the collection.

Reproducible: Always




debug output from a hang during renaming:

Thread 7 (Thread 0x7f076e2cc700 (LWP 24518)):
#0 pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f077cb841e6 in wait (time=18446744073709551615, this=0x20ce190) at thread/qwaitcondition_unix.cpp:86
#2 QWaitCondition::wait (this=<optimized out>, mutex=0x20d0e40, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3 0x00007f077cb7f136 in QReadWriteLock::lockForWrite (this=0x20d3e30) at thread/qreadwritelock.cpp:293
#4 0x00007f07810c5a92 in relock (this=0x7f076e2cb450) at /usr/include/qt4/QtCore/qreadwritelock.h:155
#5 QWriteLocker (areadWriteLock=<optimized out>, this=0x7f076e2cb450) at /usr/include/qt4/QtCore/qreadwritelock.h:175
#6 ImageInfoWriteLocker (this=0x7f076e2cb450) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/imageinfodata.h:84
#7 Digikam::ImageInfoCache::slotImageChanged (this=0x20d3e00, changeset=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/imageinfocache.cpp:238
#8 0x00007f077cc967d8 in QMetaObject::activate (sender=sender@entry=0x20ce050, m=m@entry=0x7f07813c16a0 <Digikam::DatabaseWatch::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7f076e2cb5e0) at kernel/qobject.cpp:3547
#9 0x00007f07810a60e5 in Digikam::DatabaseWatch::imageChange (this=this@entry=0x20ce050, _t1=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0_build/digikam/moc_databasewatch.cpp:171
#10 0x00007f07810a6751 in Digikam::DatabaseWatch::sendImageChange (this=0x20ce050, cset=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/databasewatch.cpp:244
#11 0x00007f07810aa46c in sendToWatch (this=<optimized out>, changeset=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/databasebackend_p.h:60
#12 recordChangeset (changeset=..., this=0x20d1090) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/databasebackend_p.h:105
#13 Digikam::DatabaseBackend::recordChangeset (this=<optimized out>, changeset=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/databasebackend.cpp:92
#14 0x00007f07810726c6 in Digikam::AlbumDB::addItem (this=0x2099410, albumID=albumID@entry=13727, name="test-new-000321.jpg", status=status@entry=Digikam::DatabaseItem::Visible, category=category@entry=Digikam::DatabaseItem::Image, modificationDate=2012-01-29 11:58:46.000, fileSize=fileSize@entry=426553, uniqueHash="30730f95e3bf010f31ee31429b5fbd68") at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/albumdb.cpp:3662
#15 0x00007f07810eda31 in Digikam::ImageScanner::commitAddImage (this=this@entry=0x7f076e2cb8f0) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/imagescanner.cpp:406
#16 0x00007f07810f6978 in Digikam::ImageScanner::commit (this=this@entry=0x7f076e2cb8f0) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/imagescanner.cpp:203
#17 0x00007f078108f725 in Digikam::CollectionScanner::Private::finishScanner (this=0x7f0768011740, scanner=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/collectionscanner.cpp:353
#18 0x00007f078108fc58 in Digikam::CollectionScanner::scanNewFile (this=this@entry=0x7f076e2cbd60, info=..., albumId=13727) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/collectionscanner.cpp:1251
#19 0x00007f0781092e0f in Digikam::CollectionScanner::scanAlbum (this=this@entry=0x7f076e2cbd60, location=..., album="/") at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/collectionscanner.cpp:1089
#20 0x00007f0781093663 in Digikam::CollectionScanner::scanAlbumRoot (this=this@entry=0x7f076e2cbd60, location=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/collectionscanner.cpp:828
#21 0x00007f07810955fd in Digikam::CollectionScanner::partialScan (this=this@entry=0x7f076e2cbd60, albumRoot="/home/pictures/Testbed", album="/") at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/collectionscanner.cpp:687
#22 0x00007f0781095afc in Digikam::CollectionScanner::partialScan (this=this@entry=0x7f076e2cbd60, filePath="/home/pictures/Testbed") at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/collectionscanner.cpp:617
#23 0x00000000005d60a9 in Digikam::ScanController::run (this=0x20f4fb0) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/digikam/database/scancontroller.cpp:798
#24 0x00007f077cb83d0f in QThreadPrivate::start (arg=0x20f4fb0) at thread/qthread_unix.cpp:338
#25 0x00007f077f695073 in start_thread (arg=0x7f076e2cc700) at pthread_create.c:309
#26 0x00007f077c16ddcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 6 (Thread 0x7f076dacb700 (LWP 24519)):
#0 0x00007f077c16464d in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007f077a79d274 in g_main_context_poll (priority=2147483647, n_fds=2, fds=0x7f0760002a00, timeout=-1, context=0x7f07600009a0) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:4007
#2 g_main_context_iterate (context=context@entry=0x7f07600009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3708
#3 0x00007f077a79d37c in g_main_context_iteration (context=0x7f07600009a0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3774
#4 0x00007f077ccaf7d6 in QEventDispatcherGlib::processEvents (this=0x7f07600008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#5 0x00007f077cc818df in QEventLoop::processEvents (this=this@entry=0x7f076dacad60, flags=...) at kernel/qeventloop.cpp:149
#6 0x00007f077cc81bd5 in QEventLoop::exec (this=this@entry=0x7f076dacad60, flags=...) at kernel/qeventloop.cpp:204
#7 0x00007f077cb816cf in QThread::exec (this=this@entry=0x208af30) at thread/qthread.cpp:536
#8 0x00007f077cc632a3 in QInotifyFileSystemWatcherEngine::run (this=0x208af30) at io/qfilesystemwatcher_inotify.cpp:256
#9 0x00007f077cb83d0f in QThreadPrivate::start (arg=0x208af30) at thread/qthread_unix.cpp:338
#10 0x00007f077f695073 in start_thread (arg=0x7f076dacb700) at pthread_create.c:309
#11 0x00007f077c16ddcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 5 (Thread 0x7f076d2ca700 (LWP 24529)):
#0 pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f077cb841e6 in wait (time=18446744073709551615, this=0x20353a0) at thread/qwaitcondition_unix.cpp:86
#2 QWaitCondition::wait (this=this@entry=0x2076ee0, mutex=mutex@entry=0x2076ed8, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3 0x00007f07817198ea in Digikam::ParkingThread::run (this=0x2076ec0) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/threads/threadmanager.cpp:119
#4 0x00007f077cb83d0f in QThreadPrivate::start (arg=0x2076ec0) at thread/qthread_unix.cpp:338
#5 0x00007f077f695073 in start_thread (arg=0x7f076d2ca700) at pthread_create.c:309
#6 0x00007f077c16ddcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7f06e7fff700 (LWP 24595)):
#0 0x00007f077c166b33 in select () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007f077cc60041 in QProcessManager::run (this=0x7f077cdeb3a0 <processManager()::processManager>) at io/qprocess_unix.cpp:247
#2 0x00007f077cb83d0f in QThreadPrivate::start (arg=0x7f077cdeb3a0 <processManager()::processManager>) at thread/qthread_unix.cpp:338
#3 0x00007f077f695073 in start_thread (arg=0x7f06e7fff700) at pthread_create.c:309
#4 0x00007f077c16ddcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7f06ecff9700 (LWP 24620)):
#0 0x00007f077c16464d in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007f077a79d274 in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7f06e0014a80, timeout=-1, context=0x7f06e00048c0) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:4007
#2 g_main_context_iterate (context=context@entry=0x7f06e00048c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3708
#3 0x00007f077a79d37c in g_main_context_iteration (context=0x7f06e00048c0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3774
#4 0x00007f077ccaf7b5 in QEventDispatcherGlib::processEvents (this=0x7f06e0024f70, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5 0x00007f077cc818df in QEventLoop::processEvents (this=this@entry=0x7f06ecff8d30, flags=...) at kernel/qeventloop.cpp:149
#6 0x00007f077cc81bd5 in QEventLoop::exec (this=this@entry=0x7f06ecff8d30, flags=...) at kernel/qeventloop.cpp:204
#7 0x00007f0781718f93 in Digikam::WorkerObjectRunnable::run (this=0x41973b0) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/threads/threadmanager.cpp:196
#8 0x00007f077cb7784e in QThreadPoolThread::run (this=0x33cace0) at concurrent/qthreadpool.cpp:107
#9 0x00007f077cb83d0f in QThreadPrivate::start (arg=0x33cace0) at thread/qthread_unix.cpp:338
#10 0x00007f077f695073 in start_thread (arg=0x7f06ecff9700) at pthread_create.c:309
#11 0x00007f077c16ddcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f06e6ffd700 (LWP 24625)):
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007f077cb82843 in _q_futex (val2=0, addr2=0x0, timeout=0x0, val=2, op=0, addr=0x20d3fd0) at thread/qmutex_unix.cpp:99
#2 QMutexPrivate::wait (this=this@entry=0x20d3fd0, timeout=timeout@entry=-1) at thread/qmutex_unix.cpp:113
#3 0x00007f077cb7ee3d in QMutex::lock (this=<optimized out>) at thread/qmutex.cpp:164
#4 0x00007f07810a40e9 in Digikam::DatabaseAccess::DatabaseAccess (this=<optimized out>) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/databaseaccess.cpp:101
#5 0x00007f07810b3141 in Digikam::DatabaseThumbnailInfoProvider::thumbnailInfo (this=<optimized out>, path=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/databasethumbnailinfoprovider.cpp:58
#6 0x00007f07817020b4 in Digikam::ThumbnailCreator::makeThumbnailInfo (this=this@entry=0x2312760, path="/home/pictures/Testbed/test-000367.jpg", rect=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/threadimageio/thumbnailcreator.cpp:347
#7 0x00007f0781706381 in Digikam::ThumbnailCreator::load (this=0x2312760, path="/home/pictures/Testbed/test-000367.jpg", rect=..., pregenerate=pregenerate@entry=true) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/threadimageio/thumbnailcreator.cpp:228
#8 0x00007f0781706d20 in Digikam::ThumbnailCreator::pregenerate (this=<optimized out>, path="/home/pictures/Testbed/test-000367.jpg") at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/threadimageio/thumbnailcreator.cpp:183
#9 0x00007f07817158e0 in Digikam::ThumbnailLoadingTask::execute (this=0x894e560) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/threadimageio/thumbnailtask.cpp:82
#10 0x00007f07816edbf6 in Digikam::LoadSaveThread::run (this=0x23142c0) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/threadimageio/loadsavethread.cpp:136
#11 0x00007f078171b72e in Digikam::DynamicThread::DynamicThreadPriv::run (this=0x23145d0) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/threads/dynamicthread.cpp:186
#12 0x00007f077cb7784e in QThreadPoolThread::run (this=0x3575a60) at concurrent/qthreadpool.cpp:107
#13 0x00007f077cb83d0f in QThreadPrivate::start (arg=0x3575a60) at thread/qthread_unix.cpp:338
#14 0x00007f077f695073 in start_thread (arg=0x7f06e6ffd700) at pthread_create.c:309
#15 0x00007f077c16ddcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f076f595840 (LWP 24517)):
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007f077cb82843 in _q_futex (val2=0, addr2=0x0, timeout=0x0, val=2, op=0, addr=0x20d3fd0) at thread/qmutex_unix.cpp:99
#2 QMutexPrivate::wait (this=this@entry=0x20d3fd0, timeout=timeout@entry=-1) at thread/qmutex_unix.cpp:113
#3 0x00007f077cb7ee3d in QMutex::lock (this=<optimized out>) at thread/qmutex.cpp:164
#4 0x00007f07810a40e9 in Digikam::DatabaseAccess::DatabaseAccess (this=<optimized out>) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/databaseaccess.cpp:101
#5 0x00007f07810bf7ea in Digikam::ImageInfo::getDatabaseFieldsRaw (this=this@entry=0x81c5fc8, requestedSet=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/imageinfo.cpp:1762
#6 0x00007f07810bfef7 in Digikam::ImageInfo::imageMetadataContainer (this=this@entry=0x81c5fc8) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/database/imageinfo.cpp:1293
#7 0x00000000004a4977 in Digikam::ImagePropertiesSideBarDB::setImagePropertiesInformation (this=0x26ddcd0, url=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/imageproperties/imagepropertiessidebardb.cpp:516
#8 0x00000000004a72d8 in Digikam::ImagePropertiesSideBarDB::slotChangedTab (this=this@entry=0x26ddcd0, tab=0x26fb1f0) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/imageproperties/imagepropertiessidebardb.cpp:322
#9 0x00000000004a46da in Digikam::ImagePropertiesSideBarDB::itemChanged (this=this@entry=0x26ddcd0, infos=..., rect=..., img=img@entry=0x0, history=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/imageproperties/imagepropertiessidebardb.cpp:195
#10 0x00000000004a478c in Digikam::ImagePropertiesSideBarDB::itemChanged (this=0x26ddcd0, infos=...) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/libs/imageproperties/imagepropertiessidebardb.cpp:171
#11 0x000000000065f14e in Digikam::DigikamView::slotDispatchImageSelected (this=0x2252ec0) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/digikam/views/digikamview.cpp:1279
#12 0x0000000000662240 in Digikam::DigikamView::qt_static_metacall (_o=<optimized out>, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0_build/digikam/digikamview.moc:336
#13 0x00007f077cc967d8 in QMetaObject::activate (sender=0x2c9c370, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3547
#14 0x00007f077cc9a971 in QObject::event (this=0x2c9c370, e=<optimized out>) at kernel/qobject.cpp:1156
#15 0x00007f077d362c4c in QApplicationPrivate::notify_helper (this=this@entry=0x1e9dac0, receiver=receiver@entry=0x2c9c370, e=e@entry=0x7fffd8664330) at kernel/qapplication.cpp:4562
#16 0x00007f077d369210 in QApplication::notify (this=0x7fffd8665ca0, receiver=0x2c9c370, e=0x7fffd8664330) at kernel/qapplication.cpp:4348
#17 0x00007f077dec2b8a in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#18 0x00007f077cc82c7d in QCoreApplication::notifyInternal (this=0x7fffd8665ca0, receiver=0x2c9c370, event=0x7fffd8664330) at kernel/qcoreapplication.cpp:949
#19 0x00007f077ccb2273 in sendEvent (event=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#20 QTimerInfoList::activateTimers (this=0x1e9a9d0) at kernel/qeventdispatcher_unix.cpp:621
#21 0x00007f077ccaf581 in timerSourceDispatch (source=source@entry=0x1e9a970) at kernel/qeventdispatcher_glib.cpp:186
#22 0x00007f077a79cf86 in g_main_dispatch (context=0x1e9e590) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3066
#23 g_main_context_dispatch (context=context@entry=0x1e9e590) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3642
#24 0x00007f077a79d2d8 in g_main_context_iterate (context=context@entry=0x1e9e590, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3713
#25 0x00007f077a79d37c in g_main_context_iteration (context=0x1e9e590, may_block=1) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3774
#26 0x00007f077ccaf7b5 in QEventDispatcherGlib::processEvents (this=0x1e0bdd0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#27 0x00007f077d3feb86 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#28 0x00007f077cc818df in QEventLoop::processEvents (this=this@entry=0x7fffd86645c0, flags=...) at kernel/qeventloop.cpp:149
#29 0x00007f077cc81bd5 in QEventLoop::exec (this=this@entry=0x7fffd86645c0, flags=...) at kernel/qeventloop.cpp:204
#30 0x00007f077d7e44fc in QDialog::exec (this=0x7adc1d0) at dialogs/qdialog.cpp:562
#31 0x0000000000602baa in Digikam::DigikamImageView::rename (this=<optimized out>) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/digikam/items/digikamimageview.cpp:647
#32 0x0000000000662432 in slotImageRename (this=<optimized out>) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/digikam/views/digikamview.cpp:1728
#33 Digikam::DigikamView::qt_static_metacall (_o=<optimized out>, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0_build/digikam/digikamview.moc:307
#34 0x00007f077cc967d8 in QMetaObject::activate (sender=sender@entry=0x37c0a70, m=m@entry=0x7f077dbe0ce0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffd86647d0) at kernel/qobject.cpp:3547
#35 0x00007f077d35caf2 in QAction::triggered (this=this@entry=0x37c0a70, _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#36 0x00007f077d35e4c3 in QAction::activate (this=0x37c0a70, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#37 0x00007f077d35e61c in QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1183
#38 0x00007f077dda6ece in KAction::event(QEvent*) () from /usr/lib64/libkdeui.so.5
#39 0x00007f077d362c4c in QApplicationPrivate::notify_helper (this=this@entry=0x1e9dac0, receiver=receiver@entry=0x37c0a70, e=e@entry=0x7fffd8664b60) at kernel/qapplication.cpp:4562
#40 0x00007f077d369210 in QApplication::notify (this=0x7fffd8665ca0, receiver=0x37c0a70, e=0x7fffd8664b60) at kernel/qapplication.cpp:4348
#41 0x00007f077dec2b8a in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#42 0x00007f077cc82c7d in QCoreApplication::notifyInternal (this=0x7fffd8665ca0, receiver=0x37c0a70, event=event@entry=0x7fffd8664b60) at kernel/qcoreapplication.cpp:949
#43 0x00007f077d393e76 in sendEvent (event=0x7fffd8664b60, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#44 QShortcutMap::dispatchEvent (this=this@entry=0x1e9dbe0, e=e@entry=0x7fffd8664ea0) at kernel/qshortcutmap.cpp:884
#45 0x00007f077d393fa4 in QShortcutMap::tryShortcutEvent (this=0x1e9dbe0, o=o@entry=0x2226650, e=e@entry=0x7fffd8664ea0) at kernel/qshortcutmap.cpp:364
#46 0x00007f077d36a4e3 in QApplication::notify (this=0x7fffd8665ca0, receiver=0x2226650, e=0x7fffd8664ea0) at kernel/qapplication.cpp:3986
#47 0x00007f077dec2b8a in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#48 0x00007f077cc82c7d in QCoreApplication::notifyInternal (this=0x7fffd8665ca0, receiver=receiver@entry=0x2226650, event=event@entry=0x7fffd8664ea0) at kernel/qcoreapplication.cpp:949
#49 0x00007f077d3615e6 in sendSpontaneousEvent (event=event@entry=0x7fffd8664ea0, receiver=receiver@entry=0x2226650) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#50 qt_sendSpontaneousEvent (receiver=receiver@entry=0x2226650, event=event@entry=0x7fffd8664ea0) at kernel/qapplication.cpp:5560
#51 0x00007f077d3fbfc9 in QKeyMapper::sendKeyEvent (keyWidget=keyWidget@entry=0x2226650, grab=grab@entry=false, type=QEvent::KeyPress, code=16777265, modifiers=..., text="", autorepeat=autorepeat@entry=false, count=1, nativeScanCode=68, nativeVirtualKey=65471, nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1866
#52 0x00007f077d3fc348 in QKeyMapperPrivate::translateKeyEvent (this=0x1ed9690, keyWidget=keyWidget@entry=0x2226650, event=event@entry=0x7fffd86653b0, grab=grab@entry=false) at kernel/qkeymapper_x11.cpp:1836
#53 0x00007f077d3d8a1f in QApplication::x11ProcessEvent (this=0x7fffd8665ca0, event=event@entry=0x7fffd86653b0) at kernel/qapplication_x11.cpp:3533
#54 0x00007f077d3feae2 in x11EventSourceDispatch (s=s@entry=0x1e9fa00, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#55 0x00007f077a79cf86 in g_main_dispatch (context=0x1e9e590) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3066
#56 g_main_context_dispatch (context=context@entry=0x1e9e590) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3642
#57 0x00007f077a79d2d8 in g_main_context_iterate (context=context@entry=0x1e9e590, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3713
#58 0x00007f077a79d37c in g_main_context_iteration (context=0x1e9e590, may_block=1) at /var/tmp/portage/dev-libs/glib-2.38.2/work/glib-2.38.2/glib/gmain.c:3774
#59 0x00007f077ccaf7b5 in QEventDispatcherGlib::processEvents (this=0x1e0bdd0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#60 0x00007f077d3feb86 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#61 0x00007f077cc818df in QEventLoop::processEvents (this=this@entry=0x7fffd8665780, flags=...) at kernel/qeventloop.cpp:149
#62 0x00007f077cc81bd5 in QEventLoop::exec (this=this@entry=0x7fffd8665780, flags=...) at kernel/qeventloop.cpp:204
#63 0x00007f077cc86ceb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221
#64 0x00007f077d36140c in QApplication::exec () at kernel/qapplication.cpp:3823
#65 0x0000000000492263 in main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/media-gfx/digikam-3.5.0/work/digikam-3.5.0/core/digikam/main/main.cpp:235
Comment 1 Marcel Wiesweg 2014-03-04 12:12:17 UTC
Thanks a lot for your backtrace. A case to verify the good old rules:
- a true deadlock happens if two mutexes are locked in varying order (or: you must define and adhere to a locking hierarchy, if two mutexes are locked at the same time)
- you may need half an hour, but the deadlock can always be spotted from the backtrace
Comment 2 Marcel Wiesweg 2014-03-04 12:46:50 UTC
Git commit 010d0293d322ce458d00ef1ff35ac90562ef7da6 by Marcel Wiesweg.
Committed on 04/03/2014 at 12:41.
Pushed by mwiesweg into branch 'master'.

Reorder mutex locks - the ImageInfo ReadWriteLock must remain an "inner", transparent mutex.
It is called from a place where DatabaseAccess is locked, so DatabaseAccess must not be
locked from a place where the ImageInfo lock is held.
To reduce by one or two mutex locks, consolidate read operations at one place and
return the hash from a local variable which is in sync with the cached hash.
(note: we do not rule out a parallel operation between the DatabaseAccess and the
writing of the cached values. it's so far acceptable for a read cache.)

CCMAIL: mike@mghansen.de

M  +22   -11   libs/database/imageinfo.cpp

http://commits.kde.org/digikam/010d0293d322ce458d00ef1ff35ac90562ef7da6