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


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?

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).

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".  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.


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:
  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.


Bryce Harrington
bryce canonical com


[2]:  /etc/gdm/failsafeExample


clientargs="--warning --text HelloWorld "
serverargs="-br -once -config /etc/X11/xorg.conf.failsafe"

echo "xinit $client $clientargs -- $server $display $serverargs"
xinit $client $clientargs -- $server $display $serverargs
gdm-list mailing list
gdm-list gnome org

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