haolinwei / pam-face-authentication

Automatically exported from code.google.com/p/pam-face-authentication
0 stars 0 forks source link

Segfault on sudo #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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?

Original issue reported on code.google.com by KoFe...@gmail.com on 8 Feb 2010 at 8:01

GoogleCodeExporter commented 9 years ago
could you tell me which distro ?  is it gentoo ?

Original comment by rohan.a...@gmail.com on 8 Feb 2010 at 8:30

GoogleCodeExporter commented 9 years ago
Debian Sid

Original comment by KoFe...@gmail.com on 8 Feb 2010 at 8:43

GoogleCodeExporter commented 9 years ago
do you have the same problem with su usernme ?

Original comment by rohan.a...@gmail.com on 8 Feb 2010 at 9:24

GoogleCodeExporter commented 9 years ago
No, su works good. And unlocking xscreensaver too. Only sudo in all variants 
crashes.

Original comment by KoFe...@gmail.com on 8 Feb 2010 at 9:26

GoogleCodeExporter commented 9 years ago
can you try the sudo command while you are root itself see if that crashes ?

Original comment by rohan.a...@gmail.com on 8 Feb 2010 at 9:50

GoogleCodeExporter commented 9 years ago
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.

Original comment by KoFe...@gmail.com on 8 Feb 2010 at 10:07

GoogleCodeExporter commented 9 years ago
have pam config for sudo without enableX and see if the error gets produced

Original comment by rohan.a...@gmail.com on 8 Feb 2010 at 10:16

GoogleCodeExporter commented 9 years ago
I try both variants with same result.

Original comment by KoFe...@gmail.com on 9 Feb 2010 at 5:44

GoogleCodeExporter commented 9 years ago
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

Original comment by Francesc...@gmail.com on 11 Feb 2010 at 10:22

GoogleCodeExporter commented 9 years ago
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

Original comment by rohan.a...@gmail.com on 11 Feb 2010 at 10:28

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

Original comment by Francesc...@gmail.com on 11 Feb 2010 at 10:46

GoogleCodeExporter commented 9 years ago
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.

Original comment by KoFe...@gmail.com on 11 Feb 2010 at 10:48

GoogleCodeExporter commented 9 years ago
YES GTK+ IS obselete! :)

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

Original comment by rohan.a...@gmail.com on 11 Feb 2010 at 11:10

GoogleCodeExporter commented 9 years ago
Did like suggested in #10 but still no luck :(

Original comment by Francesc...@gmail.com on 11 Feb 2010 at 12:14

GoogleCodeExporter commented 9 years ago
we need to figure out how to run sudo over gdb , i wasnt succesful at that ?

Original comment by rohan.a...@gmail.com on 11 Feb 2010 at 12:17

GoogleCodeExporter commented 9 years ago
hmm .. just found a way! ( duh! i didnt realize it :( )

do 

sudo <something>

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 

Original comment by rohan.a...@gmail.com on 17 Feb 2010 at 11:09

GoogleCodeExporter commented 9 years ago
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

Original comment by Francesc...@gmail.com on 17 Feb 2010 at 11:47

GoogleCodeExporter commented 9 years ago
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/sr
c/pam_face_authentication.cpp

Original comment by rohan.a...@gmail.com on 17 Feb 2010 at 12:01

GoogleCodeExporter commented 9 years ago
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

Original comment by Francesc...@gmail.com on 17 Feb 2010 at 12:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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

Original comment by Francesc...@gmail.com on 17 Feb 2010 at 12:19

GoogleCodeExporter commented 9 years ago
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

Original comment by rohan.a...@gmail.com on 17 Feb 2010 at 12:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
> 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.

Original comment by Francesc...@gmail.com on 17 Feb 2010 at 6:56

GoogleCodeExporter commented 9 years ago
Compiling OpenCV 2.0 without OpenMP support fixes the segmentation fault with 
sudo, 
Yay!

Original comment by Francesc...@gmail.com on 17 Feb 2010 at 11:50

GoogleCodeExporter commented 9 years ago
The issue has been fixed!

Original comment by rohan.a...@gmail.com on 18 Feb 2010 at 9:04

GoogleCodeExporter commented 9 years ago
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

Original comment by oper...@gmail.com on 3 Mar 2010 at 5:04

GoogleCodeExporter commented 9 years ago
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.

Original comment by ColeWasH...@gmail.com on 14 Aug 2010 at 12:15

GoogleCodeExporter commented 9 years ago
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

Original comment by rohan.a...@gmail.com on 14 Aug 2010 at 12:22

GoogleCodeExporter commented 9 years ago
Issue 46 has been merged into this issue.

Original comment by rohan.a...@gmail.com on 24 Aug 2010 at 9:14

GoogleCodeExporter commented 9 years ago
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)

Original comment by visery...@gmail.com on 25 Sep 2010 at 10:09

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

Original comment by feichtne...@gmail.com on 25 Sep 2010 at 11:04

GoogleCodeExporter commented 9 years ago
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.

Original comment by petrusgo...@gmail.com on 27 Sep 2010 at 7:21

GoogleCodeExporter commented 9 years ago
Using  Ubuntu 10.04 and the last version o PFA.

How can I debug it?

Original comment by petrusgo...@gmail.com on 27 Sep 2010 at 7:24

GoogleCodeExporter commented 9 years ago
remove OpenCV

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

recompile PFA.

Original comment by rohan.a...@gmail.com on 27 Sep 2010 at 10:27

GoogleCodeExporter commented 9 years ago
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.

Original comment by scarabdrowner@gmail.com on 1 Oct 2010 at 2:42

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

Original comment by petrusgo...@gmail.com on 1 Oct 2010 at 3:01

GoogleCodeExporter commented 9 years ago
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.

Original comment by scarabdrowner@gmail.com on 9 Oct 2010 at 7:05

GoogleCodeExporter commented 9 years ago
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.

Original comment by rohan.a...@gmail.com on 9 Oct 2010 at 7:13

GoogleCodeExporter commented 9 years ago
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)

Original comment by rohan.a...@gmail.com on 9 Oct 2010 at 7:16

GoogleCodeExporter commented 9 years ago
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

Original comment by vdnhat2...@gmail.com on 22 Dec 2010 at 5:51

GoogleCodeExporter commented 9 years ago
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%2Fqt
branch

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

Original comment by Francesc...@gmail.com on 22 Dec 2010 at 7:22