First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 24399
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo X packagers <x11@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Andrew Joyce <9aj4@qlink.queensu.ca>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 24399 depends on: Show dependency tree
Show dependency graph
Bug 24399 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2003-07-13 12:30 0000
On shutdown when using GDM to login to X an error is displayed telling the user
that there was a problem stopping GDM.  This is not a critical error as it only
occurs because GDM has already quit itself when the user selects shutdown within
it.  It does however look bad, and I don't think that an error should be being
displayed to the user when everything is operating normally.

I would like to propose the following change to /etc/init.d/xdm so that the
error doesn't display if GDM is not running.

--- /tmp/xdm.old        2003-07-13 16:44:48.000000000 -0400
+++ xdm 2003-07-13 16:46:13.000000000 -0400
@@ -98,7 +98,7 @@
 
                retval=$?
        else
-               retval=1
+               retval=0
        fi
 
        #switch back to original vt


Reproducible: Always
Steps to Reproduce:
1. Setup GDM as your login manager for X.
2. Shutdown your computer using the GDM interface and observe the ugly error
message.

------- Comment #1 From Mike Gardiner (RETIRED) 2003-08-22 09:47:49 0000 -------
does this display-manager-shutting-itself-down occur with all display managers
? or only with gdm ? (perhaps try xdm to check). your patch proposes
(logically) that 

if (the display manager is running)
stop it and return it's exit value
else ( ie we cant see the display manager running!)
assume everything is ok and return 0

which i think is inconsistent with the intended behaviour, ie if we cant see
the display manager running then there's a good chance something went wrong, so
return 1. either way i think it's an xfree team decision.

------- Comment #2 From foser (RETIRED) 2003-08-22 09:57:00 0000 -------
this is a known 'problem' , it's just that if you shutdown or reboot from gdm ,
gdm gets stopped before the rc-script can stop it. That leads to an error
because according to the rc script it should still be running.

It's a superficial problem that has no real solution. If we change the
rc-script we actually make it bugged, because it will return 0 whenever gdm is
not running when we issue a stop of the script. While this should be 1 because
gdm isn't running anymore and that's an error (according to the script its an
error if gdm isnt running after it was started by the script).

It's a choice between 2 bads.

Azarah, it's time to fix this for once and all. What about making adding
something so GDM being stopped doesn't count as an error ?

------- Comment #3 From Radek Podgorny 2003-09-10 15:43:54 0000 -------
Can't this be solved by replacing the "ShutdownCommand=shutdown -h now" (or
something similar -> can't look now) to something like "/etc/init.d/xdm stop;
shutdown -h now" in the /etc/X11/gdm.conf file?

Radek

------- Comment #4 From foser (RETIRED) 2003-09-10 15:46:58 0000 -------
looks interesting to me..

------- Comment #5 From Radek Podgorny 2003-09-10 17:44:57 0000 -------
Anyway, it's nothing more than an idea... It may work but it may not... :-(

Can't test it myself so it's up to you, Gentoo guys, now... :-)

------- Comment #6 From foser (RETIRED) 2003-11-23 10:25:30 0000 -------
suggestion in #3 doesn't work either, it still shuts down gdm before anything
is done.

So the change still needs to be done in xdm init . Azarah, could we get some
sort of hack in /etc/init.d/xdm for gdm to be disregarded when it's already
stopped ? I know it's not clean, but this keeps coming back up.

We could maybe hack gdm to create a tmp file before it exists and then check if
the tmp file exists in xdm init. Ugly, but it would probably work correctly
most of the time.

------- Comment #7 From afd 2003-12-17 19:48:44 0000 -------
would it work to add some entry
foo() { eend 0 }
to /etc/init.d/xdm and to invoke /etc/init.d/xdm foo;[...;]shutdown -h now when halting the system?

------- Comment #8 From Antonio 2004-04-02 01:51:21 0000 -------
This bug is resolved ? or not ?
Thank's
In My system reboot o shutdown with GDM do not work

------- Comment #9 From Arthur Jackson 2004-06-16 13:36:18 0000 -------
i still get this error reported on shutdown/reboot

------- Comment #10 From Maurice van der Pot 2004-07-20 12:26:10 0000 -------
What about having a wrapper process that starts xdm in the foreground, catches
the exit code when it shuts down and then waits for signal 15 before exiting
itself and returning the caught error code.

That way you can always see if gdm was shutdown cleanly and you don't get an
error if it exited normally before being shut down.

------- Comment #11 From Maurice van der Pot 2004-07-20 12:28:43 0000 -------
Of course I meant [gkx]dm in both cases.

------- Comment #12 From foser (RETIRED) 2004-08-08 05:35:12 0000 -------
isn't that a bit overdone and wouldn't it interfere with 'normal' usage (not
shutdown) ?

------- Comment #13 From Maurice van der Pot 2004-08-08 11:31:28 0000 -------
My suggestion only works if the display manager is forced to run in the
foreground, but because the same script is used for several different
display managers, I would not recommend this. 

If no distinction can be made between a successful early termination and 
an unsuccessful one, imho the most common one should be assumed, which
is the successful one. I have to agree with the submitter.

Reassigning to xfree so they can decide and fix this.

------- Comment #14 From Gad Kadosh 2004-10-04 17:46:18 0000 -------
why not create a seperate init script for gdm alone? what that be so bad?

------- Comment #15 From Tim Burrell 2004-12-17 07:33:46 0000 -------
I just wanted to add that I find this annoying too.  A fix would be greatly
appreciated.

I hate setting up gentoo on a friends computer and of course they _always_ ask
"WAIT! What was that error!?"  and I have to explain "Oh don't worry, that's
nothing, the gentoo team hasn't found a fix for that yet, but really it's
nothing."

Kinda scares people a bit.  Which is fine if you've been using gentoo for a
while, but for newbs I can understand it being unsettling.

------- Comment #16 From foser (RETIRED) 2004-12-17 07:37:25 0000 -------
if i remember correctly i saw a commit not so long ago by azarah to the xdm
script that supposedly fixes this. Am I right Az ?

------- Comment #17 From Martin OConnor 2005-01-19 03:57:33 0000 -------
change "ShutdownCommand=shutdown -h now"  to
"/etc/init.d/xdm zap; shutdown -h now" in the /etc/X11/gdm.conf 

zap causes the xdm script to be manually reset to the stopped state - suppressing the error on shutdown.

------- Comment #18 From Martin OConnor 2005-01-19 04:07:12 0000 -------
That should be
change "HaltCommand"  to
"HaltCommand=/etc/init.d/xdm zap && /sbin/poweroff" 
and "RebootCommand" to
"RebootCammand=/etc/init.d/xdm zap && /sbin/reboot"
in the /etc/X11/gdm.conf 

------- Comment #19 From Martin OConnor 2005-01-19 04:33:54 0000 -------
On testing the above won't work
the solution is:
That should be
change "HaltCommand"  to
"HaltCommand=/sbin/gdm-poweroff" 
and "RebootCommand" to
"RebootCammand=/sbin/gdm-reboot"
in the /etc/X11/gdm.conf 

create /sbin/gdm-poweroff
#!/bin/bash
/etc/init.d/xdm zap &>/dev/null
/sbin/poweroff

chmod 0755 /sbin/gdm-poweroff

create /sbin/gdm-reboot
#!/bin/bash
/etc/init.d/xdm zap &>/dev/null
/sbin/reboot

chmod 0755 /sbin/gdm-reboot

Tested - works.

------- Comment #20 From Martin Ehmsen 2005-04-25 23:56:35 0000 -------
The solution in #19 seems nice.
It fixes the issue for gdm and dosen't interfere with other display managers.
Any opinions from gentoo devs?

------- Comment #21 From Donnie Berkholz 2005-05-23 20:12:56 0000 -------
Fixed in 6.8.2-r2 and 6.8.99.5. Thanks!

------- Comment #22 From Donnie Berkholz 2005-05-24 10:18:20 0000 -------
*** Bug 93815 has been marked as a duplicate of this bug. ***

------- Comment #23 From Mark Anthony 2008-01-29 17:27:47 0000 -------
I am momentarily using kernel 2.6.23-gentoo-r6 and gdm (~)2.20.3 and wonder:
I get 'error stopping gdm' while shutting down from X. 

/var/log/messages gives this:
Jan 29 17:18:31 localhost gdm[5917]: pam_unix(gdm:session): session opened for
user Enrond by (uid=0)
Jan 29 18:08:03 localhost gdm[5917]: pam_unix(gdm:session): session closed for
user Enrond
Jan 29 18:08:03 localhost gdm[5916]: WARNING: main daemon: Got SIGABRT.
Something went very wrong. Going down!
Jan 29 18:08:08 localhost rc-scripts: Error stopping gdm

So this seems to be the same problem as before ;) If i am wrong please tell me
and / or if you need any additional information about my setup just ask.

Enrond

First Last Prev Next    No search results available      Search page      Enter new bug