Bug 285194

Summary: digikam crashing while scanning >20000 pictures
Product: [Applications] digikam Reporter: andreas.tarp
Component: Database-ScanAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: andreas.tarp
Priority: NOR    
Version: 2.1.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 2.4.0
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi

Description andreas.tarp 2011-10-28 16:34:38 UTC
Application: digikam (2.1.1)
KDE Platform Version: 4.7.2 (4.7.2)
Qt Version: 4.7.4
Operating System: Linux 3.0.0-12-generic-pae i686
Distribution: Ubuntu 11.10

-- Information about the crash:
- What I was doing when the application crashed:

After storing more than 20k pictures in empty digikam picture folder I have started digikam and initiated a scan for new pictures. At the beginning everything went fine, one folder after another appeared. But after some time digikam crashed. I have not done anything else in digikam in the meantime, I was just waiting for digikam finishing the scan.

Hope this information is sufficient to find the bug causing digikam to crash.

BR, Andreas

-- Backtrace:
Application: digiKam (digikam), signal: Segmentation fault
[Current thread is 1 (Thread 0xaed648c0 (LWP 7940))]

Thread 7 (Thread 0xadb02b70 (LWP 7941)):
#0  0xb7841424 in __kernel_vsyscall ()
#1  0xb4a1d063 in ?? () from /lib/i386-linux-gnu/libc.so.6
#2  0xb49b1135 in ?? () from /lib/i386-linux-gnu/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 6 (Thread 0xad301b70 (LWP 7942)):
#0  0xb7841424 in __kernel_vsyscall ()
#1  0xb4a1d063 in ?? () from /lib/i386-linux-gnu/libc.so.6
#2  0xb49b1135 in ?? () from /lib/i386-linux-gnu/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 5 (Thread 0xacb00b70 (LWP 7946)):
#0  0xb7841424 in __kernel_vsyscall ()
#1  0xb3745a5c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i386-linux-gnu/libpthread.so.0
#2  0xb4a1ccfc in pthread_cond_wait () from /lib/i386-linux-gnu/libc.so.6
#3  0xb4cd2cc0 in wait (time=4294967295, this=0x90ab9d0) at thread/qwaitcondition_unix.cpp:88
#4  QWaitCondition::wait (this=0x90adf30, mutex=0x90adf2c, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#5  0xb6b96f54 in Digikam::ParkingThread::run (this=0x90adf20) at /build/buildd/digikam-2.1.1/core/libs/threads/threadmanager.cpp:119
#6  0xb4cd27b3 in QThreadPrivate::start (arg=0x90adf20) at thread/qthread_unix.cpp:331
#7  0xb3741d31 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#8  0xb4a0f0ce in clone () from /lib/i386-linux-gnu/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 4 (Thread 0xac0cab70 (LWP 7947)):
#0  0xb7841424 in __kernel_vsyscall ()
#1  0xb4a1d063 in ?? () from /lib/i386-linux-gnu/libc.so.6
#2  0xb49b1135 in ?? () from /lib/i386-linux-gnu/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0x9f1fab70 (LWP 8041)):
#0  0xb38b1def in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#1  0xb38b1eee in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#2  0xb38b0bd3 in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#3  0xb6b8ba5d in CPGFImage::Read (this=0x9f1f9760, level=0, cb=0, data=0x0) at /build/buildd/digikam-2.1.1/core/libs/3rdparty/libpgf/PGFimage.cpp:411
#4  0xb6b93d60 in Digikam::readPGFImageData (data=..., img=...) at /build/buildd/digikam-2.1.1/core/libs/threadimageio/pgfutils.cpp:80
#5  0xb6b6bc64 in Digikam::ThumbnailCreator::loadFromDatabase (this=0xfffffe00, info=...) at /build/buildd/digikam-2.1.1/core/libs/threadimageio/thumbnailcreator.cpp:884
#6  0xb6b70b64 in Digikam::ThumbnailCreator::load (this=0x9b46478, path=..., rect=..., pregenerate=false) at /build/buildd/digikam-2.1.1/core/libs/threadimageio/thumbnailcreator.cpp:245
#7  0xb6b71712 in Digikam::ThumbnailCreator::load (this=0x9b46478, path=...) at /build/buildd/digikam-2.1.1/core/libs/threadimageio/thumbnailcreator.cpp:196
#8  0xb6b81bf9 in Digikam::ThumbnailLoadingTask::execute (this=0xc050170) at /build/buildd/digikam-2.1.1/core/libs/threadimageio/thumbnailtask.cpp:169
#9  0xb6b4d4e8 in Digikam::LoadSaveThread::run (this=0x9b22d10) at /build/buildd/digikam-2.1.1/core/libs/threadimageio/loadsavethread.cpp:118
#10 0xb6b988ee in Digikam::DynamicThread::DynamicThreadPriv::run (this=0x9b45f58) at /build/buildd/digikam-2.1.1/core/libs/threads/dynamicthread.cpp:328
#11 0xb4cc6651 in QThreadPoolThread::run (this=0x9132798) at concurrent/qthreadpool.cpp:106
#12 0xb4cd27b3 in QThreadPrivate::start (arg=0x9132798) at thread/qthread_unix.cpp:331
#13 0xb3741d31 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#14 0xb4a0f0ce in clone () from /lib/i386-linux-gnu/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 2 (Thread 0xa3a81b70 (LWP 8045)):
[KCrash Handler]
#7  0xb49acf71 in ?? () from /lib/i386-linux-gnu/libc.so.6
#8  0xb49af498 in malloc () from /lib/i386-linux-gnu/libc.so.6
#9  0xb4bb19d7 in operator new(unsigned int) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#10 0xb4bb1afb in operator new[](unsigned int) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#11 0xb6b91fc6 in CSubband::AllocMemory (this=0x9617b37c) at /build/buildd/digikam-2.1.1/core/libs/3rdparty/libpgf/Subband.cpp:91
#12 0xb6b931c5 in CWaveletTransform::InverseTransform (this=0x96b67fe0, srcLevel=2, w=0x9f1f97b8, h=0x9f1f97d8, data=0x9f1f978c) at /build/buildd/digikam-2.1.1/core/libs/3rdparty/libpgf/WaveletTransform.cpp:242
#13 0xb6b8a639 in CPGFImage::Read () at /build/buildd/digikam-2.1.1/core/libs/3rdparty/libpgf/PGFimage.cpp:414
#14 0xb38b04bd in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#15 0xb3741d31 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#16 0xb4a0f0ce in clone () from /lib/i386-linux-gnu/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 1 (Thread 0xaed648c0 (LWP 7940)):
#0  0xb7841424 in __kernel_vsyscall ()
#1  0xb4a1d063 in ?? () from /lib/i386-linux-gnu/libc.so.6
#2  0xb49b1135 in ?? () from /lib/i386-linux-gnu/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Reported using DrKonqi
Comment 1 caulier.gilles 2011-10-28 16:48:48 UTC
Crash appear in Libpgf using OpenMP implementation for GCC.

I have reproduced this crash some month ago, and it's due to OpenMP support in libpgf. I voluntary disabled OpenMP support with libpgf included in digiKam as 3rd party until this support become better.

Q: How do you compile digiKam using OpenMP support especially with libpgf ? I want mean, how it's possible, because all releavant code is disabled ?

Gilles Caulier
Comment 2 andreas.tarp 2011-10-28 16:57:44 UTC
Created attachment 64990 [details]
New crash information added by DrKonqi

digikam (2.1.1) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

- What I was doing when the application crashed:

after first crash I restarted digikam and continued to scan the new pictures. After a while (new folders where shown in digikam one after another) digikam crashed again.

-- Backtrace (Reduced):
#14 0xb4c16e0b in qMalloc (size=112) at global/qmalloc.cpp:55
#15 0xb4c74514 in QVectorData::allocate (size=112, alignment=4) at tools/qvector.cpp:67
#16 0xb774e123 in malloc (aalloc=6, this=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qvector.h:393
#17 QVector<QSqlField>::realloc (this=0xc655258, asize=3, aalloc=6) at ../../include/QtCore/../../src/corelib/tools/qvector.h:466
#18 0xb774e39c in QVector<QSqlField>::append (this=0xc655258, t=...) at ../../include/QtCore/../../src/corelib/tools/qvector.h:549
Comment 3 andreas.tarp 2011-10-29 17:28:56 UTC
Hi, I did not compile on my own. I am using digikam from kubuntu 11.10th repository. So maybe package maintainers are using old code?

Cheers, Andreas



Gilles Caulier <caulier.gilles@gmail.com> schrieb:

>https://bugs.kde.org/show_bug.cgi?id=285194
>
>
>
>
>
>--- Comment #1 from Gilles Caulier <caulier gilles gmail com>  2011-10-28 16:48:48 ---
>Crash appear in Libpgf using OpenMP implementation for GCC.
>
>I have reproduced this crash some month ago, and it's due to OpenMP support in
>libpgf. I voluntary disabled OpenMP support with libpgf included in digiKam as
>3rd party until this support become better.
>
>Q: How do you compile digiKam using OpenMP support especially with libpgf ? I
>want mean, how it's possible, because all releavant code is disabled ?
>
>Gilles Caulier
>
>--
>Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
>------- You are receiving this mail because: -------
>You reported the bug.
Comment 4 caulier.gilles 2011-11-03 12:42:44 UTC
digiKam 2.2.0 is out since few weeks. Crash still valid with this version ?

Gilles Caulier
Comment 5 andreas.tarp 2011-11-04 12:33:23 UTC
Hi,

digikam 2.2.0 is unfortunately not yet available in official kubuntu repositories. But I will try to set it up during next few days on a virtual machine to retest on 2.2.0 and tell you afterwards the result.

Thanks already for this great application.

Andreas
Comment 6 andreas.tarp 2011-11-05 20:05:19 UTC
Created attachment 65271 [details]
New crash information added by DrKonqi

digikam (2.2.0) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

- What I was doing when the application crashed:

Hi,

I was able to reproduce the crash also with digikam 2.2.0. I have installed 2.2.0 on a virtual machine and put around 14k pictures in the picture folder. First time scanning digikam did not crash, but after removing and storing the pictures a few more times in the picture folder resulted finally in digikam crashing again...

So, hope the new information are usefull and point into the same direction as on digikam 2.1.1.

BR, Andreas

-- Backtrace (Reduced):
#15 0x0047bbdd in Digikam::ImageInfoCache::dropInfo (this=0x9920818, infodata=0xa995c698) at /build/buildd/digikam-2.2.0/core/libs/database/imageinfocache.cpp:92
#16 0x004760e8 in Digikam::ImageInfo::~ImageInfo (this=0xaa4fecbc, __in_chrg=<optimized out>) at /build/buildd/digikam-2.2.0/core/libs/database/imageinfo.cpp:224
#17 0x004657d9 in Digikam::DatabaseThumbnailInfoProvider::thumbnailInfo (this=0x9922780, path=...) at /build/buildd/digikam-2.2.0/core/libs/database/databasethumbnailinfoprovider.cpp:45
#18 0x06e08b07 in Digikam::ThumbnailCreator::makeThumbnailInfo (this=0xa4de728, path=..., rect=...) at /build/buildd/digikam-2.2.0/core/libs/threadimageio/thumbnailcreator.cpp:345
#19 0x06e0c83c in Digikam::ThumbnailCreator::load (this=0xa4de728, path=..., rect=..., pregenerate=false) at /build/buildd/digikam-2.2.0/core/libs/threadimageio/thumbnailcreator.cpp:225
Comment 7 Marcel Wiesweg 2011-11-07 14:38:19 UTC
The last backtrace looks like a duplicate of 262077, fixed for digikam 2.3.0
Comment 8 andreas.tarp 2011-11-10 18:19:02 UTC
Hi,

seems like you are right. I upgraded my testmachine to 2.3.0 and was not able to reproduce the issue anymore. So sounds like my initial problem was solved already with 2.2.0, and the crash I experienced on 2.2.0 was solved in 2.3.0.

So thanks a lot for the support and this great application,

Andreas