Export to GitHub

pam-face-authentication - issue #25

Segfault on sudo


Posted on Feb 8, 2010 by Quick Cat

Face Verification Pluggable Authentication Module Started
Keep proper distance with the camera.
Verifying Face ...
Verification successful.
zsh: segmentation fault /usr/bin/sudo -i

In all other cases works fine!

P.S. And one small question: on unlocking screen locked by xscreensaver it is popups an message boxes on each step and don't go next until press "ok" on each... How can I switch it off?

Comment #1

Posted on Feb 8, 2010 by Helpful Panda

could you tell me which distro ? is it gentoo ?

Comment #2

Posted on Feb 8, 2010 by Quick Cat

Debian Sid

Comment #3

Posted on Feb 8, 2010 by Helpful Panda

do you have the same problem with su usernme ?

Comment #4

Posted on Feb 8, 2010 by Quick Cat

No, su works good. And unlocking xscreensaver too. Only sudo in all variants crashes.

Comment #5

Posted on Feb 8, 2010 by Helpful Panda

can you try the sudo command while you are root itself see if that crashes ?

Comment #6

Posted on Feb 8, 2010 by Quick Cat

Sorry, but I can't. It is not try to auntificate. I tried to comment all other lines in all combinations in pam-configs but it wouldn't auth and just execs.

Comment #7

Posted on Feb 8, 2010 by Helpful Panda

have pam config for sudo without enableX and see if the error gets produced

Comment #8

Posted on Feb 9, 2010 by Quick Cat

I try both variants with same result.

Comment #9

Posted on Feb 11, 2010 by Quick Hippo

I always get segfault with sudo. There's a way to debug this? Also pam-face-auth crashes gdm (2.29.6-0ubuntu2).

Ubuntu lucid libcv 2.0.0-3ubuntu2 libhighgui4 2.0.0-3ubuntu2

Comment #10

Posted on Feb 11, 2010 by Helpful Panda

http://code.google.com/p/pam-face-authentication/source/browse/branches/qtbranch/src/pam_face_authentication.cpp

comment out lines 460 -467 ( the equivalent lines of pam_face_authentication.cpp from the tar package ) and build-install

try sudo without the enableX option

i suspect its webcam.stopCamera(); which gives the segfault

Please report if it was successful

Comment #11

Posted on Feb 11, 2010 by Quick Hippo

Sorry forgot to mention that I'm using code from the trunk branch. Is the gtk+ code obsolete?

Comment #12

Posted on Feb 11, 2010 by Quick Cat

I can not recompile it now, in Debian/Sid crashed dependencies in repos and some dev-packages can not be installed. May be later it will be done. I will write when I'll can.

Comment #13

Posted on Feb 11, 2010 by Helpful Panda

YES GTK+ IS obselete! :)

actually i need to move the trunk and move the qtbranch to trunk (sorry , have been lazing :) )

Comment #14

Posted on Feb 11, 2010 by Quick Hippo

Did like suggested in #10 but still no luck :(

Comment #15

Posted on Feb 11, 2010 by Helpful Panda

we need to figure out how to run sudo over gdb , i wasnt succesful at that ?

Comment #16

Posted on Feb 17, 2010 by Helpful Panda

hmm .. just found a way! ( duh! i didnt realize it :( )

do

sudo

goto another terminal window do lsof /dev/video0 This would give you the process which is using the video0 , that is the sudo

attach gdb to the process gdb -p processid type continue

then let it segfault type the following for backtrace bt

paste the output

Comment #17

Posted on Feb 17, 2010 by Quick Hippo

Loaded symbols for /lib/libdbus-1.so.3 0x00a672e6 in writeImageToMemory(_IplImage*, char*) () from /lib/security/pam_face_authentication.so (gdb) continue Continuing.

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb759db70 (LWP 4629)] 0x001594e4 in ?? () (gdb) bt

0 0x001594e4 in ?? ()

1 0x0015962e in ?? ()

2 0x00157e00 in ?? ()

3 0x001d08de in start_thread () from /lib/tls/i686/cmov/libpthread.so.0

4 0x002eb95e in clone () from /lib/tls/i686/cmov/libc.so.6

Comment #18

Posted on Feb 17, 2010 by Helpful Panda

Could you tell me which version of OpenCV using ?

Did you recompile and install after commenting out lines 460 -467 of

http://code.google.com/p/pam-face-authentication/source/browse/trunk/qtbranch/src/pam_face_authentication.cpp

Comment #19

Posted on Feb 17, 2010 by Quick Hippo

Output after commenting out lines 460 -467: 0x00679b5a in cvCanny () from /usr/lib/libcv.so.4 (gdb) continue Continuing.

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7592b70 (LWP 10845)] 0x004f84e4 in ?? ()

version of OpenCV: $ apt-cache policy libcv4 libcv4: Installato: 2.0.0-3ubuntu2 Candidato: 2.0.0-3ubuntu2 Tabella versione: * 2.0.0-3ubuntu2 0 500 http://archive.ubuntu.com lucid/universe Packages 100 /var/lib/dpkg/status

Comment #20

Posted on Feb 17, 2010 by Quick Hippo

Comment deleted

Comment #21

Posted on Feb 17, 2010 by Quick Hippo

forgot output of 'bt': (gdb) bt

0 0x004f84e4 in ?? ()

1 0x004f862e in ?? ()

2 0x004f6e00 in ?? ()

3 0x005018de in start_thread () from /lib/tls/i686/cmov/libpthread.so.0

4 0x001dd95e in clone () from /lib/tls/i686/cmov/libc.so.6

Comment #22

Posted on Feb 17, 2010 by Helpful Panda

Alright, i have been using OpenCV 1.1prealpha, i think its an error with OpenCV 2.0 compiled with OpenMP

I will check that out now

Comment #23

Posted on Feb 17, 2010 by Helpful Panda

Comment deleted

Comment #24

Posted on Feb 17, 2010 by Quick Hippo

Are you running Lucid? yes, I do.

I am on Karmic - sudo works without a problem, I am afraid i cannot upgrade to Lucid (production machine, dont want to break it :) ) , Could you remove OpenCV 2.0 and install OpenCV1.1prea from source ? I've compiled and installed OpenCV1.1preA from source and sudo works fine, thank you.

Later today I'm going to compile OpenCV 2.0 without OpenMP support and see what happends.

Comment #25

Posted on Feb 17, 2010 by Quick Hippo

Compiling OpenCV 2.0 without OpenMP support fixes the segmentation fault with sudo, Yay!

Comment #26

Posted on Feb 18, 2010 by Helpful Panda

The issue has been fixed!

Comment #27

Posted on Mar 3, 2010 by Massive Rhino

Thanks I can now use the pam-face-authentication module with GDM in Ubuntu 9.04 after compiling OpenCV2.0 without OpenMP. For anyone else wondering the best way to do this, the cmake-gui package gives a checkbox for OpenMP enabled/disabled

Comment #28

Posted on Aug 14, 2010 by Grumpy Cat

I'm using Ubuntu 10/04 and having trouble with this segmentation fault. according to their website, OpenCV no longer uses OpenMP in version 2.1. Does that mean that this should work if you just use OpenCV 2.1? I'll have to figure out how to uninstall PFA and OpenCv 2.0 before I can try it.

Comment #29

Posted on Aug 14, 2010 by Helpful Panda

for re installing the same version of PFA. Just delete /lib/security/pam_face_authentication.so

to delete opencv - 1) remove the packages - or 2) if you installed from source - if you have the source dir - goto the dir and sudo make uninstall

Comment #30

Posted on Aug 24, 2010 by Helpful Panda

Issue 46 has been merged into this issue.

Comment #31

Posted on Sep 25, 2010 by Swift Hippo

I have the same problem. Can anyone describe step by step solution? I have read many times the discussion but I could not understand almost anything. (Sorry for my English)

Comment #32

Posted on Sep 25, 2010 by Grumpy Wombat

Have you already tried the solution posted at http://pam-face-authentication.org/wiki/index.php?title=Installation ?

Comment #33

Posted on Sep 27, 2010 by Swift Hippo

I installed today and got the same Segmentation Falt when doing "sudo":


petrus@petrus-AMDX2:~$ sudo apt-get update Face Verification Pluggable Authentication Module Started Keep proper distance with the camera. Verifying Face ... Verification successful.

Segmentation Falt

The authentication is made, thought. If I run sudo again, It doesnt ask authentication again.

Comment #34

Posted on Sep 27, 2010 by Swift Hippo

Using Ubuntu 10.04 and the last version o PFA.

How can I debug it?

Comment #35

Posted on Sep 27, 2010 by Helpful Panda

remove OpenCV

a) recompile OpenCV 2.0 with --disable-openmp in the configuration b) or install OpenCV 2.1

recompile PFA.

Comment #36

Posted on Oct 1, 2010 by Swift Giraffe

I followed the steps in 35b, but PFA was unable to find my camera after that. So, I reverted back to using "libcv-dev libcvaux-dev libhighgui4 libhighgui-dev", at least I can still use PFA for logging in. I can live with the sudo segfault for now, until a method of installing OpenCV 2.1 so that all cameras are recognized again is posted.

Comment #37

Posted on Oct 1, 2010 by Swift Hippo

Same here. I installed OpenCV 2.1 from an ubuntu ppa and after recompiling FPA, my camera wont start. Is it using V4L2 yet?

Comment #38

Posted on Oct 9, 2010 by Swift Giraffe

Since several of us are still obviously having problems with this issue, should the status be reverted back from "fixed"? It's not "fixed" in any sense, not yet. And re: comment 32, there is no "solution" posted on that page.

Comment #39

Posted on Oct 9, 2010 by Helpful Panda

Segfault is because of OpenCV compiled with OpenMP ( version 1.1pre or 2.0 ). If you use 2.1 you would not have a problem.

Comment #40

Posted on Oct 9, 2010 by Helpful Panda

apt-get install ffmpeg libavcodec-dev libavcodec52 libavformat52 libavformat-dev

apt-get install libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev

apt-get install libxine1-ffmpeg libxine-dev libxine1-bin

apt-get install libunicap2 libunicap2-dev

apt-get install libdc1394-22-dev libdc1394-22 libdc1394-utils

apt-get install swig

apt-get install libv4l-0 libv4l-dev

and Compile OpenCV 2.1 and Redo Building of PFA(dont forget to clean old files)

Comment #41

Posted on Dec 22, 2010 by Helpful Kangaroo

http://code.google.com/p/pam-face-authentication/source/browse/branches/qtbranch/src/pam_face_authentication.cpp . That's died .

Hello Francesco.Marella, I feel interested in your project . I want to discover in 3d face recognition . Can you help me to provide your soure code. thank you very much ! My email address : vdnhat2009@gmail.com

Comment #42

Posted on Dec 22, 2010 by Quick Hippo

hi vdnhat2009,

Thank you for your interest in this project!

You can browse the source code here: http://code.google.com/p/pam-face-authentication/source/browse/#svn%2Ftrunk%2Fqtbranch

FYI, this is a community project started by Rohan Anil and developed by some people [*]. I'm not actively following this project anymore so try to get in touch with the project owners.

[*] http://code.google.com/p/pam-face-authentication/people/list

best regards, Francesco

Status: Fixed

Labels:
Type-Defect Priority-Medium