GDM package fails to uninstall if GDM not running

Bug #1055359 reported by Bhoemen Wood
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)
Fix Released
High
Unassigned
Precise
Invalid
High
Unassigned
Quantal
Fix Released
High
Unassigned

Bug Description

Currently the gdm package attempts to stop the gdm daemon when it is uninstalled. If this fails the package fails to uninstall.

The daemon is not necessarily running when the package is uninstalled so this is a bug, also it is unsafe to stop the daemon as the sysadmin might not be expecting this. Fix is to not attempt to stop the dameon at all and leave that to the sysadmin to do before uninstalling the package.

[Test Case]
1. sudo apt-get install gdm
2. sudo stop gdm
3. sudo apt-get remove gdm
Expected result:
gdm package successfully uninstalls
Observed result:
Package fails to uninstall.

[Regression Potential]
When uninstalling GDM the daemon will no longer be stopped. There is a risk of someone relying on this behaviour but it seems unlikely.

Related branches

Revision history for this message
Bhoemen Wood (wood-bhoemen) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gdm (Ubuntu):
status: New → Confirmed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Easily triggered by installing GDM, not running it then trying to uninstall it.

Changed in gdm (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
summary: - package gdm 3.5.92.1-0ubuntu1 failed to install/upgrade: subprocess
- installed pre-removal script returned error exit status 1
+ GDM package fails to uninstall if GDM not running
Changed in gdm (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Just checked - precise doesn't have this bug. It has:
      stop gdm || :
which always succeeds.

description: updated
Changed in gdm (Ubuntu Precise):
status: Triaged → Invalid
Revision history for this message
Iain Lane (laney) wrote :

I'm confused - it appears we now don't try to stop GDM at all when it's removed? Is this desirable/consistent with other DMs?

Revision history for this message
Iain Lane (laney) wrote :

(temporarily rejecting, can accept from rejected if necessary)

Revision history for this message
Jeremy Bícha (jbicha) wrote :

I don't believe either lightdm or kdm try to kill themselves when uninstalled.

As implemented, this feature was broken anyway as gdm doesn't always run on :0 so personally, I've had my X session killed when uninstalling gdm sometimes.

Revision history for this message
Iain Lane (laney) wrote :

I suppose it is desirable to not kill your current login manager; why was doing this ever correct?

Revision history for this message
Tim Lunn (darkxst) wrote :

Lightdm never tries to kill itself, it looks like kdm may try under certain circumstances but it asks the user first.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Bumping to High as I believe this has a large number of duplicates and this bug can lead to data loss if gdm is killed because it is running but not on :0.

Changed in gdm (Ubuntu Quantal):
importance: Medium → High
Changed in gdm (Ubuntu Precise):
importance: Medium → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 3.6.1-0ubuntu1

---------------
gdm (3.6.1-0ubuntu1) quantal-proposed; urgency=low

  [ Jeremy Bicha ]
  * New upstream release (LP: #1067492)
    - Fix "Switch User" not working in Unity or GNOME Classic,
      thanks Tim! (LP: #1057841)
  * debian/patches/ubuntu_user_switching.patch:
    - Dropped, applied in new version

  [ Tim Lunn ]
  * debian/gdm.prerm:
    - Do not try to stop gdm service if its not running. (LP: #1055359)
 -- Tim Lunn <email address hidden> Tue, 16 Oct 2012 15:18:58 -0400

Changed in gdm (Ubuntu Quantal):
status: Triaged → Fix Released
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.