Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 385525 - [gnome-overlay] gnome-base/gdm-3.2.0 crashes at startup with gnome-shell use flag when using sys-auth/pambase[mktemp]
Summary: [gnome-overlay] gnome-base/gdm-3.2.0 crashes at startup with gnome-shell use ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal critical (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gnome3.2
  Show dependency tree
 
Reported: 2011-10-03 17:45 UTC by Emmanuel Andry
Modified: 2011-10-26 21:03 UTC (History)
2 users (show)

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


Attachments
gdm greeter log (:0-greeter.log,23.57 KB, text/plain)
2011-10-03 17:48 UTC, Emmanuel Andry
Details
Emerge --info (emerge-info,6.64 KB, text/plain)
2011-10-03 18:55 UTC, Emmanuel Andry
Details
gdm greeter.log (greeter.log,56.99 KB, text/plain)
2011-10-04 13:06 UTC, Emmanuel Andry
Details
slave log (:0-slave.log,438 bytes, text/plain)
2011-10-05 18:11 UTC, Emmanuel Andry
Details
/var/log/messages (messages,29.19 KB, text/plain)
2011-10-06 20:48 UTC, Denny Reeh
Details
.xsession-errors file (xs,2.16 KB, text/plain)
2011-10-07 22:29 UTC, Allan Gottlieb
Details
new .xsession-errors file (xs-new,2.97 KB, text/plain)
2011-10-11 22:11 UTC, Allan Gottlieb
Details
abrt.log (abrt.log,22.20 KB, text/plain)
2011-10-12 18:28 UTC, Emmanuel Andry
Details
abrt gconf backtrace (backtrace,21.78 KB, text/plain)
2011-10-12 19:04 UTC, Emmanuel Andry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emmanuel Andry 2011-10-03 17:45:21 UTC
I don't know if gdm is really the culprit, but it crashes.
Can reproduce on 2 laptops. One upgrading from gnome 2.32 and the other from gnome 3.0

Reproducible: Always
Comment 1 Emmanuel Andry 2011-10-03 17:48:15 UTC
Created attachment 288701 [details]
gdm greeter log

Seems to be a lot of dbus errors. Maybe is it the cause.
Comment 2 Emmanuel Andry 2011-10-03 18:55:17 UTC
Created attachment 288711 [details]
Emerge --info
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-03 22:58:00 UTC
(In reply to comment #1)

> gnome-session[3703]: DEBUG(+): GdmSignalHandler: handling signal 15

This seems to be the key line. Something is sending a SIGTERM to gdm.

Two things you may want to look at:
1. Maybe the gnome-shell greeter is at fault; you can try building gdm with USE=-gnome-shell. However, I don't think this is likely because gnome-shell likes to print lots of errors if it fails.
2. Since you upgraded, perhaps there are some files in /var/lib/gdm that gdm-3.2.0 does not like. Try wiping out that directory:

# rm -rf /var/lib/gdm
# mkdir /var/lib/gdm
# chown gdm:gdm /var/lib/gdm
# chmod 750 /var/lib/gdm
Comment 4 Emmanuel Andry 2011-10-04 08:47:27 UTC
I will try this ASAP.
But this is strange that it occurs on my 2 laptops, and being the only one experiencing this...
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-04 08:51:59 UTC
Actually, I have a suspicion of what's going on.

Try adding the gdm user to the video group:
# usermod -G gdm,video gdm
Comment 6 Emmanuel Andry 2011-10-04 13:06:12 UTC
Created attachment 288761 [details]
gdm greeter.log

I think I send a log from Mageia !!
THis is the right log file
Comment 7 Emmanuel Andry 2011-10-04 13:07:36 UTC
Removing and recreating /var/lib/gdm didn't fix.
usermod -G gdm,video gdm did not fix.
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-05 00:38:01 UTC
Could you also attach the slave log (e.g. /var/log/gdm/:0-slave.log) from the failed gdm startup?
Comment 9 Emmanuel Andry 2011-10-05 18:11:40 UTC
Created attachment 288885 [details]
slave log
Comment 10 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-05 18:41:09 UTC
And I am out of ideas :/

You should file a bug at bugzilla.gnome.org (please add gnome@gentoo.org to the bug's CC list), hopefully upstream developers will be able to help you better.
Comment 11 Emmanuel Andry 2011-10-05 19:04:43 UTC
OK !
By the way it work with USE="-gnome-shell"
Comment 12 Allan Gottlieb 2011-10-06 02:56:30 UTC
(In reply to comment #10)
> You should file a bug at bugzilla.gnome.org (please add gnome@gentoo.org to the
> bug's CC list), hopefully upstream developers will be able to help you better.

Please reply to *this* bug with the new bugzilla.gnome.org bug #.  I have the same problem as you and would want to follow the bug in its new home.
Comment 13 Denny Reeh 2011-10-06 20:48:22 UTC
same problem for me, after upgrading from gnome 3.0 to 3.2, gdm crashes at startup.

there are also some strange lines in /var/log/messages (attached), for exampl see lines 171 and 172. any ideas about that?
Comment 14 Denny Reeh 2011-10-06 20:48:44 UTC
Created attachment 289029 [details]
/var/log/messages
Comment 15 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-07 03:01:52 UTC
(In reply to comment #13)
> there are also some strange lines in /var/log/messages (attached), for exampl
> see lines 171 and 172. any ideas about that?

Line 172 is a segfault in gnome-shell. It would be extemely useful if you could provide a bakctrace for that segfault (see http://www.gentoo.org/proj/en/qa/backtraces.xml and https://live.gnome.org/GnomeShell/Debugging).
Comment 16 Denny Reeh 2011-10-07 07:12:08 UTC
ok. i've tried this (both - with one and two computers), but always gnome-shell says "unable to open x display". is there any trick?

i've started kde and started "gnome-shell --replace" there.

it fails with:


** (gnome-shell:12200): CRITICAL **: dbus_g_proxy_new_for_name: assertion `connection != NULL' failed

** (gnome-shell:12200): CRITICAL **: dbus_g_proxy_call: assertion `DBUS_IS_G_PROXY (proxy)' failed
Speicherzugriffsfehler
Comment 17 Allan Gottlieb 2011-10-07 22:23:51 UTC
When I reverted to gdm-3.0.4-r2, all was well for a few days.  Now gdm succeeds and we get the greeter, but logging in again gets the "oops there is problem" msg and gnome-shell is killed.  I will attach .xsession-errors in a minute.
Comment 18 Allan Gottlieb 2011-10-07 22:29:54 UTC
Created attachment 289165 [details]
.xsession-errors file
Comment 19 odium 2011-10-11 13:53:01 UTC
I encountered this issue and resolved it by editing the xdm init script's depend function to load dbus before xdm. I'll append a snippet here. 
/etc/init.d/xdm 
depend() {
	need localmount xdm-setup

	# this should start as early as possible
	# we can't do 'before *' as that breaks it
	# (#139824) Start after ypbind and autofs for network authentication
	# (#145219 #180163) Could use lirc mouse as input device
	# (#70689 comment #92) Start after consolefont to avoid display corruption
	# (#291269) Start after quota, since some dm need readable home
	after bootmisc consolefont modules netmount
	after readahead-list ypbind autofs openvpn gpm lircmd
	after quota dbus
	before alsasound

	# Start before X
	use consolekit xfs
}
I added 'dbus' after the 'after quota' to instruct the system to load dbus before loading xdm, this did the trick.
Comment 20 Denny Reeh 2011-10-11 14:56:35 UTC
xdm changed, but without any changes.
Comment 21 Allan Gottlieb 2011-10-11 22:06:30 UTC
(In reply to comment #19)
> I encountered this issue and resolved it by editing the xdm init script's
> depend function to load dbus before xdm. I'll append a snippet here. 

> I added 'dbus' after the 'after quota' to instruct the system to load dbus
> before loading xdm, this did the trick.

Thanks for the tip but it didn't help me.  I put this in init.d/xdm

	# changed based on patch in gentoo bug #385525
	# after quota
	after quota dbus

but gdm still crashes.

For me, gnome 3.2 has been quite a regression over 3.0.
gdm-3.2.0-r1 crashes and when I revert to the 3.0 gdm, I get to the login screen but then gnome-shell crashes (described above, today's .xsession-errors will be attached in a minute).  I tried to downgrade to gnome-shell-3.0.2-r1, but that needs libgnome-menu, which is not (now) in portage/layman.
Comment 22 Allan Gottlieb 2011-10-11 22:11:14 UTC
Created attachment 289623 [details]
new .xsession-errors file
Comment 23 Emmanuel Andry 2011-10-12 09:46:58 UTC
Maybe the gnome-shell use flag should be disabled by default. It will allow at last to have a working gdm for everybody... Until the issue is fixed ! 
(didn't have time to report this bug upstream, if someone can, it would be great)
Comment 24 Denny Reeh 2011-10-12 11:33:51 UTC
gdm with USE="-gnome-shell" seems to work. but after login, gnome-shell is crashed again with "oops there is problem".
Comment 25 Allan Gottlieb 2011-10-12 16:14:34 UTC
(In reply to comment #23)
> Maybe the gnome-shell use flag should be disabled by default. It will allow at
> last to have a working gdm for everybody... Until the issue is fixed ! 
> (didn't have time to report this bug upstream, if someone can, it would be
> great)

I reported it to gnome as bug #661565 referencing our bug.
Comment 26 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-12 16:38:22 UTC
I have added a redhat tool to automatically detect and analyze segfaults to the overlay. I suspect it may be helpful in diagnosing this bug.

1. please re-emerge gnome-shell, clutter, cogl, gjs, spidermonkey, glib, and gobject-introspection with "-ggdb" in CFLAGS and "splitdebug" in FEATURES (see http://www.gentoo.org/proj/en/qa/backtraces.xml)

2. emerge app-admin/abrt from the overlay

3. /etc/init.d/abrt start

4. Try to start gnome with gnome-shell, see the "oops there is a problem" fail-whale face.

5. From a terminal or a console, run "abrt-cli list". You will see a list of reported crashes. Probably the most recent one will be gnome-shell listed as "@0".

6. Run "abrt-cli report @0" (or @1, etc., depending on how the most recent gnome-shell crash was listed).

7. When prompted, select "1" for local gnu debugger, "1" for collect .xsession-errors, and "2" for logger.

8. abrt-cli will launch your default console editor (nano, probably), and you will need to save the report file in the default location.

9. The end result will be /tmp/abrt.log. Please attach it to this bug :)

When you are done, you can remove /tmp/abrt.log or rename it so that future invocations of abrt-cli don't clutter the same log file with different crashes.
Comment 27 Emmanuel Andry 2011-10-12 18:28:52 UTC
Created attachment 289705 [details]
abrt.log

Surprisingly, gconf is the one crashing
Comment 28 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-12 18:45:57 UTC
(In reply to comment #27)
> Surprisingly, gconf is the one crashing

Very interesting!

Please rebuild gnome-base/gconf with "-ggdb" in CFLAGS and "splitdebug" in FEATURES, and try to get an abrt log that contains a good gdb backtrace.
Comment 29 Emmanuel Andry 2011-10-12 18:50:27 UTC
Already built with -ggdb
Comment 30 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-12 18:59:27 UTC
(In reply to comment #29)
> Already built with -ggdb

The problem is that the log you attached does not contain a backtrace; there is nothing under the "backtrace:" line.

If there is a backtrace file in /var/spool/abrt/ccpp-2011-10-12-20:10:53-5376 or ~/.abrt/spool/ccpp-2011-10-12-20:10:53-5376, please attach it. Otherwise, you may have to try the experiment again (abrt is not 100% reliable, unfortunately).
Comment 31 Emmanuel Andry 2011-10-12 19:04:48 UTC
Created attachment 289709 [details]
abrt gconf backtrace

Backtrace was generated, but not included in abrt.log
Comment 32 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-25 16:47:15 UTC
Emmanuel, are you using sys-auth/pambase with USE=mktemp? And if you are not, do you have sys-auth/pam_mktemp installed?
Comment 33 Emmanuel Andry 2011-10-25 16:52:53 UTC
Yes, I'm using sys-auth/pambase with USE=mktemp
Comment 34 Denny Reeh 2011-10-25 17:14:35 UTC
not for me. i'm not using pambase with mktemp.
Comment 35 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-25 17:25:40 UTC
(In reply to comment #34)
> not for me. i'm not using pambase with mktemp.

In that case your crash has a different underlying cause. Please use abrt to get a backtrace for the process that is crashing (see comments 26-31) and open a new bug.
Comment 36 Emmanuel Andry 2011-10-25 18:14:43 UTC
I confirm that removing the mktemp stuff allow the gnome-shell login work in gdm !
Comment 37 Gilles Dartiguelongue gentoo-dev 2011-10-25 21:47:50 UTC
FTR, it looks like the mktemp problem is related to pulseaudio not abiding to various environment variables which results in "permission denied" at various places which creates this problem in gdm.
Comment 38 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-25 23:45:20 UTC
(In reply to comment #37)
> FTR, it looks like the mktemp problem is related to pulseaudio not abiding to
> various environment variables which results in "permission denied" at various
> places which creates this problem in gdm.

I disagree. The problem is caused by pam_mktemp for some reason setting TMP and TMPDIR to /tmp/.private/nobody for the gdm-owned gnome-session process that then launches pulseaudio, gconf, and gnome-shell.

In other words, pulseaudio and gconf are correctly failing. The problem is figuring out why pam_mktemp is using "nobody" as the username even though gdm is calling pam_open_session() with "gdm" as PAM_USER.
Comment 39 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-26 21:03:37 UTC
Fixed in gdm-3.2.1.1-r1

> commit b5418f67c79febd5d4dab3815b2ff7a7545571f1
> Author: Alexandre Rostovtsev <tetromino@gentoo.org>
> Date:   Wed Oct 26 03:38:14 2011 -0400
> 
> gnome-base/gdm: drop hardcoded env patch (#385525)
> 
> The patch that prevented gdm from clobbering environment variables
> results in gdm clobbering variables set via pam. In particular, this
> badly breaks down when using sys-auth/pambase with USE=mktemp.
> 
> So drop the patch; setting a custom environment in gdm can be done
> using pam_env.
> 
> Fixes bug #385525, reported by Emmanuel Andry <eandry@free.fr>.
> 
> Also, use a better gdm-welcome pam file.