/etc/init.d/gdm stop fails and falsely reports success

Bug #47320 reported by Stoic Jed
12
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: gdm

Trying to stop gdm gives the following:

$ /etc/init.d/gdm stop
  * Stopping GNOME Display Manager... [ ok ]

Should there instead be an error message, since gdm is not actually stopped?

Using gdm version 2.14.6-0ubuntu2 on Ubuntu Dapper.

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

Thanks for your bug. I've just tried on a bunch of softwares from init.d and several have that issue, that might be something to change to the lsb-base package

Changed in gdm:
assignee: nobody → desktop-bugs
status: Unconfirmed → Confirmed
Revision history for this message
Mitch Hollander (mitch00) wrote :

This is also the case when using sudo, i.e.,
"sudo /etc/init.d/gdm stop". And by extension, affects "restart" as well.

The main problem is that it prevents the user from restarting gdm without rebooting - necessary when trying to solve xorg problems on the Live CD.

"killall -HUP gdm" can be used as a workaround.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

> that might be something to change to the lsb-base package

Yes, it's a problem with the arguments given to the start-stop-daemon. IIRC, leaving out the --exec argument makes --stop work.

This is still a problem in Feisty, after running "sudo /etc/init.d/gdm stop", the two gdm processes keep running.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Verified on Feisty that removing --exec makes it work. Additionally, the --oknodo argument to start-stop-daemon makes the script return success even if it did not kill gdm.

I guess start-stop-daemon should just ignore the --exec argument when --stop is present? At least not just ignore everything and quit.

OTOH if this is expected behavior from start-stop-daemon, many init scripts must be fixed.

description: updated
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Sorry for the confusion and my misinformed guesses. start-stop-daemon uses the --exec argument to double-check it will kill the right process.

The problem on the live cd is that start-stop-daemon tries to match the --exec argument /usr/sbin/gdm with /proc/<pid>/exe (where <pid> is the correct pid from the /var/run/gdm.pid). On the live cd, /proc/<pid>/exe contains "/rofs/usr/sbin/gdm" instead of "/usr/sbin/gdm".

I don't know if this should be fixed in start-stop-daemon (by relaxing the --exec file name matching and relying on inode number matching) or in casper.

Revision history for this message
Steve Magoun (smagoun) wrote :

This affects Ubuntu Mobile as well. Ubuntu Mobile uses unionfs to merge a squashfs image and an ext3 partition. /proc/<pid>/exe points to /squashmnt/path/to/exe rather than /path/to/exe, so start-stop-daemon --exec never finds a running process.

In Ubuntu Mobile the problem can be worked around by 'ln -s / /squashmnt', yuck.

Changed in dpkg:
assignee: desktop-bugs → nobody
Revision history for this message
lee321987 (reiterwill77) wrote :

Can someone please tell me the location of the file that contains the "--exec command" that I have to remove in order to be able to stop gdm on a live CD?
I assume I'll just need to delete the characters "--exec". Is this true?

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.