Re: [gdm-list] FailsafeXServer - gdm keeps restarting X



Bryce:

Looking at the logs, it seems that every time GDM tries to start an
XServer that it is hitting the following error:

Aug 28 12:04:12 dorset gdm[5348]: WARNING: gdm_slave_xioerror_handler: Fatal X error - Restarting :0

I think you need to track down what is causing the X IO error, and see if
the problem is in the way that GDM is handling things, or if the X IO
error can be avoided.

Brian

Note that when FailsafeXServer is set, then it sets d->command to the
failsafe X server command.  Then in server.c, in gdm_server_spawn it
will run that command.  Note it also has gdm_debug lines so that the
command it runs should get logged.  Can you verify that the Xserver
is trying to run your failsafe command or not?  Is your failsafe command
failing, or is the GDM mechanism to reset the command to the failsafe
one not working?

Hi Brian, the failsafe command is definitely running and working
correctly.  However, after about 1 minute, gdm appears to be trying to
start another session, and it's this second session where the failure
occurs.
Turn on debug in the configuration file and try to start GDM and let
us know what gdm related messages get added to the end of your syslog
(/var/log/messages or /var/adm/messages).

I've excerpted the gdm portion of /var/log/syslog from gdm restart up to
the first time it tried to crease a second session.
Based on the message that you are getting "There already appears to
be an X server running on display :0" indicates to me that the first
server might not have crashed completely or left the system in a state
where the failsafe Xserver is failing to start?  This could be a
problem with the Xserver or with the way GDM detects if the Xserver
is already running or not.  This message gets displayed when the
Xserver claims it is "busy".

I've attached output from 'ps aux | grep -i x' from right after the
failsafe mode has started, again after the whiptail message popped
up, and then a third after I've stopped gdm and killed all the xinit and
whiptail processes.  I notice that there is a zombie Xorg process shown
- I take it this must be the original failed Xserver?

It looks like in the function
display_busy in server.c that the code is looking at the
display log file to see if the display is already running.  Perhaps
the crash of the first Xserver is not cleaning up the log file
that GDM is using to determine if the Xserver has stopped?  If
this is the problem, the GDM code could probably be made more robust.

Thanks,
Bryce

I am writing a FailsafeXServer handler for Ubuntu[1] but am running into
a gdm issue, where gdm keeps spawning X sessions while the failsafe
server is running.

Here is a test case to recreate the issue:

 1.  Copy your /etc/X11/xorg.conf to /etc/X11/xorg.conf.failsafe
 2.  Invalidate your /etc/X11/xorg.conf by changing your graphics
     driver to "foobar"
 3.  Copy the script listed below[2] to /etc/gdm/failsafeExample
 4.  In /etc/gdm/gdm.conf set the following:
     FailsafeXServer=/etc/gdm/failsafeExample
 5.  /etc/init.d/gdm restart

On my system, this the screen blanks 3 times and then shows the
HellowWorld message box properly.  But after a minute or so, the screen
switches to the whiptail error message saying, "There already appears to
be an X server running on display :0. ....."

I've dug through the source code a bit, but I'm not super familiar with
gdm internals so am not certain what's going on.  I notice in
deal_with_x_crashes() that it sets d->failsafe_xserver = TRUE when it
has a defined failsafe command, and I wonder if perhaps a check for this
simply needs to be added somewhere?

Advice on this would be most appreciated.

Thanks,

Bryce Harrington
bryce canonical com


[1]:  https://blueprints.launchpad.net/ubuntu/+spec/bullet-proof-x

[2]:  /etc/gdm/failsafeExample

#!/bin/bash

client="/usr/bin/zenity"
clientargs="--warning --text HelloWorld "
server=/usr/bin/X
serverargs="-br -once -config /etc/X11/xorg.conf.failsafe"
display=:0

echo "xinit $client $clientargs -- $server $display $serverargs"
xinit $client $clientargs -- $server $display $serverargs
_______________________________________________
gdm-list mailing list
gdm-list gnome org
http://mail.gnome.org/mailman/listinfo/gdm-list

------------------------------------------------------------------------

_______________________________________________
gdm-list mailing list
gdm-list gnome org
http://mail.gnome.org/mailman/listinfo/gdm-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]