[digikam] [Bug 365202] New: git master 2016-07-07 : Segfault on faces detect.

classic Classic list List threaded Threaded
83 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #36 from [hidden email] ---
>I will notify the maintainer of digikam-git that libexiv2 is no longer a requirement for >digikam.

Not libexiv2, but libkexiv2.

For dependencies details, look here :

https://quickgit.kde.org/?p=digikam-software-compilation.git&a=blob&f=DEPENDENCIES

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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #37 from [hidden email] ---
Maik,

Your facedetector.patch must be applied to git/master in all cases...

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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #38 from Evert Vorster <[hidden email]> ---
Created attachment 99987
  --> https://bugs.kde.org/attachment.cgi?id=99987&action=edit
gdb crash log with facedetect patch loaded.

Unfortunately, it seems that the facedetect patch did not stop the segfaults.

I ran it through gdb, as that is quite a bit faster than valgrind. This crash
was reproduced by just scanning for faces, no recognition, and not surfing
around in the detected faces tags. I found that just changing the tag
associated to a picture will segfault digikam, in fact, that happens quite a
lot.

I will now go disable the external mysql, and see if I can make it 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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #39 from [hidden email] ---
>I found that just changing the tag associated to a picture will segfault digikam

Do you mean a simple tag to image or a face tag ? Both are different in the way
to process data in background.

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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #40 from Evert Vorster <[hidden email]> ---
I was just updating some of the face tags that the recognizer got wrong,
without scanning for new faces, and this rather quickly segfaults digikam.

I am now starting up digikam with the sqlite db, and of course it has to scan
through all my photos first, which takes a while.

--
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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #41 from Evert Vorster <[hidden email]> ---
Created attachment 99988
  --> https://bugs.kde.org/attachment.cgi?id=99988&action=edit
Segfault with facedetect patch applied, running on SQlite db

Looks like it's not the database backend, then, as it segfaults in exactly the
same way when running internal sqlite instead of MySQL.

I suppose the only thing left to do now would be to get it to segfault while
running valgrind, right?

--
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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #42 from [hidden email] ---
Here with sqlite, the crash is not reproducible. I compiled OpenCV3 myself and
uninstalled openCV2 before, to prevent binaries mix of the library.

Using valgrind reduce execution speed as you have seen. The program is executed
in a "VM" like which check all memory allocation and use. If the crash is due
to a race condition as i suspect, you will not able to reproduce it. This is
why i would to add a mutex is the critical section of the OpenCV call code to
be sure that method is not called more than one time by separated threads.

But as you say that crash is also reproducible just when tagging face as well.
perhaps the problem is in OpenCV as well... I don't know....

This is why a check with OpenCV2 can be interesting to do.

Gilles Caulier

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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #43 from [hidden email] ---
Do you have opencv3-contrib installed. This one include face detection
algorithm.

Typically for 5.0.0 i included this opencv-face directly in digiKam core, as
opencv 2 to 3 still a transition switch.

If code backported few mont ago has a bug, i tried to update it as well without
success.

So the idea is to require opencv contrib at configuration time though digiKam
cmake script and to remove opencv-face module from digiKam core and use system
based module instead.

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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #44 from Evert Vorster <[hidden email]> ---
Created attachment 99990
  --> https://bugs.kde.org/attachment.cgi?id=99990&action=edit
The list of files from OpenCV

I am on Arch linux, we don't have contrib. The closest thing is self compile
from git. :)
I have attached the file list of the OpenCV I have installed on my system. It's
version 3.1.0, and looks like it includes face detection.

What is weird about this bug is that it does do quite a few face detections
before it fails, but not always at the same point.

--
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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #45 from [hidden email] ---
Created attachment 99991
  --> https://bugs.kde.org/attachment.cgi?id=99991&action=edit
patch to use face module from opencv_contrib instead from digiKam core

Evert,

New patch to drop face module in digiKam core and use last one from
opencv_contrib.
Opencv3 need to be compiled with OpenCV_Contrib module of course...

Maik,

I have a big doubt on the right way to  implement this new pure virtual method
:

void predict(InputArray src, Ptr<PredictCollector> collector) const = 0;

... defined in face.hpp and to code in facerec_borrowed.cpp

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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #46 from [hidden email] ---
With my patch, detection process my whole collection with 2271 images using
sqlite database.

Yes, it's not too huge but it's a test collection on my virtual machine.

Until now, all work fine. No crash, faces are detected (15%)

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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #47 from Maik Qualmann <[hidden email]> ---
Gilles,

I have a patch created for the new face recognition already a few months ago.
But I see a slight change in the ABI to the current code from github. OpenCV
minimum would be version 3.1. I will upload the patch for testing here.

Maik

--
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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #48 from Maik Qualmann <[hidden email]> ---
Created attachment 99992
  --> https://bugs.kde.org/attachment.cgi?id=99992&action=edit
face31.patch

New face modul from OpenCV-3.1. But not the latest version.

Maik

--
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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #49 from [hidden email] ---
Evert,

The face scan with my patch is finished with 244 faces found and no crash....

Now i will test with a Mysql internal database.

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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #50 from [hidden email] ---
Evert,

With my patch, and Mysql remote server, face scan is started over the same
collection and no crash appear until now.... Wait and see...

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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #51 from [hidden email] ---
Screenshot of face scan with remote mysql in action :

https://www.flickr.com/photos/digikam/28121515122/in/dateposted-public/

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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #52 from Maik Qualmann <[hidden email]> ---
My packages for OpenCV are not using a TBB (libtbb2). Your Yes.
It could be related herewith:

http://code.opencv.org/issues/4489

Maik

--
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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #53 from [hidden email] ---
Ever,

Faces scan with Mysql dataabse server is complete without a crash. I used
single core to compute face detection.

I will not try to use whole cpu core.

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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #54 from Evert Vorster <[hidden email]> ---
Gilles,
 I found the contrib version of OpenCV, but the network link I am behind is
terribly slow, and I have been unable to download and compile it. I tried your
patch anyways, but digikam absolutely requires the contrib package of opencv.

Right now I am trying Maik's patch, as that allows me to compile against the
version of OpenCV that is included in standard Arch.

In a couple of weeks I will be home, with faster and more reliable internet,
and then I will try your patch again.

--
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 365202] External MySQL database faces update segfault [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=365202

--- Comment #55 from Maik Qualmann <[hidden email]> ---
The cause is compiled libtbb2 support in OpenCV. Gilles, look in the crash logs
from Evert, our distributions have libtbb2 disabled in OpenCV. See my Comment
52

Maik

--
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
12345