FS#8125 - GDM doesnt shutdown properly

Attached to Project: Arch Linux
Opened by Robin Heggelund Hansen (Skinney) - Wednesday, 26 September 2007, 00:31 GMT
Last edited by Jan de Groot (JGC) - Saturday, 11 October 2008, 23:24 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture i686
Severity Low
Priority Normal
Reported Version 2007.08.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 33
Private No

Details

Description: Whenever i reboot or shutdown the computer i get an error msg concerning GDM. It seems that Arch cannot shutdown GDM becouse it doesnt have the correct pid...


Additional info:
GDM 2.20


Steps to reproduce: Shutting down/Rebooting the computer
This task depends upon

Closed by  Jan de Groot (JGC)
Saturday, 11 October 2008, 23:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  Updated to 2.20.8, silenced gdm-stop warnings.
Comment by Jan de Groot (JGC) - Thursday, 27 September 2007, 13:50 GMT
How do you start gdm?
Comment by Robin Heggelund Hansen (Skinney) - Thursday, 27 September 2007, 13:54 GMT
using /etc/rc.d/gdm by including it in rc.conf
Comment by Nicholas (nico402) - Thursday, 27 September 2007, 17:05 GMT
it happens here too. and i start gdm in the same way
Comment by Maciej Libuda (Mefju) - Sunday, 30 September 2007, 22:16 GMT
I have this issue too. It seems that two gdm-binary processes exists at the same time.

[0:13 maciek ~] ps ax | grep gdm
2742 ? Ss 0:00 /usr/sbin/gdm-binary @
2744 ? S 0:00 /usr/sbin/gdm-binary @
2753 tty7 Rs+ 14:00 /usr/bin/X :0 -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7
5686 pts/0 S+ 0:00 grep gdm
Comment by seby (Nekos) - Monday, 15 October 2007, 15:50 GMT
some problem here:

5928 ? Ss 0:00 /usr/sbin/gdm-binary
5931 ? S 0:00 /usr/sbin/gdm-binary
5949 tty7 SLs+ 0:20 /usr/bin/X :0 -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7
7000 pts/0 R+ 0:00 grep gdm
Comment by Dincer Celik (roadboy) - Wednesday, 17 October 2007, 05:55 GMT
Same here too.

[roadboy@bozhane:~]$ ps aux | grep -i gdm
roadboy 3738 0.0 0.0 3184 792 pts/0 R+ 08:54 0:00 grep -i gdm
root 7855 0.0 0.0 12616 1136 ? Ss Oct16 0:00 /usr/sbin/gdm-binary
root 7858 0.0 0.1 12976 2676 ? S Oct16 0:00 /usr/sbin/gdm-binary
root 7863 0.0 0.6 22332 13024 tty7 SLs+ Oct16 0:22 /usr/bin/X :0 -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7
root 7893 0.0 0.6 22332 13024 tty7 SL+ Oct16 0:00 /usr/bin/X :0 -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7
Comment by Smith Dhumbumroong (zodmaner) - Wednesday, 17 October 2007, 11:00 GMT
Happens here too. I got this error message when restart/shutdown:

/var/run/gdm.pid doesn't exist, perhaps GDM isn't running
Comment by Rokas Klyvis (Rokixz) - Wednesday, 17 October 2007, 15:12 GMT
Me too. I tryed to upgrade to older version (2.19) , but it's never works. That message is showing again. And when my computer is shutting down, 2 deamons are showing, that exits.
Comment by Andrés (Perkin) - Wednesday, 17 October 2007, 19:37 GMT
[perkin@Homero ~]$ ps aux | grep -i gdm
root 6179 0.0 0.2 87624 2268 ? Ss 16:07 0:00 /usr/sbin/gdm-binary
root 6182 0.0 0.3 100296 3440 ? S 16:07 0:00 /usr/sbin/gdm-binary
root 6201 2.1 2.9 76124 29944 tty7 SLs+ 16:07 0:37 /usr/bin/X :0 -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7
perkin 6612 0.0 0.0 8868 992 pts/0 S+ 16:37 0:00 grep -i gdm
Comment by Fredrik (vEX) - Wednesday, 17 October 2007, 19:57 GMT
$ ps aux|grep -i gdm
root 4092 0.0 0.0 86864 1744 ? Ss 11:55 0:00 /usr/sbin/gdm-binary
root 4111 0.0 0.1 99532 2908 ? S 11:55 0:00 /usr/sbin/gdm-binary
fredrik 5256 0.0 0.0 8516 968 pts/2 S+ 21:48 0:00 grep -i gdm

$ cat /var/run/gdm.pid
4092

Starting normally (ie, not backgrounding it) it via rc.conf.

Also getting the following error right when it starts, perhaps it's related?

Oct 17 11:55:18 grimreaper gdm-binary[4048]: WARNING: Didn't understand `' (expected true or false)

I have not changed any config files manually and it was working fine before the upgrade to 2.20.0-1.
Comment by Fredrik (vEX) - Wednesday, 17 October 2007, 20:02 GMT
Appears that the latter is filed as  FS#8115  and during the last shutdown I couldn't even see the shutdown sequence, I got a blank screen for some reason so I'm not sure if I still have the pid-file problem.
Comment by Matt Runion (mrunion) - Thursday, 18 October 2007, 13:02 GMT
Same here, guys:

[root@highvoltage mrunion]# ps ax | grep gdm
6259 ? Ss 0:00 /usr/sbin/gdm-binary
6262 ? S 0:00 /usr/sbin/gdm-binary
6266 tty7 SLs+ 1:04 /usr/bin/X :0 -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7
14667 pts/0 S+ 0:00 grep gdm

I also only see an error message when I shutdown, and don't get a listing of the shutdown sequence.
Comment by Dincer Celik (roadboy) - Thursday, 18 October 2007, 14:34 GMT
And for me, if i restart computer from GDM, computer starts shutting down but GDM restarts itself.
Comment by Fredrik (vEX) - Thursday, 18 October 2007, 15:05 GMT
Last shutdown also gave error messages (some assertion about something != NULL) and then the pid issue. For a while though the screen was black, just as if the other GDM restarted the X session and then was killed.
Comment by Roman Kyrylych (Romashka) - Wednesday, 31 October 2007, 08:00 GMT
I get "/var/run/gdm.pid doesn't exist. Perhaps GDM isn't running." when shutting down GDM.
The pid file does exist and contains PID.
Comment by Fredrik (vEX) - Thursday, 01 November 2007, 16:16 GMT
So I tried something different last time I shut my machine down. Instead of using GDM, I switched to a console and ran '/etc/rc.d/gdm stop; shutdown -h now' and it was just fine, no errors about missing pid-file. If someone else can confirm that then it seems the error is only happening if you shutdown/restart via GDM and if so I guess it's some bug in the routine that terminates all deamons started via rc.conf.
Comment by Jan de Groot (JGC) - Thursday, 01 November 2007, 16:28 GMT
I can shutdown and reboot both systems here with the shutdown/reboot option in gdm. I don't know about the pid issue, as my screen turns black most of the times on both systems for a while, then there's some red text showing my system is about to shutdown and then my machines turn off without any issues.
Comment by Fredrik (vEX) - Thursday, 01 November 2007, 17:43 GMT
I get that black screen as well, though first I see the shutdown sequence start and the pid issue, then black screen, then back to sequence which is near the end now with the pid issue showing at the end as well. I can try and capture it with my digital camera if that helps.
Comment by Matt Runion (mrunion) - Thursday, 01 November 2007, 20:05 GMT
When shutting down I just get a GDM error:

gdm-binary[8307]: GLib-GObject-CRITICAL: g_object_unref: assertion `G_IS_OBJECT (object)' failed

This is the only line I get when shutting down -- no "status" of other things shutting down like used to. The machine DOES shut down properly though, as evidenced by it not wanting to recheck the drives when it starts up.

Here is the results of shutting down from inside Gnome as logged from the "everything.log":

Nov 1 01:12:09 gconfd (mrunion-8423): Exiting
Nov 1 01:12:09 highvoltage gdm-binary[8307]: WARNING: Command failed /usr/bin/poweroff: Failed to execute child process "/usr/bin/poweroff" (No such file or directory)
Nov 1 01:12:09 highvoltage shutdown[21572]: shutting down for system halt
Nov 1 01:12:09 highvoltage init: Switching to runlevel: 0
Nov 1 01:12:10 highvoltage dhcpcd[8215]: eth0: broadcasting for a lease
Nov 1 01:12:10 highvoltage cpufreqd: event_wait : Error polling ACPI Event handler (0x0011).
Nov 1 01:12:10 highvoltage cpufreqd: acpi_event_exit : Couldn't cancel event thread (No such process).
Nov 1 01:12:10 highvoltage ntfs-3g[8521]: Unmounting /dev/sda1 (OS)
Nov 1 01:12:10 highvoltage ntfs-3g[8515]: Unmounting /dev/sda2 (HP_RECOVERY)
Nov 1 01:12:10 highvoltage ntfs-3g[8513]: Unmounting /dev/sdb1 (DATA)
Nov 1 01:12:10 highvoltage ifplugd(eth0)[8241]: Exiting.
Nov 1 01:12:10 highvoltage wlan0: deauthenticate(reason=3)
Nov 1 01:12:10 highvoltage dhcpcd[8580]: wlan0: received SIGTERM, stopping
Nov 1 01:12:10 highvoltage dhcpcd[8580]: wlan0: removing default route via 10.0.0.1 metric 0
Nov 1 01:12:10 highvoltage dhcpcd[8580]: wlan0: removing IP address 10.0.0.107/24
Nov 1 01:12:11 highvoltage dhcpcd[8580]: wlan0: exiting
Nov 1 01:12:11 highvoltage dhcpcd[8215]: eth0: received SIGTERM, stopping
Nov 1 01:12:11 highvoltage gdm-binary[8307]: GLib-GObject-CRITICAL: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Nov 1 01:12:11 highvoltage dhcpcd[8215]: eth0: removing IP address 169.254.18.87/16
Nov 1 01:12:11 highvoltage dhcpcd[8215]: eth0: exiting
Nov 1 01:12:11 highvoltage syslog-ng[8213]: Termination requested via signal, terminating;
Nov 1 01:12:11 highvoltage syslog-ng[8213]: syslog-ng shutting down; version='2.0.5'

Comment by Fredrik (vEX) - Saturday, 03 November 2007, 18:26 GMT
This is what it looks like for me: http://web.telia.com/~u85920559/GDM_shutdown.avi

Usually it just switches to a blank screen, and back just before it shutdowns, but every now and then it's slow enough for the mouse pointer to appear. To me it looks like one of the GDM's are killed and the other realizes that there is no X running and restarts just before it gets killed. Like I mentioned earlier if I change to a console and stop it by using the rc.d script and then using shutdown there are no problems. It only happens when shutting down through GDM. This is my deamons list in rc.conf:

DAEMONS=(syslog-ng network netfs crond @alsa @sshd @sensors @smartd @mpd @arch32 @cpufreq gdm)
Comment by Paolo Loberto (mrloba) - Wednesday, 07 November 2007, 14:28 GMT
Same problem to me...
I start GDM with inittab in runlevel 5

everything.log says to me:

Nov 7 14:59:24 neurone gdm-binary[7279]: WARNING: Command failed /usr/bin/reboot: Failed to execute child process "/usr/bin/reboot" (No such file or directory)
Nov 7 14:59:24 neurone shutdown[9840]: shutting down for system reboot
Nov 7 14:59:25 neurone init: Switching to runlevel: 6

[root@neurone ~]# ps ax | grep -i gdm
7220 ? Ss 0:00 /usr/sbin/gdm-binary -nodaemon
7248 ? S 0:00 /usr/sbin/gdm-binary -nodaemon
7250 tty7 SLs+ 0:57 /usr/bin/Xorg :0 -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7

[root@neurone ~]# cat /var/run/gdm.pid
7220

Comment by Jefferson Caldeira (Jefones) - Wednesday, 21 November 2007, 00:30 GMT
I'm with this problem in 5 computers. Why the bug is "undecided"?
Comment by Jefferson Caldeira (Jefones) - Wednesday, 21 November 2007, 00:33 GMT
Sorry... the bug is "assigned"
Comment by Jan de Groot (JGC) - Wednesday, 21 November 2007, 07:34 GMT
Things I can reproduce:
- when I shutdown from gnome, most of the times I get back to GDM, but sometimes I get a shutdown
- when I shutdown from gdm, everything works fine, though I get some warnings.

The 1st thing is actually the bug, the 2nd isn't a bug: gdm closes itself on shutdown and gets stopped by the rc.d script, which notices there's no gdm running anymore.
Comment by Roman Kyrylych (Romashka) - Wednesday, 21 November 2007, 09:03 GMT
Then rc script should be fixed to not produce "/var/run/gdm.pid doesn't exist. Perhaps GDM isn't running." warning - it should check for pid existance and if it doesn't exist - assume that gdm is closed already. (Does gdm manages the pid file by itself? Then see rc.d/dbus)
Comment by Jan de Groot (JGC) - Wednesday, 21 November 2007, 09:29 GMT
The script will always print FAIL if the pid file doesn't exist. At this moment we call the gdm-stop binary that handles all the magic to stop gdm. This is an upstream script and prints these warnings. The only fix I would do here is checking return status of the script and use >/dev/null 2>&1 to silence the output.
Comment by Fredrik (vEX) - Wednesday, 21 November 2007, 18:42 GMT
Well, the thing is that at least for me the script is working flawlessly if I switch to a console and run it and then use shutdown to turn off the computer. Though so far noone else seems to have tested that, but if it's the same for others then there seems to be some bug only when the script is called during shutdown.
Comment by Peter Avramucz (muczyjoe) - Tuesday, 11 December 2007, 07:29 GMT
I think, the shutdown/reboot menuitem in gdm/gnome calls gdm-stop, se there won't be a pid file, when init tries to call gdm-stop.
So (like Roman Kyrylych said), there should be a check in the /etc/rc.d/gdm file, if gdm is running.
Comment by Fredrik (vEX) - Saturday, 15 December 2007, 12:54 GMT
That would explain why the rc.d script works fine when executed manually in a console.
Comment by Arjun Shankar (spectre) - Saturday, 23 February 2008, 16:39 GMT
I made an interesting observation on my machine. If I have 'alsa' in my DAEMONS line (either backgrounded, or otherwise), I get the problem, and if I remove it, I don't get it. Moving 'alsa' up and down the list made no difference.
Comment by Nuked (Nuked) - Tuesday, 01 April 2008, 01:43 GMT
I also get the exact same error on Arch 64 with the latest gnome (testing 2.22) however I have had the problem before the upgrade as well.
Comment by Dennis Craven (dcraven) - Tuesday, 29 April 2008, 03:53 GMT
To those getting the message "/var/run/gdm.pid doesn't exist. Perhaps GDM isn't running.", try starting gdm from your /etc/inittab file by uncommenting the line ~38. Also make sure the "id:5:initdefault:" is uncommented to start X11, paying attention to the comment on line ~14.

With this solution the 'gdm' entry can and should be removed from the DAEOMONS array in rc.conf.
Comment by Val L. (onestep_ua) - Sunday, 11 May 2008, 08:24 GMT
Why don't just patch the gdm-stop script? I found gdm-stop.diff in build dir and adapted it to GDM 2.20.1. Please see attached file. :)
Comment by Christoper Daley (luciferin) - Saturday, 24 May 2008, 08:03 GMT
Couldn't we just use an if/then to check for "/var/run/gdm.pid" before we call the gdm-stop script? Is a command like this not supported by our shutdown process? I'll look into patching it myself, but I have no experience in this area...
Comment by Christoper Daley (luciferin) - Saturday, 24 May 2008, 08:47 GMT
Well, here's the quick hack I did as a work around (read:hack): added "rm /var/run/daemons/gdm" to the end of "/etc/rc.local.shutdown"
gdm-stop should clean up this file when it is executed, should it not? That would make it a GDM bug...

Comment by Anonymous Submitter - Wednesday, 28 May 2008, 13:38 GMT
It eventually does get shut down, but it gets shutdown multiple times resulting in failure messages.
Comment by Kevin Read (obsidian) - Monday, 07 July 2008, 19:46 GMT
Quoting Jan de Groot (JGC)
- when I shutdown from gnome, most of the times I get back to GDM, but sometimes I get a shutdown
...
The 1st thing is actually the bug...

I agree that this is the real bug, the other one is cosmetics (though maybe annoying). I can influence the shutdown behaviour. On my system it is apparently shutting down in the background. GDM restarts itself after X exited when I tell gnome to shutdown the system. It looks like the shutdown doesn't work. But if I switch to the first VC the system will shutdown immediately. It seems that it waits for the terminal to become active/ready (?). And GDM respawning takes away this focus. Please try this and see if you have the same behaviour.

Steps to reproduce:
1. Activate shutdown from desktop environment
2. X stops, GDM respawns.
3. As soon as GDM appears, change to VC 1 immediately.
4. You should see a standard shutdown running and the box will power off.
Comment by Fredrik (vEX) - Monday, 25 August 2008, 17:10 GMT
I've been running GDM 2.20.7 for some time now and that seems to have fixed the bug. It still complains about the missing .pid though.

I've only changed the pkgver and md5sums, and I suspect some dependency also needs to be upgraded since every other shutdown/reboot it prints a backtrace. It flashes by too quickly for me to see what was the cause and there are nothing in the logs (filesystem already unmounted).
Comment by Fredrik (vEX) - Saturday, 20 September 2008, 12:12 GMT
I've now been running GDM 2.20.8 for some time and it seems to fix all issues, except for complaining about the missing .pid (which is just an annoyance if anything).

Loading...