[digikam] [Bug 323888] New: Face recognition makes digikam fill all the available memory

classic Classic list List threaded Threaded
123 messages Options
1234 ... 7
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] New: Face recognition makes digikam fill all the available memory

Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

            Bug ID: 323888
           Summary: Face recognition makes digikam fill all the available
                    memory
    Classification: Unclassified
           Product: digikam
           Version: 3.3.0
          Platform: Fedora RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: NOR
         Component: Face Management
          Assignee: [hidden email]
          Reporter: [hidden email]

When recognizing faces on large albums, after a while the recognition.db starts
growing a lot, up to 200-something MB. After that size face recognition becomes
impossible: for each modification, while digikam updates the face DB, it fills
all available memory (28GB on my system, including swap space) and then it gets
terminated by the OS.

Reproducible: Always

Steps to Reproduce:
1. Use a large set of photos (15-20'000 in my case)
2. Perform face detection
3. Tag people
4. Perform face recognition
Actual Results:  
The program starts filling all available memory and gets terminated by the
operating system

Expected Results:  
Update the face db and recognize faces

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

Gilles Caulier-4
https://bugs.kde.org/show_bug.cgi?id=323888

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from Gilles Caulier <[hidden email]> ---
*** Bug 277163 has been marked as a duplicate of this bug. ***

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

Gilles Caulier-4
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #2 from Gilles Caulier <[hidden email]> ---
Can you run digiKam into valgrind as explained here :

http://www.digikam.org/contrib

and report valgrind trace here for future investigations...

Also we need to know which OpenCV version you use. Look into Help/Components
Info dialog for details.

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

Alberto Ferrante
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

--- Comment #3 from Alberto <[hidden email]> ---
LibOpenCV release was 2.4.5, I now updated it to 2.4.6 with the same results.
Valgrind report will follow.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

Alberto Ferrante
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

--- Comment #4 from Alberto <[hidden email]> ---
Created attachment 81852
  --> https://bugs.kde.org/attachment.cgi?id=81852&action=edit
Valgrind report

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

alexander.s.m
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #5 from [hidden email] ---
Affects me as well. Arch linux, opencv 2.4.6.1

$ du -sh .kde4/share/apps/libkface/database/recognition.db                      
57M     .kde4/share/apps/libkface/database/recognition.db

Why is it so big?
$ sqlite3 ~/.kde4/share/apps/libkface/database/recognition.db 'select count(*)
from opencvlbphistograms;'
6915

I tried to delete recognition.db and run face recognition wizard with option
"Clear and rebuildall training data", and after this operation I got
recognition.db < 1MiB.
$ sqlite3 ~/.kde4/share/apps/libkface/database/recognition.db 'select count(*)
from opencvlbphistograms;'
116
And I have exactly 116 face tags.

Original 57 MiB is compressible by xz down to 2%, recreated - down to 72%.
Therefore I conclude 57MiB recognition.db had lots of duplicates.

After recreating recognition.db digikam does not concume all RAM in face
related opeartions anymore.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

alexander.s.m
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

--- Comment #6 from Alexander Meshcheryakov <[hidden email]> ---
Steps to reproduce growing recognition.db with duplicate records
1) re-launch Digikam, switch to people view, select face tag "Unknown".
2) Manually assign one face to specific human.
3) Wait 30seconds (it appears that there is "sleep" before DB update)

Outcome:
before operation you had N records in table "opencvlbphistograms",
after operation number of entries in "opencvlbphistograms" becomes 2*N+1

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

Bugzilla from Flu_Ger@web.de
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

--- Comment #7 from Flu87 <[hidden email]> ---
Created attachment 82206
  --> https://bugs.kde.org/attachment.cgi?id=82206&action=edit
valgrind --tool=memcheck --leak-check=full --error-limit=no digikam 2>
digikam.leaks.err

me too ...

with valgrind it took too long, so I canceled it and closed digikam
and killed it after another hour...

hope it still helps ^^

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #8 from [hidden email] ---
Hello,

Digikam 3.5 build from git. OpenCV 2.4.5 build from source.

Scanning a collection of 28000 pictures (jpg, raw ...) with digikam use in gdb
- nothing else running except a top in terminal.

Digikam crash sometimes with this error :

what digikam was doing :

digikam(3834)/digikam (core) Digikam::DetectionWorker::process: Found 0 faces
in "IMG_2389.CR2" QSize(2848, 4272) QSize(2848, 4272)
digikam(3834)/digikam (core) Digikam::FacePipeline::Private::checkFinished:
Check for finish:  51 packages, 0 infos to filter, hasFinished() false
digikam(3834)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(3834)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation =>
Exif.Image.Orientation =>  8
digikam(3834)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  533   800  searchIncrement  1.1  grouping  3
flags  1  min size  26   26
digikam(3834)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(3834)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation =>
Exif.Image.Orientation =>  8
digikam(3834)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(3834)/digikam (core) Digikam::DetectionWorker::process: Found 0 faces
in "IMG_2390.CR2" QSize(2848, 4272) QSize(2848, 4272)
digikam(3834)/digikam (core) Digikam::FacePipeline::Private::checkFinished:
Check for finish:  51 packages, 0 infos to filter, hasFinished() false
digikam(3834)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(3834)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation =>
Exif.Image.Orientation =>  8

error :
------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x94db5b40 (LWP 3876)]
0xb6efd89a in Digikam::DImg::DImg (this=0x94db5124, image=...)
    at /home/eric/digikamgit/dk/core/libs/dimg/dimg.cpp:165
165                    dptr[0] = qBlue(*sptr);

Cordialement,

Eric

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |CONFIRMED
     Ever confirmed|0                           |1

--- Comment #9 from [hidden email] ---
*** This bug has been confirmed by popular vote. ***

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

--- Comment #10 from [hidden email] ---
Hello,

Here some more info :

Reproducible : yes
How : restart computer (freeing memory, cache ..), then launch digikam in gdb
(nothing else except a top in terminal), wait a few minutes while scanning
pictures for faces (skip images already scan).

Res memory grow to 1.2 1.5 gb (60%)  when scan is launched.
then swap is used, swap  and load grow (especially with raw files). Then
digikam crash with error behind :

dbg :

[New Thread 0x95db7b40 (LWP 2642)]
digikam(2423)/digikam (core) Digikam::FacePipeline::Private::checkFinished:
Check for finish:  51 packages, 0 infos to filter, hasFinished() false
digikam(2423)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(2423)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation =>
Exif.Image.Orientation =>  1
digikam(2423)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  800   533  searchIncrement  1.1  grouping  3
flags  1  min size  26   26
digikam(2423)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation =>
Exif.Image.Orientation =>  1
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(2423)/digikam (core) Digikam::DetectionWorker::process: Found 0 faces
in "IMG_2467.CR2" QSize(4272, 2848) QSize(4272, 2848)
digikam(2423)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(2423)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation =>
Exif.Image.Orientation =>  1
digikam(2423)/digikam (core) Digikam::FacePipeline::Private::checkFinished:
Check for finish:  51 packages, 0 infos to filter, hasFinished() false
digikam(2423)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(2423)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation =>
Exif.Image.Orientation =>  1
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  800   533  searchIncrement  1.1  grouping  3
flags  1  min size  26   26
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(2423)/digikam (core) Digikam::DetectionWorker::process: Found 0 faces
in "IMG_2468.CR2" QSize(4272, 2848) QSize(4272, 2848)
digikam(2423)/digikam (core) Digikam::FacePipeline::Private::checkFinished:
Check for finish:  51 packages, 0 infos to filter, hasFinished() false
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  800   533  searchIncrement  1.1  grouping  3
flags  1  min size  26   26
digikam(2423)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(2423)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation =>
Exif.Image.Orientation =>  1
digikam(2423)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(2423)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation =>
Exif.Image.Orientation =>  1
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(2423)/digikam (core) Digikam::DetectionWorker::process: Found 0 faces
in "IMG_2469.CR2" QSize(4272, 2848) QSize(4272, 2848)
digikam(2423)/digikam (core) Digikam::FacePipeline::Private::checkFinished:
Check for finish:  51 packages, 0 infos to filter, hasFinished() false
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  800   533  searchIncrement  1.1  grouping  3
flags  1  min size  26   26
digikam(2423)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(2423)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation =>
Exif.Image.Orientation =>  1

error :
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x94db5b40 (LWP 2502)]
0xb6efd89a in Digikam::DImg::DImg (this=0x94db5124, image=...)
    at /home/eric/digikamgit/dk/core/libs/dimg/dimg.cpp:165
165                    dptr[0] = qBlue(*sptr);

(gdb) backtrace :

#0  0xb6efd89a in Digikam::DImg::DImg (this=0x94db5124, image=...)
    at /home/eric/digikamgit/dk/core/libs/dimg/dimg.cpp:165
#1  0xb70d5d7d in Digikam::PreviewLoadingTask::execute (this=0xaca8d38)
    at /home/eric/digikamgit/dk/core/libs/threadimageio/previewtask.cpp:288
#2  0xb70c5205 in Digikam::LoadSaveThread::run (this=0xb033c38)
    at /home/eric/digikamgit/dk/core/libs/threadimageio/loadsavethread.cpp:136
#3  0xb70ecd58 in Digikam::DynamicThread::DynamicThreadPriv::run (
    this=0xb033cd0)
    at /home/eric/digikamgit/dk/core/libs/threads/dynamicthread.cpp:186
#4  0xb53d446b in QThreadPoolThread::run (this=0x96bc2a0)
    at concurrent/qthreadpool.cpp:107
#5  0xb53e1eb0 in QThreadPrivate::start (arg=0x96bc2a0)
    at thread/qthread_unix.cpp:307
#6  0xb36c1d4c in start_thread (arg=0x94db5b40) at pthread_create.c:308
#7  0xb510fdde in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

--- Comment #11 from [hidden email] ---
Created attachment 82594
  --> https://bugs.kde.org/attachment.cgi?id=82594&action=edit
Crash after full fill the memory - valgrind log

View line 4197 -> no crash but halt (about 1 hour) and fill the memory then
continue.
View line 5835 -> crash

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

--- Comment #12 from [hidden email] ---
(In reply to comment #11)
> Created attachment 82594 [details]
> Crash after full fill the memory - valgrind log
>
 View line 4197 -> no crash but halt (about 1 hour - before the first warning)
and fill the memory then continue.

 View line 5835 -> crash

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

--- Comment #13 from [hidden email] ---
Created attachment 82602
  --> https://bugs.kde.org/attachment.cgi?id=82602&action=edit
Crash after full fill the memory - valgrind log - run 2

Hello,

an other run in valgrind with the same result.
Hang from digikam in line 4189 and continue with a warning (always to the same
picture):
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave (QRect(32,224 217x217) )
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: Verifying face
QRect(32,224 217x217) using cascade 0
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  297   297  searchIncrement  1.1  grouping  3
flags  0  min size  130   130
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: Verifying face
QRect(32,224 217x217) using cascade 1
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  297   297  searchIncrement  1.1  grouping  3
flags  0  min size  130   130
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: Verifying face
QRect(32,224 217x217) using cascade 2
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: Verifying face
QRect(32,224 217x217) using cascade 3
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  297   297  searchIncrement  1.1  grouping  3
flags  0  min size  130   130
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: Verifying face
QRect(32,224 217x217) using cascade 4
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  297   297  searchIncrement  1.1  grouping  3
flags  0  min size  130   130
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: Verifying face
QRect(32,224 217x217) using cascade 5
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: feature
QRectF(0,0 0.6x0.6) QRect(32,224 217x217) QRect(32,224 130x130)
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  130   130  searchIncrement  1.1  grouping  2
flags  0  min size  22   22
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: Verifying face
QRect(32,224 217x217) using cascade 6
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: feature
QRectF(0.4,0 0.6x0.6) QRect(32,224 217x217) QRect(119,224 130x130)
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  130   130  searchIncrement  1.1  grouping  2
flags  0  min size  22   22
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: Verifying face
QRect(32,224 217x217) using cascade 7
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: feature
QRectF(0.2,0.25 0.6x0.6) QRect(32,224 217x217) QRect(75,278 130x130)
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  130   130  searchIncrement  1.1  grouping  2
flags  0  min size  22   22
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: Verifying face
QRect(32,224 217x217) using cascade 8
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::verifyFace: feature
QRectF(0.1,0.4 0.8x0.6) QRect(32,224 217x217) QRect(54,311 174x130)
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  174   130  searchIncrement  1.1  grouping  2
flags  0  min size  0   0
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale gave ()
digikam(2423)/digikam (core) Digikam::DetectionWorker::process: Found 0 faces
in "IMG_7905.jpg" QSize(4272, 2848) QSize(4272, 2848)

<---HERE--> HANG FOR PAST AN HOUR and continue-
==2423== Warning: set address range perms: large range [0x49dc6028, 0x5a827018)
(undefined)
==2423== Warning: set address range perms: large range [0x49dc6018, 0x5a827028)
(noaccess)

<---HERE-->


Crash to line 5839 :
digikam(2423)/digikam (core) Digikam::DetectionWorker::process: Found 0 faces
in "IMG_2479.CR2" QSize(4272, 2848) QSize(4272, 2848)
digikam(2423)/digikam (core) Digikam::FacePipeline::Private::checkFinished:
Check for finish:  51 packages, 0 infos to filter, hasFinished() false
digikam(2423)/KFACE KFaceIface::OpenCVFaceDetector::cascadeResult:
detectMultiScale: image size  800   533  searchIncrement  1.1  grouping  3
flags  1  min size  26   26
digikam(2423)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(2423)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation =>
Exif.Image.Orientation =>  1

<--CRASH-->

==2423== Thread 7:
==2423== Invalid read of size 4
==2423==    at 0x4D7C89A: Digikam::DImg::DImg(QImage const&) (dimg.cpp:165)
==2423==    by 0x4F54D7C: Digikam::PreviewLoadingTask::execute()
(previewtask.cpp:288)
==2423==    by 0x4F44204: Digikam::LoadSaveThread::run()
(loadsavethread.cpp:136)
==2423==    by 0x4F6BD57: Digikam::DynamicThread::DynamicThreadPriv::run()
(dynamicthread.cpp:186)
==2423==    by 0x6A1246A: QThreadPoolThread::run() (in
/usr/lib/i386-linux-gnu/libQtCore.so.4.8.2)
==2423==    by 0x6A1FEAF: QThreadPrivate::start(void*) (in
/usr/lib/i386-linux-gnu/libQtCore.so.4.8.2)
==2423==    by 0x96CCD4B: start_thread (pthread_create.c:308)
==2423==    by 0x6F34DDD: clone (clone.S:130)
==2423==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==2423==
KCrash: Application 'digikam' crashing...

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #82602|0                           |1
        is obsolete|                            |

--- Comment #14 from [hidden email] ---
Created attachment 82603
  --> https://bugs.kde.org/attachment.cgi?id=82603&action=edit
Crash after full fill the memory - valgrind log - run 2

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

--- Comment #15 from [hidden email] ---
Hello,

I've continue to test.

I have disable zram on my ubuntu kernel ( see here
:https://bugs.launchpad.net/ubuntu/+source/linux-lts-raring/+bug/1217189)  : I
use Xubuntu 12.04 LTS with :
Linux version 3.2.0-54-generic-pae (buildd@batsu) (gcc version 4.
6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #82-Ubuntu SMP Tue Sep 10 20:29:22 UTC
2013
 (Ubuntu 3.2.0-54.82-generic-pae 3.2.50)

I was having those errors :
[ 1.864606] Adding 1922976k swap on /dev/zram0. Priority:100 extents:1
across:1922976k SS
[ 30.459194] Buffer I/O error on device zram0, logical block 480744
[ 30.459234] Buffer I/O error on device zram0, logical block 480744
[ 30.459313] Buffer I/O error on device zram0, logical block 480744
[ 30.459349] Buffer I/O error on device zram0, logical block 480744
[ 30.459384] Buffer I/O error on device zram0, logical block 480744

in dmesg

And Digikam doesn't full fill the memory nor Crash anymore : run a face scan to
100 %

How should I test again :

suppress face database file and rescan again ? more files to suppress ?

Greatings,

Eric

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: [digikam] [Bug 323888] New: Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante

Hello,

Have a few more tests.

I was having some problem with ZRAM, but the bug still occur when do a
scan with option :  Clear unconfirmed results and rescan. (restart scan
for beginning except for result wich have been confirmed - I suppose).

Detection and recognition begin from root of the collection to the few 1
rst albums then crash with same error as my precedent posts :

GDB :
error :
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x94db5b40 (LWP 2502)]
0xb6efd89a in Digikam::DImg::DImg (this=0x94db5124, image=...)
    at /home/eric/digikamgit/dk/core/libs/dimg/dimg.cpp:165
165                    dptr[0] = qBlue(*sptr);

(gdb) backtrace :

#0  0xb6efd89a in Digikam::DImg::DImg (this=0x94db5124, image=...)
    at /home/eric/digikamgit/dk/core/libs/dimg/dimg.cpp:165
#1  0xb70d5d7d in Digikam::PreviewLoadingTask::execute (this=0xaca8d38)

at /home/eric/digikamgit/dk/core/libs/threadimageio/previewtask.cpp:288
#2  0xb70c5205 in Digikam::LoadSaveThread::run (this=0xb033c38)

at /home/eric/digikamgit/dk/core/libs/threadimageio/loadsavethread.cpp:136
#3  0xb70ecd58 in Digikam::DynamicThread::DynamicThreadPriv::run (
    this=0xb033cd0)
    at /home/eric/digikamgit/dk/core/libs/threads/dynamicthread.cpp:186
#4  0xb53d446b in QThreadPoolThread::run (this=0x96bc2a0)
    at concurrent/qthreadpool.cpp:107
#5  0xb53e1eb0 in QThreadPrivate::start (arg=0x96bc2a0)
    at thread/qthread_unix.cpp:307
#6  0xb36c1d4c in start_thread (arg=0x94db5b40) at pthread_create.c:308
#7  0xb510fdde in clone ()
at ../sysdeps/unix/sysv/linux/i386/clone.S:130


Valgrind :

digikam(2423)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(2423)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation:
Orientation =>
Exif.Image.Orientation =>  1

<--CRASH-->

==2423== Thread 7:
==2423== Invalid read of size 4
==2423==    at 0x4D7C89A: Digikam::DImg::DImg(QImage const&)
(dimg.cpp:165)
==2423==    by 0x4F54D7C: Digikam::PreviewLoadingTask::execute()
(previewtask.cpp:288)
==2423==    by 0x4F44204: Digikam::LoadSaveThread::run()
(loadsavethread.cpp:136)
==2423==    by 0x4F6BD57:
Digikam::DynamicThread::DynamicThreadPriv::run()
(dynamicthread.cpp:186)
==2423==    by 0x6A1246A: QThreadPoolThread::run() (in
/usr/lib/i386-linux-gnu/libQtCore.so.4.8.2)
==2423==    by 0x6A1FEAF: QThreadPrivate::start(void*) (in
/usr/lib/i386-linux-gnu/libQtCore.so.4.8.2)
==2423==    by 0x96CCD4B: start_thread (pthread_create.c:308)
==2423==    by 0x6F34DDD: clone (clone.S:130)
==2423==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==2423==


This is on digikam 3.5 build from git with opencv 2.4.5 built from
opencv repository.

Build date: Sep 30 2013 (target: debugfull)
Rev.: 04ec199e75e8a6bc01f29bac3a9476e3b72960e0

Components :

digiKam version 3.5.0
Exiv2 can write to Jp2: Yes
Exiv2 can write to Jpeg: Yes
Exiv2 can write to Pgf: Yes
Exiv2 can write to Png: Yes
Exiv2 can write to Tiff: Yes
Exiv2 supports XMP metadata: Yes
LibCImg: 130
LibEigen: 3.0.5
LibExiv2: 0.22
LibJPEG: 80
LibJasper: 1.900.1
LibKDE: 4.11.1
LibKExiv2: 2.3.1
LibKGeoMap: 2.0.0
LibKdcraw: 2.3.1
LibLCMS: 2040
LibLensFun: 0.2.7-0
LibPGF: 6.12.24 - external shared library
LibPNG: 1.2.46
LibQt: 4.8.2
LibRaw: 0.15.4
LibTIFF: LIBTIFF, Version 3.9.5 Copyright (c) 1988-1996 Sam Leffler
Copyright (c) 1991-1996 Silicon Graphics, Inc.
Marble Widget: 0.16.1 (stable version)
Parallelized PGF codec: No
Parallelized demosaicing: Yes
RawSpeed codec support: Yes
Database backend: QMYSQL
Database internal server: No
Kipi-Plugins: 3.5.0
LibGphoto2: 2.4.14
LibKface: 3.0.0
LibKipi: 2.1.0
LibOpenCV: 2.4.5


digiKam version 3.5.0
Images:
BMP: 5
GIF: 56
JP2: 16
JPG: 22730
PNG: 130
RAW-CR2: 3432
XCF: 209
total: 26578
:
:
Videos:
AVI: 29
MOV: 185
MP4: 43
MPEG: 2
WMV: 1
total: 260
:
:
Total Items: 26838
Albums: 2749
Tags: 492
Database backend: QMYSQL
Database internal server: No





Greatings,

Eric









Le jeudi 22 août 2013 à 10:10 +0000, Alberto a écrit :

> https://bugs.kde.org/show_bug.cgi?id=323888
>
>             Bug ID: 323888
>            Summary: Face recognition makes digikam fill all the available
>                     memory
>     Classification: Unclassified
>            Product: digikam
>            Version: 3.3.0
>           Platform: Fedora RPMs
>                 OS: Linux
>             Status: UNCONFIRMED
>           Severity: major
>           Priority: NOR
>          Component: Face Management
>           Assignee: [hidden email]
>           Reporter: [hidden email]
>
> When recognizing faces on large albums, after a while the recognition.db starts
> growing a lot, up to 200-something MB. After that size face recognition becomes
> impossible: for each modification, while digikam updates the face DB, it fills
> all available memory (28GB on my system, including swap space) and then it gets
> terminated by the OS.
>
> Reproducible: Always
>
> Steps to Reproduce:
> 1. Use a large set of photos (15-20'000 in my case)
> 2. Perform face detection
> 3. Tag people
> 4. Perform face recognition
> Actual Results:  
> The program starts filling all available memory and gets terminated by the
> operating system
>
> Expected Results:  
> Update the face db and recognize faces
>


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: [digikam] [Bug 323888] New: Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante
Hello,

Looking at this bug : https://bugs.kde.org/show_bug.cgi?id=277169


I look for 0 size files in album :

find -type f -size 0
./La creche/Kayak Fishing.flv

Delete this files but he wasn't in the album.

Look at the DB :

SELECT * FROM digikam.Images where name like "%.flv";

But nothing : .flv are not collected.

Greatings,

Eric





_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

--- Comment #16 from [hidden email] ---
Hello,

Have a few more tests.

I was having some problem with ZRAM, but the bug still occur when do a
scan with option :  Clear unconfirmed results and rescan. (restart scan
for beginning except for result wich have been confirmed - I suppose).

Detection and recognition begin from root of the collection to the few 1
rst albums then crash with same error as my precedent posts :

GDB :
error :
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x94db5b40 (LWP 2502)]
0xb6efd89a in Digikam::DImg::DImg (this=0x94db5124, image=...)
    at /home/eric/digikamgit/dk/core/libs/dimg/dimg.cpp:165
165                    dptr[0] = qBlue(*sptr);

(gdb) backtrace :

#0  0xb6efd89a in Digikam::DImg::DImg (this=0x94db5124, image=...)
    at /home/eric/digikamgit/dk/core/libs/dimg/dimg.cpp:165
#1  0xb70d5d7d in Digikam::PreviewLoadingTask::execute (this=0xaca8d38)

at /home/eric/digikamgit/dk/core/libs/threadimageio/previewtask.cpp:288
#2  0xb70c5205 in Digikam::LoadSaveThread::run (this=0xb033c38)

at /home/eric/digikamgit/dk/core/libs/threadimageio/loadsavethread.cpp:136
#3  0xb70ecd58 in Digikam::DynamicThread::DynamicThreadPriv::run (
    this=0xb033cd0)
    at /home/eric/digikamgit/dk/core/libs/threads/dynamicthread.cpp:186
#4  0xb53d446b in QThreadPoolThread::run (this=0x96bc2a0)
    at concurrent/qthreadpool.cpp:107
#5  0xb53e1eb0 in QThreadPrivate::start (arg=0x96bc2a0)
    at thread/qthread_unix.cpp:307
#6  0xb36c1d4c in start_thread (arg=0x94db5b40) at pthread_create.c:308
#7  0xb510fdde in clone ()
at ../sysdeps/unix/sysv/linux/i386/clone.S:130


Valgrind :

digikam(2423)/digikam (core) Digikam::DMetadata::getIccProfile: Exif
color-space tag is sRGB. Using default sRGB ICC profile.
digikam(2423)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation:
Orientation =>
Exif.Image.Orientation =>  1

<--CRASH-->

==2423== Thread 7:
==2423== Invalid read of size 4
==2423==    at 0x4D7C89A: Digikam::DImg::DImg(QImage const&)
(dimg.cpp:165)
==2423==    by 0x4F54D7C: Digikam::PreviewLoadingTask::execute()
(previewtask.cpp:288)
==2423==    by 0x4F44204: Digikam::LoadSaveThread::run()
(loadsavethread.cpp:136)
==2423==    by 0x4F6BD57:
Digikam::DynamicThread::DynamicThreadPriv::run()
(dynamicthread.cpp:186)
==2423==    by 0x6A1246A: QThreadPoolThread::run() (in
/usr/lib/i386-linux-gnu/libQtCore.so.4.8.2)
==2423==    by 0x6A1FEAF: QThreadPrivate::start(void*) (in
/usr/lib/i386-linux-gnu/libQtCore.so.4.8.2)
==2423==    by 0x96CCD4B: start_thread (pthread_create.c:308)
==2423==    by 0x6F34DDD: clone (clone.S:130)
==2423==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==2423==


This is on digikam 3.5 build from git with opencv 2.4.5 built from
opencv repository.

Build date: Sep 30 2013 (target: debugfull)
Rev.: 04ec199e75e8a6bc01f29bac3a9476e3b72960e0

Components :

digiKam version 3.5.0
Exiv2 can write to Jp2: Yes
Exiv2 can write to Jpeg: Yes
Exiv2 can write to Pgf: Yes
Exiv2 can write to Png: Yes
Exiv2 can write to Tiff: Yes
Exiv2 supports XMP metadata: Yes
LibCImg: 130
LibEigen: 3.0.5
LibExiv2: 0.22
LibJPEG: 80
LibJasper: 1.900.1
LibKDE: 4.11.1
LibKExiv2: 2.3.1
LibKGeoMap: 2.0.0
LibKdcraw: 2.3.1
LibLCMS: 2040
LibLensFun: 0.2.7-0
LibPGF: 6.12.24 - external shared library
LibPNG: 1.2.46
LibQt: 4.8.2
LibRaw: 0.15.4
LibTIFF: LIBTIFF, Version 3.9.5 Copyright (c) 1988-1996 Sam Leffler
Copyright (c) 1991-1996 Silicon Graphics, Inc.
Marble Widget: 0.16.1 (stable version)
Parallelized PGF codec: No
Parallelized demosaicing: Yes
RawSpeed codec support: Yes
Database backend: QMYSQL
Database internal server: No
Kipi-Plugins: 3.5.0
LibGphoto2: 2.4.14
LibKface: 3.0.0
LibKipi: 2.1.0
LibOpenCV: 2.4.5


digiKam version 3.5.0
Images:
BMP: 5
GIF: 56
JP2: 16
JPG: 22730
PNG: 130
RAW-CR2: 3432
XCF: 209
total: 26578
:
:
Videos:
AVI: 29
MOV: 185
MP4: 43
MPEG: 2
WMV: 1
total: 260
:
:
Total Items: 26838
Albums: 2749
Tags: 492
Database backend: QMYSQL
Database internal server: No





Greatings,

Eric

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 323888] Face recognition makes digikam fill all the available memory

eldk
In reply to this post by Alberto Ferrante
https://bugs.kde.org/show_bug.cgi?id=323888

--- Comment #17 from [hidden email] ---
Hello,

Looking at this bug : https://bugs.kde.org/show_bug.cgi?id=277169


I look for 0 size files in album :

find -type f -size 0
./La creche/Kayak Fishing.flv

Delete this files but he wasn't in the album.

Look at the DB :

SELECT * FROM digikam.Images where name like "%.flv";

But nothing : .flv are not collected.

Greatings,

Eric

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
1234 ... 7