Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2001 10:08:57 -0700 (PDT)
From:      David Marker <marker_d@yahoo.com>
To:        freebsd-stable@freebsd.org
Subject:   Gdm proplem on 4.4
Message-ID:  <20011015170857.68722.qmail@web14702.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
I'll have to preface by appologizing for not
having all my data at hand (uname and dmesg
output unavailable since I don't have a
connection at home).

I have installed FreeBSD 4.4 from downloaded ISO
images. I finally got everything just the way
I like it, but gdm did not work, the following
command brought up X but not gdmlogin:
	# /usr/X11R6/bin/gdm -nodaemon

When I check with "ps", I find that one of gdm's
child processes is using over 90% of the CPU. So I
ran ktrace to find out what gdm is doing. Turns
out not to be very helpful because the PID that
runs away calls stat() gets a good return and then
never call another system call again.

I attached gdb to it to investigate and found
gdm is stuck in setenv() which surprises me.
I look at /usr/src/lib/libc/stdlib/setenv.c
and am surprised more. In fact since its chewing
up most of my cpu I thought gdm must be in a
tight while loop.

The disassemly does not show that, it consistently
shows gdm is stopped on a comparison. Specifically
gdb showed gdm was trying to compare (%eax) to 0x3d
(which turns out to be the '=' ASCII character).

If you look at setenv.c the line that pops out
given this disassembly is:
	if (*value == '=')

Unfortunately I only had my ISO images and no
access to gdm source. But I did modify libc to
to find out the name that is trying to be set
which causes the problem: "GDM_TIMED_LOGIN_OK".
It calls it with a NULL pointer for value.
No matter how you change gdm.conf setenv() is
called for GDM_TIMED_LOGIN_OK with a NULL pointer
for value.

So there are a few issues:
	gdm should not be calling setenv() with
	value = NULL (possibly the GTK library
	should catch this).

	when gdm does call setenv improperly, the
	kernel should send gdm a SIGSEGV and gdm
	should dump core.
	I don't think the signal was blocked, ktrace
	never shows it being sent!

In a way this sounds related to the 8 January
post "SIGSEGV can be blocked!?".

You can work around this by changing setenv() in
libc to check if value is NULL and return if it
is (which is what I'm doing). But I think setenv()
is doing the right thing and a core should be
produced. The real solutions are in the kernel and
gdm (or possibly GTK).

Thanks
	-dave

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011015170857.68722.qmail>