Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 183225 - x11-misc/xscreensaver-5.02 segfaults (sys-libs/pam)
Summary: x11-misc/xscreensaver-5.02 segfaults (sys-libs/pam)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-26 09:27 UTC by Jon Bramley
Modified: 2007-11-01 17:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Logs from xscreensaver (xscreensaver.log,46.77 KB, text/plain)
2007-06-26 09:31 UTC, Jon Bramley
Details
emerge --info xscreensaver (xscreensaver_emerge_info,3.45 KB, text/plain)
2007-06-26 12:55 UTC, Jon Bramley
Details
xscreensaver output (xscreensaver.log,13.34 KB, text/plain)
2007-07-04 13:17 UTC, Jon Bramley
Details
emerge --info xscreensaver (xscreensaver_emerge_info,3.46 KB, text/plain)
2007-07-04 13:21 UTC, Jon Bramley
Details
GDB output from seg fault (gdb.out.jb,23.91 KB, text/plain)
2007-07-11 16:17 UTC, Jon Bramley
Details
Backtrace from seg fault (gdb.xscreensaver.out,455.79 KB, text/plain)
2007-07-13 12:59 UTC, Jon Bramley
Details
Another gdb output from seg fault (gdb.jb,44.29 KB, text/plain)
2007-07-17 09:52 UTC, Jon Bramley
Details
Back Trace from Seg Fault with debug symbols (gdb.yay.the.symbols.are.there,74.55 KB, text/plain)
2007-07-18 09:55 UTC, Jon Bramley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Bramley 2007-06-26 09:27:02 UTC
I keep having to restart xscreensaver. I leave the machine and it is working - and then I come back and the process has stopped. If I restart it and trigger a screensaver, it works fine again.

Reproducible: Sometimes

Steps to Reproduce:
1.Leave xscreensaver running
2.
3.
Comment 1 Jon Bramley 2007-06-26 09:31:52 UTC
Created attachment 123090 [details]
Logs from xscreensaver

Started xscreensaver going last night when I left work, piping stdout and stderr into this file. Got in this morning and it had stopped with a seg. fault. This is the entire log file.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-06-26 10:13:49 UTC
emerge --info and xscreensaver version missing. Also, your opengl looks pretty messed you, did you try 'eselect opengl set <xorg-x11|nvidia|ati>' ?
Comment 3 Jon Bramley 2007-06-26 12:55:02 UTC
Created attachment 123107 [details]
emerge --info xscreensaver

emerge --info xscreensaver
Comment 4 Jon Bramley 2007-06-26 12:56:32 UTC
I've never heard of those opengl options before, although:

509 13:52 $ eselect opengl list
Available OpenGL implementations:
  [1]   xorg-x11 *

So it looks like I only have one option, and it's chosen anyway. I'm running the Matrox MGA550 drivers.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2007-06-26 13:01:51 UTC
Xlib:  extension "GLX" missing on display ":0.0"

It looks your OpenGL setup is incomplete but still you have built xscreensaver with USE="opengl"? 

emerge -pv xscreensaver
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2007-06-26 13:05:09 UTC
And you said it stopped with seg. fault? We need a backtrace [1] of that. But don't waste your time with it until you have either fixed your OpenGL setup (get a working GLX extension) or built xscreensaver with USE="-opengl".

http://www.gentoo.org/proj/en/qa/backtraces.xml
Comment 7 Jon Bramley 2007-07-04 13:17:38 UTC
Created attachment 123872 [details]
xscreensaver output

I'm now running a version of xscreensaver with the "-opengl" use flag. I've attached a new log file. It appears to crash after I have entered my password; something to do with pam?
Comment 8 Jon Bramley 2007-07-04 13:21:24 UTC
Created attachment 123873 [details]
emerge --info xscreensaver

And the new emerge --info.
Comment 9 Jon Bramley 2007-07-04 13:22:31 UTC
Attached the new info now that I'm not using openGl in xscreensaver.
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2007-07-04 13:37:14 UTC
How about that backtrace[1] using gdb from mentioned Segmentation Fault?

[1] http://www.gentoo.org/proj/en/qa/backtraces.xml
Comment 11 Jon Bramley 2007-07-04 14:41:24 UTC
Hey,

I just tried to remerge xscreensaver with the "-ggdb" use flag. I did this by running:

export FEATURES=nostrip
export CFLAGS="-march=prescott -O2 -ggdb"
export CXXFLAGS="${CFLAGS}"

but emerge --info xscreensaver reports:

=================================================================
                        Package Settings
=================================================================
x11-misc/xscreensaver-5.02-r2 was built with the following:
CFLAGS="-O2 -U__VEC__ -fomit-frame-pointer -march=prescott -pipe"
CXXFLAGS="-O2 -U__VEC__ -fomit-frame-pointer -march=prescott -pipe"

I thought it was enough to have the CFLAGS set in your env. I don't really want to set the new CFLAGS in make.conf, although I could just do it temporarily.
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2007-07-09 17:59:25 UTC
ping?

FEATURES="nostrip" CFLAGS="-march=athlon-xp -O2 -pipe -g" emerge xscreensaver works for me,

<snip>
i686-pc-linux-gnu-gcc -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes -std=c89 -U__STRICT_ANSI__ -c -I. -I..  -DPNG_NO_MMX_CODE -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libxml2 -I/usr/include/libglade-2.0   -I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DHAVE_CONFIG_H -march=athlon-xp -O2 -pipe -g -U__VEC__ -I/usr/include visual.c
</snip>
Comment 13 Jon Bramley 2007-07-11 16:17:24 UTC
Created attachment 124579 [details]
GDB output from seg fault

GDB log attached. Not sure if it has worked properly, I did an update world yesterday so its possible that xscreensaver has been remerged without debugging again :(

Still, now every time it crashes I lose the ability to type anything so it basically humps my entire x session. Not sure if that's anything to do with gdb.
Comment 14 Jamie Zawinski 2007-07-11 18:02:53 UTC
If you quit gdb and kill that xscreensaver process, your X session should come back; things are wedged because gdb has halted xscreensaver with the mouse grabbed.  (It helps to run gdb from another virtual terminal, not from a terminal window in your X session.)

I need to see a backtrace ("bt") and then go up the stack ("up") and show the locals of a few frames ("i loc").

(And you know this but: make sure you have a -g build first!)
Comment 15 Jon Bramley 2007-07-13 12:59:09 UTC
Created attachment 124745 [details]
Backtrace from seg fault

Here it is. Strangely, in order to get my keyboard to work again, I had to quit GDB, start xscreensaver, and then run xscreensaver-command -restart.

Hope that is what you need. "i loc" didn't seem to give me anything.
Comment 16 Jamie Zawinski 2007-07-13 18:01:27 UTC
You don't have debug info in that build, or you have bogus debug info.  If the backtrace doesn't have "main" at the end of the list, you've got nonsense.

I don't know how one goes about getting proper debug info in an emerge-installed program; personally, I'd just build it from source...
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2007-07-13 18:08:43 UTC
(In reply to comment #16)
> I don't know how one goes about getting proper debug info in an
> emerge-installed program; personally, I'd just build it from source...

Portage builds it from source, and if he has FEATURES="nostrip" enabled nothing gets stripped.. and has CFLAGS="-g" it gets added in. So, personally I would just re-read our getting a backtrace guide to get a proper backtrace.
Comment 18 Jon Bramley 2007-07-17 09:52:40 UTC
Created attachment 125150 [details]
Another gdb output from seg fault

Ok, for some reason this still didn't work. I've attached the output from gdb again, but the backtrace looks the same as before. Doesn't make much sense, since I built xscreensaver as root with the command:

FEATURES="nostrip" CFLAGS="-march=prescott -O2 -pipe -g" emerge -vat xscreensaver

and "emerge --info xscreensaver" gives me:

<snip>
=================================================================
                        Package Settings
=================================================================
x11-misc/xscreensaver-5.02-r2 was built with the following:
CFLAGS="-O2 -U__VEC__ -g -march=prescott -pipe"
CXXFLAGS="-O2 -U__VEC__ -fomit-frame-pointer -march=prescott -pipe"
</snip>

so the debug info should definitely be there. "which xscreensaver" returns:

/usr/bin/xscreensaver

so it should be running the right one. Any ideas anyone?
Comment 19 Jamie Zawinski 2007-07-17 10:26:56 UTC
If you ^C gdb before the crash (when things are going normally) do you get a sensible backtrace?

If that's the case, then whatever bug you are hitting is smashing the stack.  Ugh.

If not, then you still don't have the right debug info.
Comment 20 Jon Bramley 2007-07-17 10:37:55 UTC
Just started "gdb xscreensaver", ran it and ^C'd straight away:

Program received signal SIGINT, Interrupt.
0xb7fd6410 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fd6410 in __kernel_vsyscall ()
#1  0xb7d9712d in poll () from /lib/libc.so.6
#2  0xb7f5c9f6 in ?? () from /usr/lib/libXt.so.6
#3  0x08095a48 in ?? ()
#4  0x00000002 in ?? ()
#5  0x00000f9d in ?? ()
#6  0xb7f4417f in XtMalloc () from /usr/lib/libXt.so.6
#7  0xb7f82af4 in ?? () from /usr/lib/libXt.so.6
#8  0xb7f5cfc8 in _XtWaitForSomething () from /usr/lib/libXt.so.6
#9  0x0807cbfd in stderr_buffer ()
#10 0x00000002 in ?? ()
#11 0x00000020 in ?? ()
#12 0x00a00005 in ?? ()
#13 0x08087ec8 in ?? ()
#14 0xbfac1024 in ?? ()
#15 0xbfac0f1c in ?? ()
#16 0x00000000 in ?? ()
(gdb) up
#1  0xb7d9712d in poll () from /lib/libc.so.6
(gdb) i loc
No symbol table info available.


Does that look more normal? Just noticed that the CXXFLAGS I built with has "-fomit-frame-pointer -pipe" and no "-g". The CFLAGS however is ok. I'll try again setting them both to the same options.
Comment 21 Jon Bramley 2007-07-17 11:07:45 UTC
Arrrrgggh. Still no joy. I recompiled with both CFLAGS and CXXFLAGS set:

FEATURES="nostrip" CFLAGS="-march=prescott -O2 -pipe -g" CXXFLAGS="-march=prescott -O2 -pipe -g" emerge -vat xscreensaver

<snip>
=================================================================
                        Package Settings
=================================================================
x11-misc/xscreensaver-5.02-r2 was built with the following:
CFLAGS="-O2 -U__VEC__ -g -march=prescott -pipe"
CXXFLAGS="-O2 -U__VEC__ -g -march=prescott -pipe"
</snip>

Still my backtrace is:

0xb7fb6410 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fb6410 in __kernel_vsyscall ()
#1  0xb7d7712d in poll () from /lib/libc.so.6
#2  0xb7f3c9f6 in ?? () from /usr/lib/libXt.so.6
#3  0x08095a48 in ?? ()
#4  0x00000002 in ?? ()
#5  0x00001387 in ?? ()
#6  0xb7f2417f in XtMalloc () from /usr/lib/libXt.so.6
#7  0xb7f62af4 in ?? () from /usr/lib/libXt.so.6
#8  0xb7f3cfc8 in _XtWaitForSomething () from /usr/lib/libXt.so.6
#9  0x08049915 in ?? ()
#10 0xb7e37ca0 in ?? () from /usr/lib/libX11.so.6
#11 0x08048f58 in ?? ()
#12 0x00000001 in ?? ()
#13 0xb7fd1fbc in ?? () from /lib/ld-linux.so.2
#14 0xbfb658c4 in ?? ()
#15 0xbfb657bc in ?? ()
#16 0x00b65858 in ?? ()
#17 0x00000001 in ?? ()
#18 0x08048f58 in ?? ()
#19 0x0001583c in ?? ()
#20 0xb7fd2824 in ?? ()
#21 0x0000000a in ?? ()
#22 0x00000000 in ?? ()

Don't really know what else to do!
Comment 22 Jonathan Smith (RETIRED) gentoo-dev 2007-07-17 14:22:44 UTC
you are probably missing symbols from libraries xscreensaver links to. run "ldd `which xscreensaver`" and recompile those things with nostrip and -g. notably, this will require recompiling libc with debugging symbols, which is a useful thing to have anyway...

as a side note, i'm about to put 5.03 in the tree. nothing in the changelog indicates it will fix your problem, but you might want to give it a try, just in case.
Comment 23 Jon Bramley 2007-07-18 09:55:17 UTC
Created attachment 125235 [details]
Back Trace from Seg Fault with debug symbols

Yay! That worked a treat. Had to recompile a bunch of libraries, but now I've got a full stack trace of the error.

Thanks.
Comment 24 Jamie Zawinski 2007-07-18 20:16:13 UTC
Ok!  Good news (for me...)  The bug is in libpam, not xscreensaver.
Comment 25 Samuli Suominen (RETIRED) gentoo-dev 2007-07-19 05:52:24 UTC
emerge -pv pam, please.
Comment 26 Jon Bramley 2007-07-19 08:54:05 UTC
566 09:44 $ 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)" 0 kB 

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

And in case it helps...

=================================================================
                        Package Settings
=================================================================
sys-libs/pam-0.78-r5 was built with the following:
CFLAGS="-I/tmp/portage/sys-libs/pam-0.78-r5/work/Linux-PAM-0.78/include -O2 -Wl,-L/tmp/portage/sys-libs/pam-0.78-r5/work/Linux-PAM-0.78/lib -g -march=prescott"
CXXFLAGS="-O2 -g -march=prescott"
Comment 27 Samuli Suominen (RETIRED) gentoo-dev 2007-10-28 15:05:51 UTC
(In reply to comment #26)
> [ebuild   R   ] sys-libs/pam-0.78-r5  USE="berkdb nis -pam_chroot -pam_console
> -pam_timestamp -pwdb (-selinux)" 0 kB 

sys-apps/pam-0.99.8.1-r1 is stable or going stable on all arches finally.

can you try with that one? and remember that all services, including xscreensaver needs to be restarted after upgrading.
Comment 28 Jon Bramley 2007-10-30 10:59:52 UTC
I'm afraid I no longer have this install of Gentoo and the problem does not happen on my new install (different machine).

Jon
Comment 29 Samuli Suominen (RETIRED) gentoo-dev 2007-11-01 17:21:20 UTC
I'm considering this fixed by pam upgrade or random foobar, then