Bug 421043 - Faces Detection crashes digiKam
Summary: Faces Detection crashes digiKam
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Detection (show other bugs)
Version: 7.0.0
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 07:49 UTC by Cliff Albert
Modified: 2021-01-19 17:23 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cliff Albert 2020-05-05 07:49:22 UTC
SUMMARY

When running 'detect faces' from the people menu digikam crashes.


STEPS TO REPRODUCE
1. Run 'detect faces' from people
2. Wait a while
3. See digikam segfaulting.

OBSERVED RESULT

Segfault


EXPECTED RESULT

Detecting faces.


SOFTWARE/OS VERSIONS

Ubuntu 19.10 on amd64 - digikam-7.0.0-rc-20200502T112703-x86-64-debug.appimage
Also observed on earlier 7.0.0 releases (beta1,beta2,beta3)


ADDITIONAL INFORMATION

This is quite a big database of images. Running on a dual Xeon X5670 with 70GB ram.

Thread 28 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff775ef700 (LWP 500)]
0x00007ffff427b1c1 in operator<(QString const&, QString const&) () from /tmp/.mount_digika0LF6Rz/usr/lib/libQt5Core.so.5
(gdb) bt
#0  0x00007ffff427b1c1 in operator<(QString const&, QString const&) () from /tmp/.mount_digika0LF6Rz/usr/lib/libQt5Core.so.5
#1  0x00007ffff73920c1 in qMapLessThanKey<QString> (key2=..., key1=...) at ././/include/QtCore/qmap.h:68
#2  QMap<QString, QVariant>::insert (avalue=..., akey=..., this=0x449f7e0) at ././/include/QtCore/qmap.h:706
#3  Digikam::DImg::setAttribute (this=<optimized out>, key=..., value=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_props.cpp:219
#4  0x00007ffff738cad4 in Digikam::DImg::getUniqueHashV2 (this=0x43e3448) at /b/dktemp/digikam-master/core/libs/dimg/dimg_metadata.cpp:93
#5  0x00007ffff738e130 in Digikam::DImg::createHistoryImageId (this=<optimized out>, filePath=..., type=type@entry=Digikam::HistoryImageId::Current) at /b/dktemp/digikam-master/core/libs/dimg/dimg_metadata.cpp:329
#6  0x00007ffff7235de5 in Digikam::DImgLoader::readMetadata (this=0x7fff7015eb90, filePath=...) at /b/dktemp/digikam-master/core/libs/dimg/loaders/dimgloader.cpp:225
#7  0x00007fffc88c0029 in DigikamJPEGDImgPlugin::DImgJPEGLoader::load (this=0x7fff7015eb90, filePath=..., observer=0x43e3270) at /b/dktemp/digikam-master/core/dplugins/dimg/jpeg/dimgjpegloader_load.cpp:56
#8  0x00007ffff738969a in Digikam::DImg::load (this=this@entry=0x43e3448, filePath=..., loadFlagsInt=loadFlagsInt@entry=63, observer=observer@entry=0x43e3270, rawDecodingSettings=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_fileio.cpp:132
#9  0x00007ffff738a6f0 in Digikam::DImg::load (this=this@entry=0x43e3448, filePath=..., observer=observer@entry=0x43e3270, rawDecodingSettings=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_fileio.cpp:62
#10 0x00007ffff74538c1 in Digikam::PreviewLoadingTask::execute (this=0x43e3260) at /b/dktemp/digikam-master/core/libs/threadimageio/preview/previewtask.cpp:314
#11 0x00007ffff746931e in Digikam::LoadSaveThread::run (this=0x15d6380) at /b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavethread.cpp:134
#12 0x00007ffff748e5ce in Digikam::DynamicThread::Private::run (this=0x4e9e700) at /b/dktemp/digikam-master/core/libs/threads/dynamicthread.cpp:191
#13 0x00007ffff41dcd87 in ?? () from /tmp/.mount_digika0LF6Rz/usr/lib/libQt5Core.so.5
#14 0x00007ffff41d9335 in ?? () from /tmp/.mount_digika0LF6Rz/usr/lib/libQt5Core.so.5
#15 0x00007ffff3b69669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#16 0x00007ffff3a91323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

I've seen almost the same backtrace on bug id 399923
Comment 1 Maik Qualmann 2020-05-05 07:53:20 UTC
Yes, the appropriate Ubuntu version and let me guess, you probably have an Intel Core 5.

Maik
Comment 2 Cliff Albert 2020-05-05 08:07:42 UTC
No this is a Xeon X5670 (6 core 2.93Ghz), from the Gulfton/Westmere EP architecture. 
Equivalent to the Core i7 970-990 series.

I indeed read some bug reports concerning the Core i5 having something to do with the running kernel. Currently running:

Linux porkstation 5.3.0-46-generic #38-Ubuntu SMP Fri Mar 27 17:37:05 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I've planned to upgrade the machine to 20.04 today, i'll give digikam a new test afterwards
Comment 3 Cliff Albert 2020-05-05 09:05:21 UTC
Upgraded to Ubuntu 20.04 LTS (with kernel Linux porkstation 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux) 

The following error appears after which a segfault occurs:

Digikam::DImg::getUniqueHashV2: DImg::getUniqueHash called without originalFilePath property set!
--Type <RET> for more, q to quit, c to continue without paging--

Thread 27 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff765ed700 (LWP 4655)]
0x0000000003520f90 in ?? ()
(gdb) bt
#0  0x0000000003520f90 in ?? ()
#1  0x00007ffff747413d in Digikam::LoadingTask::progressInfo (this=0x3ed77b0, progress=0.64755553) at /b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavetask.cpp:63
#2  0x00007fffc8aba5dd in DigikamJPEGDImgPlugin::DImgJPEGLoader::load (this=0x7fff6c0d6d80, filePath=..., observer=0x3ed77c0) at /b/dktemp/digikam-master/core/dplugins/dimg/jpeg/dimgjpegloader_load.cpp:434
#3  0x00007ffff738869a in Digikam::DImg::load (this=this@entry=0x3ed7998, filePath=..., loadFlagsInt=loadFlagsInt@entry=63, observer=observer@entry=0x3ed77c0, rawDecodingSettings=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_fileio.cpp:132
#4  0x00007ffff73896f0 in Digikam::DImg::load (this=this@entry=0x3ed7998, filePath=..., observer=observer@entry=0x3ed77c0, rawDecodingSettings=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_fileio.cpp:62
#5  0x00007ffff74528c1 in Digikam::PreviewLoadingTask::execute (this=0x3ed77b0) at /b/dktemp/digikam-master/core/libs/threadimageio/preview/previewtask.cpp:314
#6  0x00007ffff746831e in Digikam::LoadSaveThread::run (this=0x21c9f70) at /b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavethread.cpp:134
#7  0x00007ffff748d5ce in Digikam::DynamicThread::Private::run (this=0x7fffcc00bcb0) at /b/dktemp/digikam-master/core/libs/threads/dynamicthread.cpp:191
#8  0x00007ffff41dbd87 in ?? () from /tmp/.mount_digikaAeveBn/usr/lib/libQt5Core.so.5
#9  0x00007ffff41d8335 in ?? () from /tmp/.mount_digikaAeveBn/usr/lib/libQt5Core.so.5
#10 0x00007ffff3b84609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#11 0x00007ffff3aab103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

This looks the same as https://bugs.kde.org/show_bug.cgi?id=415867#c22, after which Maik Qualmann indicated it was core i5 related. We might probably add Xeon X56xx also to the list.
Comment 4 Maik Qualmann 2020-05-05 09:48:18 UTC
As I said, these crashes are very strange. We only watch them on Ubuntu based distributions related to Intel Core 5 or 7.

This message would only appear if there was a code error, under normal circumstances it can never be issued. An original file path attribute is always set.

----
Digikam::DImg::getUniqueHashV2: DImg::getUniqueHash called without originalFilePath property set!
----

And here we are again in the wrong overloaded function, in principle impossible.

----
#1  0x00007ffff747413d in Digikam::LoadingTask::progressInfo (this=0x3ed77b0, progress=0.64755553) at /b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavetask.cpp:63
----

Maik
Comment 5 Chris Weyland 2020-05-17 11:59:29 UTC
Having the same(?) issue when scanning for faces on some folders. 

- digikam-7.0.0-rc-20200516T134714-x86-64.appimage
- Ubuntu 20.04 LTS
- Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz                                                                                                            

Backtrace:

Thread 48 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff2d7fa700 (LWP 742579)]
0x00007ffff744cc2b in ?? () from /tmp/.mount_digikaI33g9h/usr/lib/libdigikamcore.so.7.0.0
(gdb) bt
#0  0x00007ffff744cc2b in ?? () from /tmp/.mount_digikaI33g9h/usr/lib/libdigikamcore.so.7.0.0
#1  0x00007ffff7462a3e in Digikam::LoadSaveThread::run() () from /tmp/.mount_digikaI33g9h/usr/lib/libdigikamcore.so.7.0.0
#2  0x00007ffff7487c5e in ?? () from /tmp/.mount_digikaI33g9h/usr/lib/libdigikamcore.so.7.0.0
#3  0x00007ffff41d7d87 in ?? () from /tmp/.mount_digikaI33g9h/usr/lib/libQt5Core.so.5
#4  0x00007ffff41d4335 in ?? () from /tmp/.mount_digikaI33g9h/usr/lib/libQt5Core.so.5
#5  0x00007ffff3b81609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007ffff3aa8103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Comment 6 caulier.gilles 2020-05-17 12:05:06 UTC
digikam-7.0.0-rc-20200516T134714-x86-64.appimage 

==> use the "-debug" bundle version and reproduce the crash to have a suitable backtrace.

Gilles Caulier
Comment 7 Maik Qualmann 2020-06-14 09:34:57 UTC
Git commit 880b4c0faa511364135deed61e68e031b8ddfe2e by Maik Qualmann.
Committed on 14/06/2020 at 09:32.
Pushed by mqualmann into branch 'master'.

do not use static for this DImg function
Related: bug 422735, bug 418939

M  +3    -3    core/libs/dimg/dimg.h
M  +7    -8    core/libs/dimg/dimg_metadata.cpp

https://invent.kde.org/graphics/digikam/commit/880b4c0faa511364135deed61e68e031b8ddfe2e
Comment 8 Maik Qualmann 2020-07-12 07:04:21 UTC
Git commit b66eb0a0556388fc532fcc5bba7a40ed6eda2fc1 by Maik Qualmann.
Committed on 12/07/2020 at 06:58.
Pushed by mqualmann into branch 'master'.

disable OpenCL for everyone
An analysis with Heaptrack shows that we
have a big memory leak with active OpenCL.
Related: bug 423632, bug 416266, bug 420411

M  +10   -0    core/app/main/main.cpp
M  +0    -5    project/bundles/appimage/data/AppRun

https://invent.kde.org/graphics/digikam/commit/b66eb0a0556388fc532fcc5bba7a40ed6eda2fc1
Comment 9 Maik Qualmann 2020-07-12 20:02:18 UTC
*** Bug 424133 has been marked as a duplicate of this bug. ***
Comment 10 caulier.gilles 2020-07-14 09:31:07 UTC
Hi,

Can you check if this crash still exist with last weekly AppImage build
available here :

https://files.kde.org/digikam/

Thanks in advance
Comment 11 Cliff Albert 2020-07-16 07:02:48 UTC
After testing for 2 days I haven't encountered the problem.
I'll do some more this weekend. But so far it's all good.
Comment 12 caulier.gilles 2020-07-16 18:03:05 UTC
Thanks for the feedback.

I close this file now

Gilles Caulier
Comment 13 Cliff Albert 2020-10-15 07:28:52 UTC
Unfortunately the same error is popping up again with digikam-7.2.0-beta1-20201013T065929-x86-64-debug.appimage running on Ubuntu 20.04.1 (Linux porkstation 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux)


[New Thread 0x7ffefdffb700 (LWP 19929)]
[Thread 0x7fffb508a700 (LWP 19928) exited]
[Thread 0x7ffefdffb700 (LWP 19929) exited]
Digikam::DImg::getUniqueHashV2: DImg::getUniqueHash called without originalFilePath property set!
Thread 67 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff5f015700 (LWP 17252)]
0x00007ffff41e13e1 in QMapDataBase::rebalance(QMapNodeBase*) () from /tmp/.mount_digikay5n2NY/usr/lib/libQt5Core.so.5

(gdb) bt
#0  0x00007ffff41e13e1 in QMapDataBase::rebalance(QMapNodeBase*) () from /tmp/.mount_digikay5n2NY/usr/lib/libQt5Core.so.5
#1  0x00007ffff41e19c4 in QMapDataBase::createNode(int, int, QMapNodeBase*, bool) () from /tmp/.mount_digikay5n2NY/usr/lib/libQt5Core.so.5
#2  0x00007ffff73c6183 in QMapData<QString, QVariant>::createNode (left=<optimized out>, parent=0x7fff6191f4e0, v=..., k=..., this=<optimized out>) at ././/include/QtCore/qmap.h:223
#3  QMap<QString, QVariant>::insert (avalue=..., akey=..., this=0x7fff5401b540) at ././/include/QtCore/qmap.h:719
#4  Digikam::DImg::setAttribute (this=<optimized out>, key=..., value=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_props.cpp:235
#5  0x00007ffff725a519 in Digikam::DImgLoader::imageSetAttribute (this=<optimized out>, key=..., value=...) at /b/dktemp/digikam-master/core/libs/dimg/loaders/dimgloader.cpp:142
#6  0x00007ffff725ba42 in Digikam::DImgLoader::readMetadata (this=0x7fff619261c0, filePath=...) at /b/dktemp/digikam-master/core/libs/dimg/loaders/dimgloader.cpp:233
#7  0x00007fffc90c3ff9 in DigikamJPEGDImgPlugin::DImgJPEGLoader::load (this=0x7fff619261c0, filePath=..., observer=0xaa53840) at /b/dktemp/digikam-master/core/dplugins/dimg/jpeg/dimgjpegloader_load.cpp:56
#8  0x00007ffff73bd66a in Digikam::DImg::load (this=this@entry=0xaa53a10, filePath=..., loadFlagsInt=loadFlagsInt@entry=63, observer=observer@entry=0xaa53840, rawDecodingSettings=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_fileio.cpp:132
#9  0x00007ffff73be6c0 in Digikam::DImg::load (this=this@entry=0xaa53a10, filePath=..., observer=observer@entry=0xaa53840, rawDecodingSettings=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_fileio.cpp:62
#10 0x00007ffff74890ae in Digikam::PreviewLoadingTask::execute (this=0xaa53830) at /b/dktemp/digikam-master/core/libs/threadimageio/preview/previewtask.cpp:310
#11 0x00007ffff749f07e in Digikam::LoadSaveThread::run (this=0x2398ab0) at /b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavethread.cpp:154
#12 0x00007ffff74c370e in Digikam::DynamicThread::Private::run (this=0xa4acef0) at /b/dktemp/digikam-master/core/libs/threads/dynamicthread.cpp:191
#13 0x00007ffff41a4d87 in ?? () from /tmp/.mount_digikay5n2NY/usr/lib/libQt5Core.so.5
#14 0x00007ffff41a1335 in ?? () from /tmp/.mount_digikay5n2NY/usr/lib/libQt5Core.so.5
#15 0x00007ffff3b31609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#16 0x00007ffff3a58293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Comment 14 Maik Qualmann 2020-10-15 17:12:45 UTC
Git commit d37b969a2fcd09ce97707c48c5c23730d97e069c by Maik Qualmann.
Committed on 15/10/2020 at 17:12.
Pushed by mqualmann into branch 'master'.

this bug after the code revert could be the problem

M  +1    -1    core/libs/threadimageio/fileio/loadsavetask.cpp
M  +1    -1    core/libs/threadimageio/preview/previewtask.cpp
M  +1    -1    core/libs/threadimageio/thumb/thumbnailtask.cpp

https://invent.kde.org/graphics/digikam/commit/d37b969a2fcd09ce97707c48c5c23730d97e069c
Comment 15 Cliff Albert 2020-10-19 07:44:58 UTC
I don't know if the patch already made it to digikam-7.2.0-beta1-20201016T092735-x86-64-debug.appimage, but here is another slightly different backtrace:

Thread 29 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff74dea700 (LWP 519207)]
0x00007ffff423e9d4 in ?? () from /tmp/.mount_digikaj6ug8P/usr/lib/libQt5Core.so.5
(gdb) bt
#0  0x00007ffff423e9d4 in ?? () from /tmp/.mount_digikaj6ug8P/usr/lib/libQt5Core.so.5
#1  0x00007ffff42431d0 in operator<(QString const&, QString const&) () from /tmp/.mount_digikaj6ug8P/usr/lib/libQt5Core.so.5
#2  0x00007ffff73c8700 in qMapLessThanKey<QString> (key2=..., key1=...) at ././/include/QtCore/qmap.h:68
#3  QMapNode<QString, QVariant>::lowerBound (akey=..., this=<optimized out>) at ././/include/QtCore/qmap.h:152
#4  QMapData<QString, QVariant>::findNode (this=<optimized out>, akey=...) at ././/include/QtCore/qmap.h:284
#5  0x00007ffff73c4a13 in QMap<QString, QVariant>::contains (akey=..., this=<optimized out>) at ././/include/QtCore/qmap.h:693
#6  Digikam::DImg::hasAttribute (this=this@entry=0xa71c9c0, key=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_props.cpp:254
#7  0x00007ffff73c08a9 in Digikam::DImg::getUniqueHashV2 (this=0xa71c9c0) at /b/dktemp/digikam-master/core/libs/dimg/dimg_metadata.cpp:76
#8  0x00007ffff73c2135 in Digikam::DImg::createHistoryImageId (this=<optimized out>, filePath=..., type=type@entry=Digikam::HistoryImageId::Current) at /b/dktemp/digikam-master/core/libs/dimg/dimg_metadata.cpp:328
#9  0x00007ffff725b9dd in Digikam::DImgLoader::readMetadata (this=0x7fff5807d7e0, filePath=...) at /b/dktemp/digikam-master/core/libs/dimg/loaders/dimgloader.cpp:229
#10 0x00007fffc90c3ff9 in DigikamJPEGDImgPlugin::DImgJPEGLoader::load (this=0x7fff5807d7e0, filePath=..., observer=0xa71c7f0) at /b/dktemp/digikam-master/core/dplugins/dimg/jpeg/dimgjpegloader_load.cpp:56
#11 0x00007ffff73bd66a in Digikam::DImg::load (this=this@entry=0xa71c9c0, filePath=..., loadFlagsInt=loadFlagsInt@entry=63, observer=observer@entry=0xa71c7f0, rawDecodingSettings=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_fileio.cpp:132
#12 0x00007ffff73be6c0 in Digikam::DImg::load (this=this@entry=0xa71c9c0, filePath=..., observer=observer@entry=0xa71c7f0, rawDecodingSettings=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_fileio.cpp:62
#13 0x00007ffff74890ae in Digikam::PreviewLoadingTask::execute (this=0xa71c7e0) at /b/dktemp/digikam-master/core/libs/threadimageio/preview/previewtask.cpp:310
#14 0x00007ffff749f07e in Digikam::LoadSaveThread::run (this=0xa670050) at /b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavethread.cpp:154
#15 0x00007ffff74c36fe in Digikam::DynamicThread::Private::run (this=0xa6678c0) at /b/dktemp/digikam-master/core/libs/threads/dynamicthread.cpp:191
#16 0x00007ffff41a4d87 in ?? () from /tmp/.mount_digikaj6ug8P/usr/lib/libQt5Core.so.5
#17 0x00007ffff41a1335 in ?? () from /tmp/.mount_digikaj6ug8P/usr/lib/libQt5Core.so.5
#18 0x00007ffff3b31609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#19 0x00007ffff3a58293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Comment 16 Maik Qualmann 2020-10-19 11:12:48 UTC
The libjpeg is not 100% thread safe, at least the error handling can lead to a crash. Tonight I will test the DImg Jpeg loader with a mutex.

Maik
Comment 17 Maik Qualmann 2020-10-20 05:52:56 UTC
Git commit 4cf9c413ee1834b9c199f5e762a8fca5b3f46c5e by Maik Qualmann.
Committed on 20/10/2020 at 05:52.
Pushed by mqualmann into branch 'master'.

only for a test protect jpeg loader with a mutex

M  +4    -0    core/dplugins/dimg/jpeg/dimgjpegloader_load.cpp
M  +2    -0    core/dplugins/dimg/jpeg/dimgjpegplugin.cpp
M  +3    -0    core/dplugins/dimg/jpeg/dimgjpegplugin.h

https://invent.kde.org/graphics/digikam/commit/4cf9c413ee1834b9c199f5e762a8fca5b3f46c5e
Comment 18 Cliff Albert 2020-10-26 10:14:53 UTC
Here is another backtrace. This one has been made with 
  digikam-7.2.0-beta1-20201025T154101-x86-64-debug.appimage

The machine i'm using has been updated to Ubuntu 20.10:

Linux porkstation 5.8.0-25-generic #26-Ubuntu SMP Thu Oct 15 10:30:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I'm guessing something is also wrong with the debugging image of the 20201025 build as gdb gives a file does not exist message:


Thread 42 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff9f7fe640 (LWP 25961)]
0x00007ffff749dc17 in Digikam::LoadingTask::progressInfo (this=0xe2fcf70, progress=0.300000012) at /b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavetask.cpp:100
100	/b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavetask.cpp: No such file or directory.
(gdb) bt
#0  0x00007ffff749dc17 in Digikam::LoadingTask::progressInfo (this=0xe2fcf70, progress=0.300000012) at /b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavetask.cpp:100
#1  0x00007fffc8eac945 in DigikamJPEGDImgPlugin::DImgJPEGLoader::load (this=0x7fff882da0f0, filePath=..., observer=0xe2fcf80) at /b/dktemp/digikam-master/core/dplugins/dimg/jpeg/dimgjpegloader_load.cpp:443
#2  0x00007ffff73af3aa in Digikam::DImg::load (this=this@entry=0xe2fd150, filePath=..., loadFlagsInt=loadFlagsInt@entry=63, observer=observer@entry=0xe2fcf80, rawDecodingSettings=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_fileio.cpp:132
#3  0x00007ffff73b0400 in Digikam::DImg::load (this=this@entry=0xe2fd150, filePath=..., observer=observer@entry=0xe2fcf80, rawDecodingSettings=...) at /b/dktemp/digikam-master/core/libs/dimg/dimg_fileio.cpp:62
#4  0x00007ffff747d02e in Digikam::PreviewLoadingTask::execute (this=0xe2fcf70) at /b/dktemp/digikam-master/core/libs/threadimageio/preview/previewtask.cpp:310
#5  0x00007ffff7492ffe in Digikam::LoadSaveThread::run (this=0xe2796c0) at /b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavethread.cpp:154
#6  0x00007ffff74b796e in Digikam::DynamicThread::Private::run (this=0xde6e7b0) at /b/dktemp/digikam-master/core/libs/threads/dynamicthread.cpp:191
#7  0x00007ffff4180d87 in ?? () from /tmp/.mount_digikaUIYI90/usr/lib/libQt5Core.so.5
#8  0x00007ffff417d335 in ?? () from /tmp/.mount_digikaUIYI90/usr/lib/libQt5Core.so.5
#9  0x00007ffff3b0e590 in start_thread (arg=0x7fff9f7fe640) at pthread_create.c:463
#10 0x00007ffff3a34223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Comment 19 Maik Qualmann 2020-10-26 11:36:28 UTC
Git commit cdef325da3796effb0699ed9654d58c20eda7108 by Maik Qualmann.
Committed on 26/10/2020 at 11:35.
Pushed by mqualmann into branch 'master'.

add extra debug

M  +2    -0    core/libs/threadimageio/fileio/loadsavetask.cpp
M  +1    -0    core/libs/threadimageio/preview/previewtask.cpp

https://invent.kde.org/graphics/digikam/commit/cdef325da3796effb0699ed9654d58c20eda7108
Comment 20 Cliff Albert 2021-01-05 09:53:38 UTC
It has been a while, but i've hit the same issue again. 

Release: digikam-7.2.0-rc-20210103T180117-x86-64-debug.appimage

This time the issue does not appear during normal face detection / face recognition. But only appears when running it from the maintenance menu with "clear unconfirmed results and scan again" active. It is reproducible in this way on my system everytime I run it that way.

Digikam::PreviewLoadingTask::~PreviewLoadingTask: PreviewLoadingTask destructor was called 0x110beaf0 Digikam::FacePreviewLoader(0xcc6b230)
unknown: ASSERT: "!m_LoadingPreview" in file /b/dktemp/digikam-master/core/libs/threadimageio/preview/previewtask.cpp, line 61
--Type <RET> for more, q to quit, c to continue without paging--

Thread 52 "Thread (pooled)" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff9e7fc640 (LWP 154035)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
49	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007ffff3933864 in __GI_abort () at abort.c:79
#2  0x00007ffff414fa3c in QMessageLogger::fatal(char const*, ...) const () from /tmp/.mount_digikaY43SEi/usr/lib/libQt5Core.so.5
#3  0x00007ffff414f13b in qt_assert(char const*, char const*, int) () from /tmp/.mount_digikaY43SEi/usr/lib/libQt5Core.so.5
#4  0x00007ffff747512a in Digikam::PreviewLoadingTask::~PreviewLoadingTask (this=0x110beaf0, __in_chrg=<optimized out>) at /b/dktemp/digikam-master/core/libs/threadimageio/preview/previewtask.cpp:61
#5  0x00007ffff7475199 in Digikam::PreviewLoadingTask::~PreviewLoadingTask (this=0x110beaf0, __in_chrg=<optimized out>) at /b/dktemp/digikam-master/core/libs/threadimageio/preview/previewtask.cpp:62
#6  0x00007ffff748c156 in Digikam::LoadSaveThread::run (this=0xcc6b230) at /b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavethread.cpp:130
#7  0x00007ffff74b0b5e in Digikam::DynamicThread::Private::run (this=0x7fffcc00b6e0) at /b/dktemp/digikam-master/core/libs/threads/dynamicthread.cpp:191
#8  0x00007ffff4173d87 in ?? () from /tmp/.mount_digikaY43SEi/usr/lib/libQt5Core.so.5
#9  0x00007ffff4170335 in ?? () from /tmp/.mount_digikaY43SEi/usr/lib/libQt5Core.so.5
#10 0x00007ffff3b00590 in start_thread (arg=0x7fff9e7fc640) at pthread_create.c:463
#11 0x00007ffff3a26223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Comment 21 Maik Qualmann 2021-01-05 11:43:35 UTC
Git commit df6e4fcf0157246f6d1d646f6d768d2b27e48f89 by Maik Qualmann.
Committed on 05/01/2021 at 11:42.
Pushed by mqualmann into branch 'master'.

this could be a cause of the crash in the preview loader
Related: bug 429307, bug 427380, bug 427333

M  +4    -0    core/libs/threadimageio/fileio/loadsavetask.cpp
M  +5    -0    core/libs/threadimageio/preview/previewtask.cpp
M  +2    -0    core/libs/threadimageio/thumb/thumbnailtask.cpp

https://invent.kde.org/graphics/digikam/commit/df6e4fcf0157246f6d1d646f6d768d2b27e48f89
Comment 22 Cliff Albert 2021-01-13 10:25:48 UTC
Is this patch already in digiKam-7.2.0-rc-20210112T182159-x86-64-debug.appimage ?

Because it just crashed again (Maintenance -> Face Recognition with "clear unconfirmed results and scan again" on):


Digikam::DatabaseWriter::process: Removing old entries ()
Digikam::PreviewLoadingTask::~PreviewLoadingTask: PreviewLoadingTask destructor was called 0x2944aae0 Digikam::FacePreviewLoader(0x211b2ed0)
unknown: ASSERT: "!m_LoadingPreview" in file /b/dktemp/digikam-master/core/libs/threadimageio/preview/previewtask.cpp, line 61
Digikam::FacePipeline::Private::checkFinished: Check for finish:  28 packages, 0 infos to filter, hasFinished() false
Digikam::FacePipeline::Private::checkFinished: Check for finish:  27 packages, 0 infos to filter, hasFinished() false
Digikam::FacePipeline::Private::checkFinished: Check for finish:  26 packages, 0 infos to filter, hasFinished() false
Digikam::DMetadata::getIccProfile: Exif color-space tag is sRGB. Using default sRGB ICC profile.
unknown: End Of Image  ( 1 )
--Type <RET> for more, q to quit, c to continue without paging--

Thread 305 "Thread (pooled)" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffeff7fe640 (LWP 163300)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
49	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007ffff3914864 in __GI_abort () at abort.c:79
#2  0x00007ffff4130a3c in QMessageLogger::fatal(char const*, ...) const () from /tmp/.mount_digiKaClLuwJ/usr/lib/libQt5Core.so.5
#3  0x00007ffff413013b in qt_assert(char const*, char const*, int) () from /tmp/.mount_digiKaClLuwJ/usr/lib/libQt5Core.so.5
#4  0x00007ffff746bc2a in Digikam::PreviewLoadingTask::~PreviewLoadingTask (this=0x2944aae0, __in_chrg=<optimized out>) at /b/dktemp/digikam-master/core/libs/threadimageio/preview/previewtask.cpp:61
#5  0x00007ffff746bc99 in Digikam::PreviewLoadingTask::~PreviewLoadingTask (this=0x2944aae0, __in_chrg=<optimized out>) at /b/dktemp/digikam-master/core/libs/threadimageio/preview/previewtask.cpp:62
#6  0x00007ffff7482c66 in Digikam::LoadSaveThread::run (this=0x211b2ed0) at /b/dktemp/digikam-master/core/libs/threadimageio/fileio/loadsavethread.cpp:130
#7  0x00007ffff74a767e in Digikam::DynamicThread::Private::run (this=0x7fffcc00a960) at /b/dktemp/digikam-master/core/libs/threads/dynamicthread.cpp:191
#8  0x00007ffff4154d87 in ?? () from /tmp/.mount_digiKaClLuwJ/usr/lib/libQt5Core.so.5
#9  0x00007ffff4151335 in ?? () from /tmp/.mount_digiKaClLuwJ/usr/lib/libQt5Core.so.5
#10 0x00007ffff3ae1590 in start_thread (arg=0x7ffeff7fe640) at pthread_create.c:463
#11 0x00007ffff3a07223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)
Comment 23 Maik Qualmann 2021-01-14 06:35:48 UTC
Git commit d62937a9e0c3a496f8ccbdbe72835d08899d6718 by Maik Qualmann.
Committed on 14/01/2021 at 06:33.
Pushed by mqualmann into branch 'master'.

the DynamicThread should not be a QRunnable
Otherwise it is a bit strange that a QRunnable
started a QRunnable, only the QThreadPool should do this.
Related: bug 429307, bug 427380, bug 427333

M  +2    -3    core/libs/threads/dynamicthread.cpp
M  +7    -3    core/libs/threads/dynamicthread.h

https://invent.kde.org/graphics/digikam/commit/d62937a9e0c3a496f8ccbdbe72835d08899d6718
Comment 24 Maik Qualmann 2021-01-14 06:50:25 UTC
Git commit 46d4abd0cfcbdbdbab1f1189186e1737caec2839 by Maik Qualmann.
Committed on 14/01/2021 at 06:49.
Pushed by mqualmann into branch 'master'.

call wait() after stop() before call start() again
Otherwise a running task has not yet ended and and
is deleted when the QThreadPool is started again.
Related: bug 429307, bug 427380, bug 427333

M  +1    -0    core/utilities/facemanagement/threads/facepreviewloader.cpp

https://invent.kde.org/graphics/digikam/commit/46d4abd0cfcbdbdbab1f1189186e1737caec2839
Comment 25 Maik Qualmann 2021-01-14 18:09:16 UTC
A new version of the AppImage that contains the latest patches is available. Can you please test whether the problem still exists?

Maik
Comment 26 Cliff Albert 2021-01-15 15:31:01 UTC
(In reply to Maik Qualmann from comment #25)
> A new version of the AppImage that contains the latest patches is available.
> Can you please test whether the problem still exists?
> 
> Maik

Looks good, normally it crashes within 20 minutes. But now it has been running for almost 6 hours. (300K+ images) I'll keep you posted.
Comment 27 Cliff Albert 2021-01-19 07:34:01 UTC
(In reply to Cliff Albert from comment #26)
> (In reply to Maik Qualmann from comment #25)
> > A new version of the AppImage that contains the latest patches is available.
> > Can you please test whether the problem still exists?
> > 
> > Maik
> 
> Looks good, normally it crashes within 20 minutes. But now it has been
> running for almost 6 hours. (300K+ images) I'll keep you posted.

It completed the run with no incident. I'll keep testing it, but at the moment everything looks fine and I had no more crashes.
Comment 28 Maik Qualmann 2021-01-19 08:29:52 UTC
Thank you for testing and your feedback.
I was pretty sure now that the problem was fixed. ((:-))
We subjected the image loader to a review and code optimization, which was definitely good.
In the end, it was just a missing command that led to these weird crashes. This ends a long chapter of crashes the image loader.

Maik