Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 180542
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Desktop Misc. Team <desktop-misc@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Olaf Walkowiak <olaf@walkowiak.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
xscreensaver_passwd_window_fix.patch xscreensaver segfault fix patch Andrea Luzzardi 2007-06-05 21:13 0000 185 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 180542 depends on: Show dependency tree
Bug 180542 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-06-01 11:51 0000
When I use pam_usb in /etc/system.auth, xscreensaver segfault whens I unlock
the display.




Reproducible: Always

Steps to Reproduce:
1. Add pam_usb to /etc/pam.d/system.auth
2. activate xscreensaver
3. move the mouse, press a key or whatever

Actual Results:  
xscreensaver segfaults

Expected Results:  
xscreensaver keeps running

This does not happen without pam_usb. Login aso. works perfectly with pam_usb

------- Comment #1 From Olaf Walkowiak 2007-06-01 11:53:52 0000 -------
This only happens when the usb_stick is inserted.

If not, xscreensavers password dialog appears.

------- Comment #2 From Jakub Moc (RETIRED) 2007-06-01 12:39:32 0000 -------
Not here; reopen with emerge -pv xscreensaver and emerge --info output and a
backtrace attached...

http://www.gentoo.org/proj/en/qa/backtraces.xml

------- Comment #3 From Samuli Suominen 2007-06-01 12:41:51 0000 -------
emerge -pv pam as well might be useful. Follow
http://www.gentoo.org/proj/en/qa/backtraces.xml if you need to.

------- Comment #4 From Olaf Walkowiak 2007-06-01 13:04:23 0000 -------
 emerge --info
Portage 2.1.2.7 (default-linux/x86/2006.1/desktop, gcc-4.1.2, glibc-2.5-r3,
2.6.21-gentoo-r2 i686)
=================================================================
System uname: 2.6.21-gentoo-r2 i686 Intel(R) Core(TM)2 CPU          6400  @
2.13GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Fri, 01 Jun 2007 11:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/
/etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo
/etc/texmf/web2c"
CXXFLAGS="-O2 -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://85.25.128.62
ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://ftp.gentoo.mesh-solutions.com/gentoo/
http://212.219.56.133/sites/www.ibiblio.org/gentoo/"
LANG="de_DE.UTF-8"
LINGUAS="de ru fr en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X Xaw3d acpi alsa apache2 arts bash-completion berkdb bitmap-fonts
bluetooth branding bzip2 cairo cddb cdparanoia cdr cli cracklib crypt cups curl
dbus dga dri dts dv dvd dvdr dvdread eds emacs emboss encode esd evolution exif
fam fame ffmpeg fftw firefox flac fontconfig fortran freetype gdbm gif gimp
gnome gphoto2 gpm gstreamer gtk gtkhtml hal iconv imagemagick imlib ipv6 irda
isdnlog jack java jpeg jpeg2k kde kerberos lame latex lcms ldap libg++
libnotify live logrotate lua lzo mad midi mikmod mjpeg mmx mmxext mng mp3 mpeg
mudflap musepack music musicbrainz mysql ncurses network nfs nls nptl nptlonly
nsplugin objc odbc offensive ogg openal openexr opengl openmp oss pam pcre pdf
perl png portaudio povray ppds pppd python qt3 qt3support qt4 quicktime
readline real reflection rtc samba scanner sdl session sms sndfile sound speex
spell spl sse sse2 ssl svg tcpd tetex theora tiff truetype truetype-fonts
type1-fonts unicode usb utempter v4l v4l2 vcd vidix vorbis win32codecs wmf x86
xanim xinerama xinetd xml xorg xpm xprint xscreensaver xv xvid xvmc zlib"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1
emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m
maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route
share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev"
KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001
mtxorb ncurses text" LINGUAS="de ru fr en" USERLAND="GNU" VIDEO_CARDS="fglrx"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS,
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #5 From Olaf Walkowiak 2007-06-01 13:04:50 0000 -------
 emerge -pv xscreensaver

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] x11-misc/xscreensaver-5.02  USE="gnome insecure-savers jpeg
offensive opengl pam xinerama -new-login" 0 kB 

Total: 1 package (1 reinstall), Size of downloads: 0 kB

------- Comment #6 From Olaf Walkowiak 2007-06-01 13:05:35 0000 -------
emerge -pv pam

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-libs/pam-0.78-r5  USE="berkdb -nis -pam_chroot -pam_console
-pam_timestamp -pwdb (-selinux)" 6,347 kB 

Total: 1 package (1 reinstall), Size of downloads: 6,347 kB

------- Comment #7 From Jakub Moc (RETIRED) 2007-06-01 14:21:17 0000 -------
We really need the backtrace; attach it please.

------- Comment #8 From Olaf Walkowiak 2007-06-04 07:06:27 0000 -------
gdb backtrace:

Core was generated by `xscreensaver'.
Program terminated with signal 11, Segmentation fault.
#0  0xb7f89410 in __kernel_vsyscall ()

Thread 1 (process 27579):
#0  0xb7f89410 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7c91a26 in kill () from /lib/libc.so.6
No symbol table info available.
#2  0x080537d9 in restore_real_vroot_handler (sig=11) at windows.c:728
        si = (saver_info *) 0x6bbb
#3  <signal handler called>
No symbol table info available.
#4  auth_finished_cb (si=0xbf9f38b4) at lock.c:1251
No locals.
#5  0x08064975 in xss_authenticate (si=0xbf9f38b4, verbose_p=0) at passwd.c:235
        i = 0
        j = 1
#6  0x0805f9c1 in unlock_p (si=0xbf9f38b4) at lock.c:2089
        p = (saver_preferences *) 0xbf9f38b8
#7  0x0804ea29 in main (argc=134737968, argv=0xbf9f3c44) at xscreensaver.c:1312
        fd0 = <value optimized out>
        fd1 = <value optimized out>
        fd2 = <value optimized out>
        shell = <value optimized out>
        the_si = {version = 0x807f030 "5.02", prefs = {db = 0x8089998,
init_file_date = 1180690580, verbose_p = 0, timestamp_p = 1, capture_stderr_p =
0, ignore_uninstalled_p = 0, debug_p = 0, xsync_p = 0, lock_p = 1, fade_p = 1,
unfade_p = 1, fade_seconds = 3000, fade_ticks = 20, splash_p = 0, 
    install_cmap_p = 1, screenhacks = 0x808f358, screenhacks_count = 269, mode
= ONE_HACK, selected_hack = 241, nice_inferior = 10, inferior_memory_limit = 0,
initial_delay = 0, splash_duration = 5000, timeout = 300000, lock_timeout =
600000, cycle = 600000, passwd_timeout = 30000, 
    pointer_timeout = 5000, notice_events_timeout = 30000, watchdog_timeout =
57000, pointer_hysteresis = 10, dpms_enabled_p = 0, dpms_standby = 7200000,
dpms_suspend = 7800000, dpms_off = 8400000, grab_desktop_p = 0, grab_video_p =
0, random_image_p = 1, 
    image_directory = 0x808f1b8 "/home/olaf/privat/bilder/screensaver", tmode =
TEXT_URL, text_literal = 0x808e8c8 "Gentoo Linux", text_file = 0x808e8e0
"/etc/gentoo-release", text_program = 0x808e900 "/usr/bin/fortune", text_url =
0x808ea30 "http://www.spiegel.de/schlagzeilen/rss/index.xml", 
    use_xidle_extension = 1, use_mit_saver_extension = 0,
use_sgi_saver_extension = 1, use_proc_interrupts = 1,
getviewport_full_of_lies_p = 0, shell = 0x8089988 "/bin/sh", demo_command =
0x808e918 "xscreensaver-demo", prefs_command = 0x808e930 "xscreensaver-demo
-prefs", 
    help_url = 0x808e950 "http://www.jwz.org/xscreensaver/man.html",
load_url_command = 0x808e980 "gnome-open '%s'", new_login_command = 0x0},
nscreens = 1, screens = 0x8091368, default_screen = 0x8091368, app = 0x80840d8,
dpy = 0x8084b68, xinerama_p = 0, using_xidle_extension = 0, 
  using_mit_saver_extension = 0, using_sgi_saver_extension = 0,
using_proc_interrupts = 1, randr_event_number = 115, randr_error_number = 184,
screen_blanked_p = 1, mouse_grab_window = 121, keyboard_grab_window = 121,
mouse_grab_screen = 0, keyboard_grab_screen = 0, fading_possible_p = 1, 
  throttled_p = 0, blank_time = 1180940721, locked_p = 1, dbox_up_p = 1,
locking_disabled_p = 0, nolock_reason = 0x0, orig_uid = 0x80816c8 "olaf/olaf
(1001/1001)", uid_message = 0x0, dangerous_uid_p = 0, passwd_dialog = 0,
pw_data = 0x0, unlock_failures = 0, unlock_typeahead = 0x0, 
  user = 0x8081868 "olaf", cached_passwd = 0x0, unlock_state = ul_success,
unlock_cb = 0x8063c90 <gui_auth_conv>, auth_finished_cb = 0x8063300
<auth_finished_cb>, demoing_p = 0, splash_dialog = 0, sp_data = 0x0, lock_id =
0, cycle_id = 134835672, timer_id = 0, watchdog_id = 134835640, 
  check_pointer_timer_id = 0, de_race_id = 0, de_race_ticks = 0,
last_activity_time = 1180940716, last_wall_clock_time = 0, last_activity_screen
= 0x8091368, emergency_lock_p = 0, selection_mode = 0, stderr_popup_timer = 0}
        spasswd = <value optimized out>
        i = <value optimized out>

------- Comment #9 From Jakub Moc (RETIRED) 2007-06-04 07:11:12 0000 -------
Reopen.

------- Comment #10 From Maarten Billemont 2007-06-05 13:05:48 0000 -------
Confirmed.

Packages:
---------
[ebuild   R   ] sys-libs/pam-0.99.7.1  USE="nls vim-syntax (-selinux)"
[ebuild   R   ] x11-misc/xscreensaver-5.02-r1  USE="gnome insecure-savers jpeg
offensive opengl pam xinerama -new-login"
[ebuild   R   ] sys-auth/pam_usb-0.4.1


GDB Backtrace of xscreensaver:
------------------------------
Program received signal SIGSEGV, Segmentation fault.
auth_finished_cb (si=0xafc642a0) at lock.c:1251
1251    lock.c: No such file or directory.
        in lock.c
(gdb) bt
#0  auth_finished_cb (si=0xafc642a0) at lock.c:1251
#1  0x0806a2c7 in xss_authenticate (si=0xafc642a0, verbose_p=0) at passwd.c:235
#2  0x0806451f in unlock_p (si=0xafc642a0) at lock.c:2089
#3  0x0804f85e in main (argc=Cannot access memory at address 0x1
) at xscreensaver.c:1312
#4  0x494f486f in __libc_start_main () from /lib/libc.so.6


Emerge --info:
--------------
Portage 2.1.2.9 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.5-r3, 2.6.21-ck2
i686)
=================================================================
System uname: 2.6.21-ck2 i686 AMD Sempron(tm) Processor 3100+
Gentoo Base System release 1.12.10
Timestamp of tree: Sat, 02 Jun 2007 02:50:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[enabled]
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe -g -ftracer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild
/etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon-xp -O3 -pipe -g -ftracer -fvisibility-inlines-hidden"
DISTDIR="/var/tmp/portage/distfiles"
EMERGE_DEFAULT_OPTS=""
FEATURES="ccache distcc distlocks installsources metadata-transfer noinfo
sandbox sfperms splitdebug strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/
http://mirror.datapipe.net/gentoo http://gentoo.mirrors.tds.net/gentoo
http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/
http://adelie.polymtl.ca/ ftp://gentoo.inode.at/source/
http://gentoo.osuosl.org/distfiles/"
LANG="en_CA.UTF-8"
LC_ALL="en_CA.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_CA en_GB en en_US nl_BE nl nl_NL"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/xeffects /usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex 3dnowext X a52 aac aalib acl acpi alsa amr ao asf
bash-completion berkdb bitmap-fonts bzip2 cairo caps clamav cli cracklib crypt
cscope cups curl dbus directfb divx doc dri dvd dvdread esd fam fbcon ffmpeg
fortran gdbm gif glitz glut gmp gnome gnutls gphoto2 gpm gstreamer gtk gtk2 hal
iconv ieee1394 imagemagick imlib ipv6 isdnlog java jpeg kde kdeenablefinal
kdehiddenvisibility kerberos libcaca libg++ lm_sensors mad midi mikmod mmx mmx2
mmxext mng mp3 mp4 mpeg mudflap ncurses newspr nls no-old-linux nptl nptlonly
nsplugin offensive ogg opengl openmp pam pcre pdf perl pertty pic png ppds pppd
python qt-copy qt3 qt4 quicktime readline real reflection rtc samba sasl sdl
session skey slang speex spell spl sqlite sqlite3 sse sse2 ssl svg sysfs tcpd
tga threads tiff timidity truetype truetype-fonts type1-fonts unicode urandom
utempter vim vim-syntax vorbis win32codecs x86 xcb xcomposite xinerama xml xorg
xosd xpm xprint xrandr xscreensaver xv xvid xvmc zlib" ALSA_CARDS="intel8x0"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route
share shm softvol" ELIBC="glibc" INPUT_DEVICES="linux keyboard mouse evdev"
KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001
mtxorb ncurses text" LINGUAS="en_CA en_GB en en_US nl_BE nl nl_NL"
USERLAND="GNU" VIDEO_CARDS="vesa fbdev nvidia nv"
Unset:  CTARGET, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS,
PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #11 From Andrea Luzzardi 2007-06-05 13:13:57 0000 -------
Please post the relevant part of your /var/log/auth.log

------- Comment #12 From Olaf Walkowiak 2007-06-05 13:30:26 0000 -------

Jun  5 15:29:03 [pam_usb] pam_usb v0.4.1_
Jun  5 15:29:03 [pam_usb] Authentication request for user "olaf"
(xscreensaver)_
Jun  5 15:29:03 [pam_usb] Device "cruzer-titanium" is connected (good)._
Jun  5 15:29:03 [pam_usb] Access granted._

------- Comment #13 From Andrea Luzzardi 2007-06-05 21:12:04 0000 -------
The problem is that xscreensaver checks if it's okay to unblank the screen
in its mainloop (which runs everytime an event occurs, such as a mouse
movement,
key press, etc).

If the authentication goes through, xscreensaver assumes it's because the user
entered a correct password into the password dialog and calls
destroy_passwd_window() to destroy the window.

As there was no password dialog, destroy_passwd_window() attempts to deference
a NULL pointer (pw_data), hence the segfault.

I will join a patch right away to fix the issue.
I think it should be forwarded upstream as the problem is not pam_usb related,
it will happen with any PAM module not
requiring user interaction.

------- Comment #14 From Andrea Luzzardi 2007-06-05 21:13:11 0000 -------
Created an attachment (id=121281) [details]
xscreensaver segfault fix

------- Comment #15 From Samuli Suominen 2007-06-06 14:35:50 0000 -------
Thanks Andrea.

Has anyone else tested attached patch yet? Please do.

------- Comment #16 From Maarten Billemont 2007-06-06 15:00:29 0000 -------
Patch fixes problems, confirmed.

------- Comment #17 From Samuli Suominen 2007-06-06 19:16:29 0000 -------
Committed it as xscreensaver-5.02-r2 and mailed it to upstream.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug