[Digikam-users] Digikam memory usage

Gilles Caulier caulier.gilles at gmail.com
Sat Dec 3 14:34:13 GMT 2011


Instead GDB, it's better to run digiKam through valgrind to see memory
leak, like it's explained here :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/HACKING#L281

Gilles Caulier

2011/12/3 Alberto Ferrante <alberto.ferrante at tiscali.it>:
> I tried to run digikam by setting a limit for data and for virtual
> memory to 5GB and digikam crashed. Here follow the trace:
>
> Application: digiKam (digikam), signal: Aborted
> Using host libthread_db library "/lib64/libthread_db.so.1".
> 82      T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
> [Current thread is 1 (Thread 0x7f7516b8da40 (LWP 23237))]
>
> Thread 5 (Thread 0x7f750c8cc700 (LWP 23238)):
> #0  pthread_cond_wait@@GLIBC_2.3.2 () at
> ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:165
> #1  0x00000031f407c02b in wait (time=18446744073709551615,
> this=0x1999440) at thread/qwaitcondition_unix.cpp:86
> #2  QWaitCondition::wait (this=<optimized out>, mutex=0x1999338,
> time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
> #3  0x00000000005c5d30 in Digikam::ScanController::run (this=0x19990d0)
> at /usr/src/debug/digikam-2.3.0/core/digikam/database/scancontroller.cpp:647
> #4  0x00000031f407bb1b in QThreadPrivate::start (arg=0x19990d0) at
> thread/qthread_unix.cpp:298
> #5  0x00000031ea007d90 in start_thread (arg=0x7f750c8cc700) at
> pthread_create.c:309
> #6  0x00000031e98eed0d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
>
> Thread 4 (Thread 0x7f7507fff700 (LWP 23239)):
> #0  0x00000031ea009dd5 in __pthread_mutex_lock (mutex=0x7f75000009a8) at
> pthread_mutex_lock.c:65
> #1  0x00000031eb845064 in ?? () from /lib64/libglib-2.0.so.0
> #2  0x00000031eb84544c in g_main_context_iteration () from
> /lib64/libglib-2.0.so.0
> #3  0x00000031f41a6896 in QEventDispatcherGlib::processEvents
> (this=0x7f75000008c0, flags=<optimized out>) at
> kernel/qeventdispatcher_glib.cpp:426
> #4  0x00000031f4176c82 in QEventLoop::processEvents (this=<optimized
> out>, flags=...) at kernel/qeventloop.cpp:149
> #5  0x00000031f4176ed7 in QEventLoop::exec (this=0x7f7507ffeb10,
> flags=...) at kernel/qeventloop.cpp:204
> #6  0x00000031f4078ad7 in QThread::exec (this=<optimized out>) at
> thread/qthread.cpp:501
> #7  0x00000031f4156a5f in QInotifyFileSystemWatcherEngine::run
> (this=0x198c1d0) at io/qfilesystemwatcher_inotify.cpp:248
> #8  0x00000031f407bb1b in QThreadPrivate::start (arg=0x198c1d0) at
> thread/qthread_unix.cpp:298
> #9  0x00000031ea007d90 in start_thread (arg=0x7f7507fff700) at
> pthread_create.c:309
> #10 0x00000031e98eed0d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
>
> Thread 3 (Thread 0x7f75077fe700 (LWP 23248)):
> #0  pthread_cond_wait@@GLIBC_2.3.2 () at
> ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:165
> #1  0x00000031f407c02b in wait (time=18446744073709551615,
> this=0x1be9210) at thread/qwaitcondition_unix.cpp:86
> #2  QWaitCondition::wait (this=<optimized out>, mutex=0x1be8f78,
> time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
> #3  0x00000039d47416a9 in Digikam::ParkingThread::run (this=0x1be8f60)
> at /usr/src/debug/digikam-2.3.0/core/libs/threads/threadmanager.cpp:119
> #4  0x00000031f407bb1b in QThreadPrivate::start (arg=0x1be8f60) at
> thread/qthread_unix.cpp:298
> #5  0x00000031ea007d90 in start_thread (arg=0x7f75077fe700) at
> pthread_create.c:309
> #6  0x00000031e98eed0d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
>
> Thread 2 (Thread 0x7f7506914700 (LWP 23289)):
> #0  qt_qimageScaleAARGBA (isi=<optimized out>, dest=<optimized out>,
> dxx=0, dyy=<optimized out>, dx=<optimized out>, dy=<optimized out>,
> dw=256, dh=170, dow=256, sow=320) at painting/qimagescale.cpp:595
> #1  0x00000031f73bb8d9 in qSmoothScaleImage (src=<optimized out>,
> dw=256, dh=170) at painting/qimagescale.cpp:1025
> #2  0x00000031f7286454 in smoothScaled (source=<optimized out>, w=256,
> h=170) at image/qimage.cpp:6393
> #3  0x00000031f72890a5 in QImage::transformed (this=0x7f7506913340,
> matrix=<optimized out>, mode=Qt::SmoothTransformation) at
> image/qimage.cpp:6585
> #4  0x00000031f72894d4 in QImage::scaled (this=0x7f7506913340,
> s=<optimized out>, aspectMode=Qt::KeepAspectRatio,
> mode=Qt::SmoothTransformation) at image/qimage.cpp:4463
> #5  0x00000039d4724153 in scaled (mode=Qt::SmoothTransformation,
> aspectMode=Qt::KeepAspectRatio, h=256, w=<optimized out>,
> this=0x7f7506913340) at /usr/include/QtGui/qimage.h:234
> #6  Digikam::ThumbnailCreator::scaleForStorage (this=0x267c0b0,
> qimage=..., isFace=<optimized out>) at
> /usr/src/debug/digikam-2.3.0/core/libs/threadimageio/thumbnailcreator.cpp:321
> #7  0x00000039d47292b1 in Digikam::ThumbnailCreator::createThumbnail
> (this=0x267c0b0, info=<optimized out>, detailRect=<optimized out>,
> isFace=false) at
> /usr/src/debug/digikam-2.3.0/core/libs/threadimageio/thumbnailcreator.cpp:541
> #8  0x00000039d4729cf0 in Digikam::ThumbnailCreator::load
> (this=0x267c0b0, path=..., rect=..., pregenerate=false) at
> /usr/src/debug/digikam-2.3.0/core/libs/threadimageio/thumbnailcreator.cpp:257
> #9  0x00000039d472abc2 in Digikam::ThumbnailCreator::load
> (this=<optimized out>, path=<optimized out>) at
> /usr/src/debug/digikam-2.3.0/core/libs/threadimageio/thumbnailcreator.cpp:196
> #10 0x00000039d4739d87 in Digikam::ThumbnailLoadingTask::execute
> (this=0xc413a0c0) at
> /usr/src/debug/digikam-2.3.0/core/libs/threadimageio/thumbnailtask.cpp:169
> #11 0x00000039d4709efe in Digikam::LoadSaveThread::run (this=0x267c040)
> at
> /usr/src/debug/digikam-2.3.0/core/libs/threadimageio/loadsavethread.cpp:118
> #12 0x00000039d474357e in Digikam::DynamicThread::DynamicThreadPriv::run
> (this=0x267be60) at
> /usr/src/debug/digikam-2.3.0/core/libs/threads/dynamicthread.cpp:328
> #13 0x00000031f406f492 in QThreadPoolThread::run (this=0x6e89930) at
> concurrent/qthreadpool.cpp:107
> #14 0x00000031f407bb1b in QThreadPrivate::start (arg=0x6e89930) at
> thread/qthread_unix.cpp:298
> #15 0x00000031ea007d90 in start_thread (arg=0x7f7506914700) at
> pthread_create.c:309
> #16 0x00000031e98eed0d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
>
> Thread 1 (Thread 0x7f7516b8da40 (LWP 23237)):
> [KCrash Handler]
> #6  0x00000031e9836285 in __GI_raise (sig=6) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #7  0x00000031e9837b9b in __GI_abort () at abort.c:91
> #8  0x00000031eccbbf8d in __gnu_cxx::__verbose_terminate_handler () at
> ../../../../libstdc++-v3/libsupc++/vterminate.cc:95
> #9  0x00000031eccba146 in __cxxabiv1::__terminate (handler=<optimized
> out>) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:40
> #10 0x00000031eccba173 in std::terminate () at
> ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:50
> #11 0x00000031eccba2b6 in __cxxabiv1::__cxa_rethrow () at
> ../../../../libstdc++-v3/libsupc++/eh_throw.cc:116
> #12 0x00000031f417716c in QEventLoop::exec (this=<optimized out>,
> flags=<optimized out>) at kernel/qeventloop.cpp:218
> #13 0x00000031f417b8d5 in QCoreApplication::exec () at
> kernel/qcoreapplication.cpp:1148
> #14 0x000000000048b93d in main (argc=1, argv=<optimized out>) at
> /usr/src/debug/digikam-2.3.0/core/digikam/main/main.cpp:232
>
>
> On 12/03/2011 12:32 PM, Alberto Ferrante wrote:
>> Dear Gilles,
>> at the end I tried running Digikam through gdb (report below).
>> Unfortunately it does not show much useful information: the program is
>> not really crashing, as I said it is terminated after having filled all
>> the available memory.
>> I discovered one thing: besides my desktop PC, I have a laptop, also
>> with Fedora 16 64 bit installed. On that machine Digikam behavior seems
>> to be different. The memory usage seems reasonable there. It is pretty
>> strange as both machines have pretty standard installations of Fedora,
>> both of them with the proprietary Nvidia drivers. Is there any library
>> in particular that I should check?
>> I am wondering if it could be anything related to the number of cores in
>> the CPU... How many threads digikam starts while doing an import?
>
>
> --
> Home page: http://www.alari.ch/people/alberto
> Photo galleries : http://albertoferrante.name
> Public key: http://www.alari.ch/people/alberto/keys/yahoo.asc
> _______________________________________________
> Digikam-users mailing list
> Digikam-users at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-users



More information about the Digikam-users mailing list