Bug 101920 - xscreensaver hangs on failed password
xscreensaver hangs on failed password
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: xscreensaver (Show other bugs)
1.0
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
:
: 102840 103195 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-07 22:35 EDT by Nathan G. Grennan
Modified: 2014-03-16 22:37 EDT (History)
3 users (show)

See Also:
Fixed In Version: 4.12-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-27 18:03:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
strace log of xscreensaver 4.11 (201.18 KB, text/plain)
2003-08-08 00:05 EDT, Nathan G. Grennan
no flags Details
Changes between 4.10 and 4.11 that contain the bug (6.38 KB, text/plain)
2003-08-09 14:38 EDT, Nathan G. Grennan
no flags Details
Further isolated (3.80 KB, text/plain)
2003-08-09 15:33 EDT, Nathan G. Grennan
no flags Details
Patch containing the changes that causes the bug (481 bytes, patch)
2003-08-09 15:50 EDT, Nathan G. Grennan
no flags Details | Diff
Removes timeout.tv_nsec = 1; (428 bytes, text/plain)
2003-08-09 16:11 EDT, Nathan G. Grennan
no flags Details

  None (edit)
Description Nathan G. Grennan 2003-08-07 22:35:53 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.11 (X11; Linux i686; U;) Gecko/20030720

Description of problem:
If you enter the password wrong when xscreensaver has the screen locked it
hangs. Then I had to ctrl-alt-f1, login, and kill it. Finally I had to restart
sawfish to restore keyboard input in X.

Version-Release number of selected component (if applicable):
xscreensaver-4.11-1

How reproducible:
Always

Steps to Reproduce:
1. Login to X
2. Lock Screen
3. Enter password incorrectly
    

Actual Results:  xscreensaver hangs

Expected Results:  xscreensaver times out and prompts for password again

Additional info:
Comment 1 Bill Nottingham 2003-08-07 22:45:13 EDT
Odd, works for me. What sort of auth are you using?
Comment 2 Nathan G. Grennan 2003-08-07 22:59:40 EDT
Standard shadow via pam

I downgraded and the problem went away. I will double check it.
Comment 3 Nathan G. Grennan 2003-08-07 23:10:10 EDT
Upgraded back to 4.11-1, ran killall xscreensaver, and ran xscreensaver through
the run dialog of the gnome panel. Next I clicked settings and clicked closed.
Selected Lock Screen from the menu, typed gibberish, waited 10 seconds, and saw
no change. xscreensaver had hung. Used ctrl-alt-f1 ctrl-alt-f7 and found the
xscreensaver dialog box hadn't refreshed. Used ctrl-alt-f1 again, logged in as
root, and ran killall xscreensaver. Went back into X with ctrl-alt-f7, and
restarted sawfish to restore keyboard input.
Comment 4 Bill Nottingham 2003-08-07 23:15:37 EDT
Hm, just to the eliminate the differences between our systems, what happens if
you use something other than sawfish?
Comment 5 Nathan G. Grennan 2003-08-08 00:05:26 EDT
Created attachment 93512 [details]
strace log of xscreensaver 4.11
Comment 6 Bill Nottingham 2003-08-08 00:07:22 EDT
What's the log message?
Comment 7 Nathan G. Grennan 2003-08-08 00:08:58 EDT
I ran strace xscreensaver >xscreensaver.log 2>&1, caused it to hang, and then
killed it. That is what the log is off.

Metacity instead of sawfish didn't help. I had to restart metacity to restore
keyboard input.
Comment 8 Nathan G. Grennan 2003-08-08 00:13:01 EDT
Aug  7 21:11:45 proton xscreensaver(pam_unix)[5760]: authentication failure;
logname= uid=500 euid=500 tty=:0.0 ruser= rhost=  user=edgan
Comment 9 Bill Nottingham 2003-08-08 00:16:23 EDT
Hm, nothing obvious there. Are you using any particular screensaver?
Comment 10 Nathan G. Grennan 2003-08-08 00:23:32 EDT
Can you point me to a debuginfo rpm for xscreensaver-4.11-1?


I am running an oddball setup. Severn+glibc test release(to fix gtk2 issue)+mass
rawhide update via yum+arjanv's kernel-2.6.0-0.test2.1.30 test kernel+updates to
packages related to using 2.6.0.
Comment 11 Bill Nottingham 2003-08-08 00:27:02 EDT
http://people.redhat.com/~notting/xscreensaver-debuginfo-4.11-1.i386.rpm

2.6? Does this happen with a 2.4 kernel? You do have pam-0.77-3 installed, correct?
Comment 12 Nathan G. Grennan 2003-08-08 00:46:37 EDT
yes, pam-0.77-3
Comment 13 Nathan G. Grennan 2003-08-08 00:59:00 EDT
gdb has nothing interesting to say, but then I don't really know how to use it.

I did

gdb xscreensaver
run
(cause xscreensaver to hang)
(no crash shown in gdb)
ctrl-c
bt
(nothing useful)
Comment 14 Bill Nottingham 2003-08-08 01:01:32 EDT
Can you post the backtrace anyway? :)
Comment 15 Nathan G. Grennan 2003-08-08 01:14:42 EDT
backtrace:

#0  0xffffe410 in ?? ()
#1  0xbffff548 in ?? ()
#2  0xbffff578 in ?? ()


2.4.21-20.1.2024.2.1.nptl(Servern kernel) gives the same results as 
2.6.0-0.test2.1.30
Comment 16 Nathan G. Grennan 2003-08-08 01:17:28 EDT
The screensaver is set to random, as is the default.
Comment 17 Nathan G. Grennan 2003-08-08 01:41:09 EDT
Logging in as a user with the default desktop didn't help.

Recompiling xscreensaver-4.11-1 on my machine didn't help.
Comment 18 Nathan G. Grennan 2003-08-08 01:55:26 EDT
Recompiled 4.10-2 on my machine, and it works. So that points to the minor
changes between 4.10 and 4.11, instead of libraries or compiler directly.
Comment 19 Nathan G. Grennan 2003-08-08 10:29:23 EDT
Verbose output from xscreensaver-4.11-1:

xscreensaver: 07:25:24: LOCK ClientMessage received; activating and locking.
xscreensaver: 07:25:24: 0: locked mode switching.
xscreensaver: 07:25:24: blanking screen at Fri Aug  8 07:25:24 2003.
xscreensaver: 07:25:24: 0: grabbing keyboard on 0x40... GrabSuccess.
xscreensaver: 07:25:24: 0: grabbing mouse on 0x40... GrabSuccess.
xscreensaver: 07:25:24: fading...
xscreensaver: 07:25:25: fading done.
xscreensaver: 07:25:26: 0: visual 0x24 (TrueColor,   depth: 24, cmap: 256)
xscreensaver: 07:25:26: 0: saver window is 0xc00024.
xscreensaver: 07:25:26: 0: destroyed old saver window 0xc00001.
xscreensaver: 07:25:26: 0: spawning "engine -root" in pid 25499.
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
xscreensaver: 07:25:27: 0: suspending pid 25499 (engine)
xscreensaver: 07:25:27: prompting for password.
xscreensaver: 07:25:27: 0: creating password dialog.
xscreensaver: 07:25:27: child pid 25499 (engine) stopped with SIGSTOP.
xscreensaver: 07:25:27: 0: mouse is at 691,914.
xscreensaver: 07:25:27: grabbing server...
xscreensaver: 07:25:27: 0: ungrabbing mouse (was 0x40).
xscreensaver: 07:25:27: 0: grabbing mouse on 0xc0002a... GrabSuccess.
xscreensaver: 07:25:27: ungrabbing server.
xscreensaver: 07:25:28: pam_start ("xscreensaver", "edgan", ...) ==> 0 (Success)
xscreensaver: 07:25:28:   pam_set_item (p, PAM_TTY, ":0.0") ==> 0 (Success)
xscreensaver: 07:25:28:     PAM ECHO_OFF("Password: ") ==> password
zsh: killed     xscreensaver -verbose -no-capture
Comment 20 Nathan G. Grennan 2003-08-08 10:32:41 EDT
Tried reversing the passwd-pam.c changes between 4.10 and 4.11. First time it
crashed on a bad password, and the second time it hung like it had before. Seems
that other parts changed that are dependent on the changes in passwd-pam.c. Most
of the changes seem to be converting zeros in function calls to NULLs.
Comment 21 Nathan G. Grennan 2003-08-09 14:38:42 EDT
Created attachment 93548 [details]
Changes between 4.10 and 4.11 that contain the bug

I did alot of of testing, and isolated the bug to the changes in contains in
this patch. If I reverse this patch against 4.11 it compiles and doesn't hang.
Comment 22 Nathan G. Grennan 2003-08-09 15:33:01 EDT
Created attachment 93549 [details]
Further isolated

I have further isolated it to the changes in the above patch. At the moment I
am almost sure it is one of the changes to passwd-pam.c, but if you reverse
that patch the 4.10 version of passwd-pam.c crashes, because of the changes to
subprocs.c and xscreensaver.h
Comment 23 Nathan G. Grennan 2003-08-09 15:50:14 EDT
Created attachment 93550 [details]
Patch containing the changes that causes the bug

If I reverse the above tiny patch against xscreensaver 4.11 the bug goes away,
and there doesn't seem to be any issues for me.

I believe the replacement of block_sigchld() with a call to sigtimedwait()
causes the hang.
Comment 24 Nathan G. Grennan 2003-08-09 16:11:57 EDT
Created attachment 93551 [details]
Removes timeout.tv_nsec = 1;

The above patch fixes the hang issue while still using sigtimedwait()

I noticed the same code is repeated farther down in the same file. The only
difference was "timeout.tv_nsec = 1;". So I removed it and recompiled
xscreensaver. The resulting xscreensaver doesn't hang.
Comment 25 Bill Nottingham 2003-08-21 15:27:32 EDT
Yup, this will be fixed in 4.12-1, which I hope to get to building in the next
day or two.
Comment 26 Bill Nottingham 2003-08-21 15:27:42 EDT
*** Bug 102840 has been marked as a duplicate of this bug. ***
Comment 27 Bill Nottingham 2003-08-27 12:30:33 EDT
*** Bug 103195 has been marked as a duplicate of this bug. ***
Comment 28 Bill Nottingham 2003-08-27 18:03:48 EDT
Fixed in 4.12-1.

Note You need to log in before you can comment on or make changes to this bug.