Re: Sending valgrind logs to...
Cyril Giraud <[email protected]> Mon, 13 Jul 2026 20:15:41 +0200
| Newsgroups | gmane.comp.kde.digikam.user |
|---|---|
| Message-ID | <[email protected]> |
Command launched: $ valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --error-limit=no digikam 2>&1 | tee ./digiKam-9.0.0.valgrind2.log Then, digikams opens my database, I preview a photo and zoom inside, then exit. This is the default Ubuntu Studio 26.04 LTS configuration. I don't have any problem with digikam (unless I am a newbee user ;-)), just trying to help. Regards, Le 13/07/2026 à 15:23, Gilles Caulier a écrit : > Look at the end of the log : the main memory leak is due to OPenCV DNN > model internal management : > > ==1415992== 2,964,624 bytes in 2 blocks are possibly lost in loss > record 4,664 of 4,669 > ==1415992== at 0x485880F: malloc (vg_replace_malloc.c:447) > ==1415992== by 0x9F88CC0: cv::fastMalloc(unsigned long) (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA08D13F: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA088315: cv::Mat::create(int, int const*, int) (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA0D9E29: cv::_OutputArray::create(int, int const*, > int, int, bool, cv::_OutputArray::DepthMask) const (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0x9FEC872: cv::Mat::copyTo(cv::_OutputArray const&) > const (in /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0x96E8EDE: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x96F5A17: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x972A5F7: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x9722DE4: > cv::dnn::dnn4_v20240521::readNetFromONNX(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x9520AD1: > cv::dnn::dnn4_v20240521::readNet(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, > std::__cxx11::basic_string<char, std::char_traits<char>, > std::allocator<char> > const&, std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x62935D0: Digikam::DNNModelNet::callLoader(QString > const&) (in /usr/lib/digikam/libdigikamcore.so.9.0.0) > ==1415992== > ==1415992== 4,172,486 (40 direct, 4,172,446 indirect) bytes in 1 > blocks are definitely lost in loss record 4,666 of 4,669 > ==1415992== at 0x4858F95: operator new(unsigned long) > (vg_replace_malloc.c:488) > ==1415992== by 0x969125C: > cv::dnn::dnn4_v20240521::Net::Impl::connect(int, int, int, int) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x96913D8: > cv::dnn::dnn4_v20240521::Net::connect(int, int, int, int) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x96ED023: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x96FCEFD: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x96F3C25: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x96F7297: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x972A5F7: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x9722DE4: > cv::dnn::dnn4_v20240521::readNetFromONNX(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x9520AD1: > cv::dnn::dnn4_v20240521::readNet(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, > std::__cxx11::basic_string<char, std::char_traits<char>, > std::allocator<char> > const&, std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x10E0A1EE: > cv::FaceRecognizerSF::create(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, > std::__cxx11::basic_string<char, std::char_traits<char>, > std::allocator<char> > const&, int, int) (in > /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so.4.10.0) > ==1415992== by 0x62946FC: Digikam::DNNModelSFace::callLoader() (in > /usr/lib/digikam/libdigikamcore.so.9.0.0) > ==1415992== > ==1415992== 9,175,472 bytes in 6 blocks are possibly lost in loss > record 4,667 of 4,669 > ==1415992== at 0x485880F: malloc (vg_replace_malloc.c:447) > ==1415992== by 0x9F88CC0: cv::fastMalloc(unsigned long) (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA08D13F: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA088315: cv::Mat::create(int, int const*, int) (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA0D9E29: cv::_OutputArray::create(int, int const*, > int, int, bool, cv::_OutputArray::DepthMask) const (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0x9FEC872: cv::Mat::copyTo(cv::_OutputArray const&) > const (in /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0x96E8AA8: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x96F5A17: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x972A5F7: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x9722DE4: > cv::dnn::dnn4_v20240521::readNetFromONNX(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x9520AD1: > cv::dnn::dnn4_v20240521::readNet(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, > std::__cxx11::basic_string<char, std::char_traits<char>, > std::allocator<char> > const&, std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x10E0A1EE: > cv::FaceRecognizerSF::create(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, > std::__cxx11::basic_string<char, std::char_traits<char>, > std::allocator<char> > const&, int, int) (in > /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so.4.10.0) > ==1415992== > ==1415992== 25,690,184 bytes in 1 blocks are possibly lost in loss > record 4,668 of 4,669 > ==1415992== at 0x485880F: malloc (vg_replace_malloc.c:447) > ==1415992== by 0x9F88CC0: cv::fastMalloc(unsigned long) (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA08D13F: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA088315: cv::Mat::create(int, int const*, int) (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA08869F: cv::Mat::create(int, int, int) (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0x9FEC71B: cv::Mat::copyTo(cv::_OutputArray const&) > const (in /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0x96E8AA8: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x96F5A17: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x972A5F7: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x9722DE4: > cv::dnn::dnn4_v20240521::readNetFromONNX(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x9520AD1: > cv::dnn::dnn4_v20240521::readNet(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, > std::__cxx11::basic_string<char, std::char_traits<char>, > std::allocator<char> > const&, std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x10E0A1EE: > cv::FaceRecognizerSF::create(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, > std::__cxx11::basic_string<char, std::char_traits<char>, > std::allocator<char> > const&, int, int) (in > /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so.4.10.0) > ==1415992== > ==1415992== 342,113,140 bytes in 83 blocks are possibly lost in loss > record 4,669 of 4,669 > ==1415992== at 0x485880F: malloc (vg_replace_malloc.c:447) > ==1415992== by 0x9F88CC0: cv::fastMalloc(unsigned long) (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA08D13F: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA088315: cv::Mat::create(int, int const*, int) (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0xA08869F: cv::Mat::create(int, int, int) (in > /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0x9FEC71B: cv::Mat::copyTo(cv::_OutputArray const&) > const (in /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.10.0) > ==1415992== by 0x96E8EDE: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x96F5A17: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x972A5F7: ??? (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x9722DE4: > cv::dnn::dnn4_v20240521::readNetFromONNX(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x9520AD1: > cv::dnn::dnn4_v20240521::readNet(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, > std::__cxx11::basic_string<char, std::char_traits<char>, > std::allocator<char> > const&, std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&) (in > /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.10.0) > ==1415992== by 0x62935D0: Digikam::DNNModelNet::callLoader(QString > const&) (in /usr/lib/digikam/libdigikamcore.so.9.0.0) > ==1415992== > > It's not at all a dysfunction of digiKAm as well. OPenCV4.10 is used > on your system, OPenCV 4.13 is out with probably the fixes for this > kind of memory leak. > > Nota : OpenCV 5.0 available since few weeks ago is not yet supported > in digiKam, as the DNN engine have been completely rewritten and lack > features provided by 4.x version (eg. the GPU support for ex)... > So OpenCV 4 must be used with digiKAm for the moment, not the OpenCV 5 > (and it will still like this until OPenCV taem fix all the > regressions. > > Best regards > > Gilles Caulier > > Le lun. 13 juil. 2026 à 15:16, Gilles Caulier > <[email protected]> a écrit : >> Did you use the native digiKam package from your distribution ? >> >> Which operations did you run in digiKam exactly ? >> >> Best regards >> >> Gilles Caulier >> >> Le lun. 13 juil. 2026 à 13:44, Cyril Giraud <[email protected]> a écrit : >>> Hi Gilles, >>> >>> Probably yes for digikam 9.0.0 (native for UbuntuStudio 26.04): >>> ==1415992== LEAK SUMMARY: >>> ==1415992== definitely lost: 9,208 bytes in 93 blocks >>> ==1415992== indirectly lost: 17,819,646 bytes in 71,055 blocks >>> ==1415992== possibly lost: 387,519,486 bytes in 44,750 blocks >>> ==1415992== still reachable: 1,377,846 bytes in 4,720 blocks >>> ==1415992== of which reachable via heuristic: >>> ==1415992== newarray : 381,304 bytes in 12 blocks >>> ==1415992== suppressed: 0 bytes in 0 blocks >>> ==1415992== Reachable blocks (those to which a pointer was found) are not shown. >>> ==1415992== To see them, rerun with: --leak-check=full --show-leak-kinds=all >>> >>> Rerun today with --show-leak-kinds=all (probably not exactly the same GUI actions): >>> >>> ==7409== LEAK SUMMARY: >>> ==7409== definitely lost: 10,144 bytes in 96 blocks >>> ==7409== indirectly lost: 17,853,762 bytes in 76,878 blocks >>> ==7409== possibly lost: 387,503,190 bytes in 39,004 blocks >>> ==7409== still reachable: 1,366,375 bytes in 4,637 blocks >>> ==7409== of which reachable via heuristic: >>> ==7409== newarray : 376,536 bytes in 10 blocks >>> ==7409== suppressed: 0 bytes in 0 blocks >>> >>> >>> Full logs here: >>> J’ai lié 2 fichiers à ce message : >>> >>> digiKam-9.0.0.valgrind.log >>> Taille : 797 Ko >>> >>> Date d’expiration : 14/08/2026 >>> NextCloud >>> Lien : https://nextcloud.cgiraud.fr/index.php/s/CPQKTzGGPwkHpmy/download >>> >>> digiKam-9.0.0.valgrind2.log >>> Taille : 5.6 Mo >>> >>> Date d’expiration : 14/08/2026 >>> Service Filelink : NextCloud >>> Lien : https://nextcloud.cgiraud.fr/index.php/s/ap2AqoKHatCKGpG/download >>> >>> I tried to run digikam 9.1.0 but running appimage with valgrind seems not working. >>> >>> Best regards, >>> Cyril >>> >>> >>> >>> >>> Le 12/07/2026 à 22:57, Gilles Caulier a écrit : >>> >>> Hi >>> did you observe a potential memory leak? In which context? >>> >>> You can share the trace in this room using a cloud storage link. >>> >>> Best regards >>> >>> Gilles Caulier >>> >>> Le dim. 12 juil. 2026 à 22:51, Cyril Giraud <[email protected]> a écrit : >>> >>> Hi, >>> >>> https://www.digikam.org/contribute / Checking for Memory Leaks asks to >>> send valgrind output to developers. >>> >>> Could someone give me an email address or a way to send these outputs? >>> >>> Thanks ! >>> >>> Cyril >>> >>>