gdm crashes when it encounters a .desktop session file it can't read

Bug #542345 reported by Dylan McCall
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdm
Unknown
Medium
gdm (Ubuntu)
Fix Released
Low
Unassigned
Lucid
Fix Released
Low
Didier Roche-Tolomelli

Bug Description

Binary package hint: gdm

I noticed this via bug #542338, but I am filing it separately since I believe it is a different issue.

Right now, if I select the Sugar session to log in with in GDM, it crashes horribly. This is simply upon choosing the Sugar option in the combo box, and that is enough to kill it.
(Naturally, gdm gets restarted, but it simply vanishes without warning and, naturally, it's impossible to log in to a Sugar session). The following information appears in the system log:

Mar 19 17:30:45 dylan-netbook gdm-session-worker[1439]: GLib-GObject-CRITICAL: g_value_get_boolean: assertion `G_VALUE_HOLDS_BOOLEAN (value)' failed
Mar 19 17:30:49 dylan-netbook gdm-simple-slave[933]: CRITICAL: Cannot read specified session file: sugar.desktop
Mar 19 17:30:49 dylan-netbook gdm-binary[767]: WARNING: GdmDisplay: display lasted 0.112974 seconds
Mar 19 17:30:49 dylan-netbook gdm-simple-greeter[1477]: WARNING: error opening connection: Failed to connect to socket /tmp/gdm-greeter-CveyZvQE: Connection refused

It doesn't need to perform a miracle and parse the session file, but GDM probably shouldn't crash here :)

ProblemType: Bug
Architecture: i386
Date: Fri Mar 19 18:01:27 2010
DistroRelease: Ubuntu 10.04
NonfreeKernelModules: wl
Package: gdm 2.29.92-0ubuntu3
ProcEnviron:
 LANG=en_CA.utf8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.32-16.25-generic
SourcePackage: gdm
Uname: Linux 2.6.32-16-generic i686

Revision history for this message
Dylan McCall (dylanmccall) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report and sending it to GNOME

Changed in gdm (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in gdm:
status: Unknown → New
Changed in gdm (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

why did you change the status there?

Changed in gdm (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Dylan McCall (dylanmccall) wrote :

Brian Cameron (one of the GDM guys) says this issue is not happening for him with stock upstream gdm!

Ubuntu's GDM is currently at version 2.30.0, but upstream's latest stable release is 2.30.2 [1]. It fixes a fair assortment of issues, so upgrading to it could magically cure this bug (among others).
[1] http://ftp.acc.umu.se/pub/gnome/sources/gdm/2.30/

If not, the problem has to be one of the myriads of patches we have downstream! The crash will be worked around by the latest sugar-session in Lucid, but you can replicate it by creating a new session file at /usr/share/xsessions/problem.desktop, with these contents:

[Desktop Entry]
Encoding=UTF-8
Name=Problem
GenericName=Problem
Exec=xterm
Type=Application

There is some really awesome analysis in the upstream bug report[2], so if you want to work on this bug, I recommend starting there :)
[2] https://bugzilla.gnome.org/show_bug.cgi?id=615462

Revision history for this message
Sebastien Bacher (seb128) wrote :

sorry the comment crossed there, 2.30.2 has been in lucid-proposed for some weeks but add new crashers and doesn't solve some of the bugs it was supposed to fix, see bug #579044 for example

Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue seems to be due to the failsafe change from https://bugzilla.gnome.org/show_bug.cgi?id=607703, Didier you wrote the change could you look at the issue? It should not exit when no comment can be read but deal with it nicely rather

Changed in gdm (Ubuntu Lucid):
assignee: nobody → Didier Roche (didrocks)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

"+ res = get_session_comment_for_file (filename, &comment);
+ if (! res) {
+ g_critical ("Cannot read specified session file: %s", filename);
+ g_free (filename);
+ exit (1);
+ }
"

it seems that should return and not exit in such cases

Revision history for this message
Dylan McCall (dylanmccall) wrote :

Hi Sebastien!

Sorry about changing the bug status. That was just a silly accident when I was wondering why the upstream bug watcher still said New :)
(I tinker mercilessly with anything that uses Javascript)

I installed gdm from lucid-proposed, which gives me 2.30.2.is.2.30.0-0ubuntu1

Restarted my computer to be sure but the crash still occurred, as before, with the session file I described.

Revision history for this message
Sebastien Bacher (seb128) wrote :

right, the bug is likely the one I indicated before, Didier will try to get it fixed in the next upload, the version in lucid-proposed got downgraded due to issue in 2.30.2, we want to try to get a set of easy fixes in lucid-updates before trying to get a new version now

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 2.30.2-0ubuntu3

---------------
gdm (2.30.2-0ubuntu3) maverick; urgency=low

  * debian/patches/30_don_t_save_failsafe_session.patch: (LP: #542345)
    - return FALSE instead of exiting on .desktop file without a comment
 -- Didier Roche <email address hidden> Thu, 10 Jun 2010 10:32:58 +0200

Changed in gdm (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

pushed in maverick, waiting for pushing in -proposed from that commit: http://bazaar.launchpad.net/~ubuntu-desktop/gdm/ubuntu/revision/257

Changed in gdm (Ubuntu Lucid):
status: Confirmed → Fix Committed
Changed in gdm:
status: New → Invalid
Revision history for this message
Sebastien Bacher (seb128) wrote :

sru team, the debdiff for the stable update which has been uploaded is on bug #403441

Revision history for this message
Colin Watson (cjwatson) wrote : Please test proposed package

Accepted gdm into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Pedro Villavicencio (pedro) wrote :

I've managed to reproduce the crash creating the .desktop file on the /usr/share/xsessions dir, I've updated the gdm package to the proposed one, tested it again and there's no crash this time, the session works fine. Marking this as verification done, thanks all.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 2.30.2.is.2.30.0-0ubuntu2

---------------
gdm (2.30.2.is.2.30.0-0ubuntu2) lucid-proposed; urgency=low

  * debian/patches/94_git_null_free_crash.patch:
    - git change to fix a crasher (lp: #403441)
  * debian/patches/95_git_name_escaping.patch:
    - git change to fix escaping issues leading to crashes (lp: #499690),
      or to having incorrect usernames displayed (lp: #585128)

  [ Didier Roche ]
  * debian/patches/30_don_t_save_failsafe_session.patch: (LP: #542345)
    - return FALSE instead of exiting on .desktop file without a comment
 -- Sebastien Bacher <email address hidden> Thu, 17 Jun 2010 15:41:17 +0200

Changed in gdm (Ubuntu Lucid):
status: Fix Committed → Fix Released
Changed in gdm:
importance: Unknown → Medium
status: Invalid → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.