[Digikam-devel] [digikam] [Bug 326525] Severe memory leak during maintainance scan for rebuild thumbnails
Gilles Caulier
caulier.gilles at gmail.com
Fri Nov 8 08:31:47 GMT 2013
https://bugs.kde.org/show_bug.cgi?id=326525
--- Comment #67 from Gilles Caulier <caulier.gilles at gmail.com> ---
Raphael,
running digiKam into valgrind with libpgf OpenMP support confirm memory leak :
==22590== 368 bytes in 1 blocks are possibly lost in loss record 22,738 of
25,730
==22590== at 0x4C26DFF: calloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==22590== by 0x4011008: _dl_allocate_tls (in /usr/lib64/ld-2.17.so)
==22590== by 0xFD028B8: pthread_create@@GLIBC_2.2.5 (in
/usr/lib64/libpthread-2.17.so)
==22590== by 0x10AACCBD: ??? (in /usr/lib64/libgomp.so.1.0.0)
==22590== by 0x80BDA49: CPGFImage::WriteHeader(CPGFStream*)
(PGFimage.cpp:930)
==22590== by 0x80BE510: CPGFImage::Write(CPGFStream*, unsigned int*, bool
(*)(double, bool, void*), void*) (PGFimage.cpp:1167)
==22590== by 0x80CA2EE: Digikam::PGFUtils::writePGFImageDataToStream(QImage
const&, CPGFStream&, int, unsigned int&, bool) (pgfutils.cpp:288)
==22590== by 0x80C974A: Digikam::PGFUtils::writePGFImageData(QImage const&,
QByteArray&, int, bool) (pgfutils.cpp:184)
==22590== by 0x80AA2F9:
Digikam::ThumbnailCreator::storeInDatabase(Digikam::ThumbnailInfo const&,
Digikam::ThumbnailImage const&) const (thumbnailcreator.cpp:695)
==22590== by 0x80A7C78: Digikam::ThumbnailCreator::load(QString const&,
QRect const&, bool) const (thumbnailcreator.cpp:267)
==22590== by 0x80A7825: Digikam::ThumbnailCreator::load(QString const&)
const (thumbnailcreator.cpp:199)
==22590== by 0x80B6705: Digikam::ThumbnailLoadingTask::execute()
(thumbnailtask.cpp:172)
==22590== 5,309,856 bytes in 36 blocks are possibly lost in loss record 25,727
of 25,730
==22590== at 0x4C285F1: operator new(unsigned long) (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==22590== by 0x80B9531: CEncoder::CEncoder(CPGFStream*, PGFPreHeader,
PGFHeader, PGFPostHeader const&, unsigned long long&, bool) (Encoder.cpp:101)
==22590== by 0x80BDBAC: CPGFImage::WriteHeader(CPGFStream*)
(PGFimage.cpp:982)
==22590== by 0x80BE510: CPGFImage::Write(CPGFStream*, unsigned int*, bool
(*)(double, bool, void*), void*) (PGFimage.cpp:1167)
==22590== by 0x80CA2EE: Digikam::PGFUtils::writePGFImageDataToStream(QImage
const&, CPGFStream&, int, unsigned int&, bool) (pgfutils.cpp:288)
==22590== by 0x80C974A: Digikam::PGFUtils::writePGFImageData(QImage const&,
QByteArray&, int, bool) (pgfutils.cpp:184)
==22590== by 0x80AA2F9:
Digikam::ThumbnailCreator::storeInDatabase(Digikam::ThumbnailInfo const&,
Digikam::ThumbnailImage const&) const (thumbnailcreator.cpp:695)
==22590== by 0x80A7C78: Digikam::ThumbnailCreator::load(QString const&,
QRect const&, bool) const (thumbnailcreator.cpp:267)
==22590== by 0x80A7825: Digikam::ThumbnailCreator::load(QString const&)
const (thumbnailcreator.cpp:199)
==22590== by 0x80B6705: Digikam::ThumbnailLoadingTask::execute()
(thumbnailtask.cpp:172)
==22590== by 0x80915D0: Digikam::LoadSaveThread::run()
(loadsavethread.cpp:136)
==22590== by 0x80CF639: Digikam::DynamicThread::DynamicThreadPriv::run()
(dynamicthread.cpp:186)
==22590== 59,735,880 bytes in 405 blocks are definitely lost in loss record
25,730 of 25,730
==22590== at 0x4C285F1: operator new(unsigned long) (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==22590== by 0x80B9531: CEncoder::CEncoder(CPGFStream*, PGFPreHeader,
PGFHeader, PGFPostHeader const&, unsigned long long&, bool) (Encoder.cpp:101)
==22590== by 0x80BDBAC: CPGFImage::WriteHeader(CPGFStream*)
(PGFimage.cpp:982)
==22590== by 0x80BE510: CPGFImage::Write(CPGFStream*, unsigned int*, bool
(*)(double, bool, void*), void*) (PGFimage.cpp:1167)
==22590== by 0x80CA2EE: Digikam::PGFUtils::writePGFImageDataToStream(QImage
const&, CPGFStream&, int, unsigned int&, bool) (pgfutils.cpp:288)
==22590== by 0x80C974A: Digikam::PGFUtils::writePGFImageData(QImage const&,
QByteArray&, int, bool) (pgfutils.cpp:184)
==22590== by 0x80AA2F9:
Digikam::ThumbnailCreator::storeInDatabase(Digikam::ThumbnailInfo const&,
Digikam::ThumbnailImage const&) const (thumbnailcreator.cpp:695)
==22590== by 0x80A7C78: Digikam::ThumbnailCreator::load(QString const&,
QRect const&, bool) const (thumbnailcreator.cpp:267)
==22590== by 0x80A7825: Digikam::ThumbnailCreator::load(QString const&)
const (thumbnailcreator.cpp:199)
==22590== by 0x80B6705: Digikam::ThumbnailLoadingTask::execute()
(thumbnailtask.cpp:172)
==22590== by 0x80915D0: Digikam::LoadSaveThread::run()
(loadsavethread.cpp:136)
==22590== by 0x80CF639: Digikam::DynamicThread::DynamicThreadPriv::run()
(dynamicthread.cpp:186)
Ask you can see, memory leaks are not negligible if OPenMP support is enabled.
I always run digiKam in same condition : I stop thumbnails generator at 1%
(else it too long under valgrind).
Nota : digiKam do not crash imediatly when openMp support is enabled, as i have
seen in the pass.
To resume :
- libpgf without OpenMP support : no memory leak.
- libpgf with OpenMP support : no crash but important memory leak.
Gilles Caulier
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Digikam-devel
mailing list