Debian Bug report logs - #681830
gdm3: spawns X continuously when gnome-session dies

version graph

Package: gdm3; Maintainer for gdm3 is Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>; Source for gdm3 is src:gdm3.

Reported by: Cyril Brulebois <kibi@debian.org>

Date: Mon, 16 Jul 2012 21:42:02 UTC

Severity: serious

Tags: patch

Found in versions gdm3/3.4.1-2, gdm3/3.4.1-5, gdm3/3.4.1-3

Fixed in version gdm3/3.4.1-6

Done: Josselin Mouette <joss@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, kibi@debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#681830; Package gdm3. (Mon, 16 Jul 2012 21:42:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
New Bug report received and forwarded. Copy sent to kibi@debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Mon, 16 Jul 2012 21:42:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Cyril Brulebois <kibi@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gdm3: spawns X continuously when gnome-session dies
Date: Mon, 16 Jul 2012 23:38:28 +0200
[Message part 1 (text/plain, inline)]
Package: gdm3
Version: 3.4.1-2
Severity: serious
Justification: insane behaviour

Hi,

(tempted to reopen #650183 but I guess a fresh bug can't really hurt.)

testing d-i beta 1 images in virtualbox, standard desktop installation
went fine but once the newly installed system is started, X woulnd't
come up.

I tried several things:
 - standard virtualbox settings,
 - standard virtualbox + 3D acceleration enabled,
 - qemu,
 - qemu with -enable-kvm.

The bad behaviour is seen in all 4 cases.

Please fix that for real; eating CPU and disc space doesn't help anyone.

I'm attaching everything :0-related (X log + gdm3 logs) after having
removed all X and gdm3 logs, and having let gdm3 run for a few seconds
(service gdm3 start; sleep 3; service gdm3 stop).

I'll be filing a report for the gnome-session segfault shortly (dmesg
says it's segfaulting in libdconfsettings.so).

Mraw,
KiBi.
[Xorg.0.log (text/plain, attachment)]
[:0-slave.log (inode/x-empty, attachment)]
[:0-slave.log.2 (text/plain, attachment)]
[:0-slave.log.1 (text/plain, attachment)]
[:0.log (text/plain, attachment)]
[:0.log.2 (text/plain, attachment)]
[:0.log.1 (text/plain, attachment)]
[:0-greeter.log (text/plain, attachment)]
[:0-greeter.log.1 (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#681830; Package gdm3. (Sat, 28 Jul 2012 10:57:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Sat, 28 Jul 2012 10:57:05 GMT) Full text and rfc822 format available.

Message #10 received at 681830@bugs.debian.org (full text, mbox):

From: Cyril Brulebois <kibi@debian.org>
To: control@bugs.debian.org
Cc: 681830@bugs.debian.org, 681837@bugs.debian.org, 681855@bugs.debian.org
Subject: Lowering severity for 2 of those 3 bugs
Date: Sat, 28 Jul 2012 12:53:06 +0200
[Message part 1 (text/plain, inline)]
severity 681837 normal
tag      681837 unreproducible
severity 681855 normal
tag      681855 unreproducible
thanks

Hi,

sorry for the noise, I'm not able to reproduce those bugs at all. I suspect
something might have gone wrong with something like an ENOSPC on the host
machine, and virtualbox's dynamic (re)sizing of disc images, which might
have led to some files getting corrupted somehow.

I'm lowering the severity for the d-conf and gnome-session bug reports,
letting the gdm3 one as RC which I think is what it deserves.

Mraw,
KiBi.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#681830; Package gdm3. (Thu, 09 Aug 2012 23:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Beckmann <debian@abeckmann.de>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Thu, 09 Aug 2012 23:51:03 GMT) Full text and rfc822 format available.

Message #15 received at 681830@bugs.debian.org (full text, mbox):

From: Andreas Beckmann <debian@abeckmann.de>
To: 681830@bugs.debian.org
Subject: Re: gdm3: spawns X continuously when gnome-session dies
Date: Fri, 10 Aug 2012 01:49:17 +0200
Hi,

I just experienced this on a fresh wheezy installation (gdm3 3.4.1-2) in
a real system - I can trigger this by disconnecting the display and
restarting gdm3. Reconnecting, stop gdm3, pkill Xorg, start gdm3 fixes
this. I'm not sure which logfile might be interesting, as there are
thousands ... Unfortunately I'm using the nvidia driver, and it's too
late now to switch back to nouveau - perhaps next week.


Andreas



Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#681830; Package gdm3. (Fri, 28 Sep 2012 20:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Beckmann <debian@abeckmann.de>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Fri, 28 Sep 2012 20:21:03 GMT) Full text and rfc822 format available.

Message #20 received at 681830@bugs.debian.org (full text, mbox):

From: Andreas Beckmann <debian@abeckmann.de>
To: Debian Bug Tracking System <681830@bugs.debian.org>
Subject: Re: gdm3: spawns X continuously when gnome-session dies
Date: Fri, 28 Sep 2012 21:44:36 +0200
Package: gdm3
Version: 3.4.1-3
Followup-For: Bug #681830

Just tried again ... no display connected and gdm3 goes spawning

$ ls -la /var/log/Xorg.*.log  | wc -l
450

Andreas

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (700, 'testing'), (600, 'unstable'), (130, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gdm3 depends on:
ii  accountsservice                             0.6.21-6
ii  adduser                                     3.113+nmu3
ii  dconf-gsettings-backend                     0.12.1-2
ii  dconf-tools                                 0.12.1-2
ii  debconf [debconf-2.0]                       1.5.46
ii  dpkg                                        1.16.8
ii  gir1.2-freedesktop                          1.32.1-1
ii  gir1.2-glib-2.0                             1.32.1-1
ii  gnome-session [x-session-manager]           3.4.2.1-2
ii  gnome-session-bin                           3.4.2.1-2
ii  gnome-session-fallback [x-session-manager]  3.4.2.1-2
ii  gnome-settings-daemon                       3.4.2-5
ii  gnome-terminal [x-terminal-emulator]        3.4.1.1-1+build1
ii  gsettings-desktop-schemas                   3.4.2-1
ii  kde-window-manager [x-window-manager]       4:4.8.4-3
ii  konsole [x-terminal-emulator]               4:4.8.4-1
ii  libaccountsservice0                         0.6.21-6
ii  libatk1.0-0                                 2.4.0-2
ii  libattr1                                    1:2.4.46-8
ii  libaudit0                                   1:1.7.18-1.1
ii  libc6                                       2.13-35
ii  libcairo-gobject2                           1.12.2-2
ii  libcairo2                                   1.12.2-2
ii  libcanberra-gtk3-0                          0.28-4
ii  libcanberra0                                0.28-4
ii  libdbus-1-3                                 1.6.0-1
ii  libdbus-glib-1-2                            0.100-1
ii  libfontconfig1                              2.9.0-7
ii  libgdk-pixbuf2.0-0                          2.26.1-1
ii  libglib2.0-0                                2.32.3-1
ii  libglib2.0-bin                              2.32.3-1
ii  libgtk-3-0                                  3.4.2-3
ii  libpam-modules                              1.1.3-7.1
ii  libpam-runtime                              1.1.3-7.1
ii  libpam0g                                    1.1.3-7.1
ii  libpango1.0-0                               1.30.0-1
ii  librsvg2-common                             2.36.1-1
ii  libselinux1                                 2.1.9-5
ii  libupower-glib1                             0.9.17-1
ii  libwrap0                                    7.6.q-24
ii  libx11-6                                    2:1.5.0-1
ii  libxau6                                     1:1.0.7-1
ii  libxdmcp6                                   1:1.1.1-1
ii  libxklavier16                               5.2.1-1
ii  libxrandr2                                  2:1.3.2-2
ii  lsb-base                                    4.1+Debian7
ii  metacity [x-window-manager]                 1:2.34.3-3
ii  policykit-1-gnome                           0.105-2
ii  twm [x-window-manager]                      1:1.0.6-1
ii  upower                                      0.9.17-1
ii  x11-common                                  1:7.7+1
ii  x11-xserver-utils                           7.7~3
ii  xfce4-session [x-session-manager]           4.8.3-2+b1
ii  xfce4-terminal [x-terminal-emulator]        0.4.8-1+b1
ii  xfwm4 [x-window-manager]                    4.8.3-2
ii  xterm [x-terminal-emulator]                 278-1

Versions of packages gdm3 recommends:
ii  at-spi2-core               2.5.3-1
ii  desktop-base               7.0.3
ii  gnome-icon-theme           3.4.0-2
ii  gnome-icon-theme-symbolic  3.4.0-2
ii  x11-xkb-utils              7.7~1
ii  xserver-xephyr             2:1.12.3.902-1
ii  xserver-xorg               1:7.7+1
ii  zenity                     3.4.0-2

Versions of packages gdm3 suggests:
ii  gnome-orca            3.4.2-2
ii  gnome-shell           3.4.2-1
pn  gok                   <none>
ii  libpam-gnome-keyring  3.4.1-5

-- debconf information:
* shared/default-x-display-manager: gdm3
  gdm3/daemon_name: /usr/sbin/gdm3



Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#681830; Package gdm3. (Tue, 25 Dec 2012 21:57:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tony Houghton <h@realh.co.uk>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Tue, 25 Dec 2012 21:57:07 GMT) Full text and rfc822 format available.

Message #25 received at 681830@bugs.debian.org (full text, mbox):

From: Tony Houghton <h@realh.co.uk>
To: 681830@bugs.debian.org
Subject: #681830 - gdm3: X failures not necessarily related to gnome-shell also cause this
Date: Tue, 25 Dec 2012 21:56:44 +0000
I've seen this behaviour several times, and agree it's at least
"serious", so sorry for not reporting this or finding a bug to subscribe
to earlier. Today it was caused by X failing to start due to some
problem I couldn't be bothered to remmebr after deleting several hundred
files from /var/log, but involved "No usable screen configurations
found" or something along those lines. I think I've seen it caused by
something as common-place as trying to use the proprietary nvidia driver
without a matching kernel module.

Whatever is causing X to die but leave processes behind, gdm3 should not
allow this. I remember previous versions showing messages like "X server
respawning too fast, shutting down", but it seems like gdm3 (still) can't
properly protect against this despite what the changelog says in closing
#650183.

I'm currently using gdm3 3.4.1-5.



Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#681830; Package gdm3. (Sun, 27 Jan 2013 19:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Sun, 27 Jan 2013 19:45:03 GMT) Full text and rfc822 format available.

Message #30 received at 681830@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 681830@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Reproduced
Date: Sun, 27 Jan 2013 19:42:47 +0000
[Message part 1 (text/plain, inline)]
found 681830 3.4.1-5
thanks

I made a fresh Wheezy GNOME3 install on a desktop machine (so that the
display could be disconnected more easily) and had the GDM3 welcome
screen on display. 

First test was simply to disconnect the display, without problems on
this setup.

The second test kept the display connected. I generated an Xorg failure
by moving /usr/sbin/Xorg aside and replacing it with a shell script
which simply exits with non-zero.

Restarting gdm3 via invoke-rc.d causes htop to show a huge number of
gdm processes.

gdm3 was stopped over an SSH connection using invoke-rc.d. Then I
started gdm3 from the command line (on a directly connected keyboard)
to generate endless lists of:

gdm3[17041]: WARNING: GdmDisplay: display lasted 1.681562 seconds
gdm3[17041]: WARNING: GdmDisplay: display lasted 1.687131 seconds
gdm3[17041]: WARNING: GdmDisplay: display lasted 1.693576 seconds

 daemon/gdm-display.c : 725
       g_warning ("GdmDisplay: display lasted %lf seconds",elapsed);

I changed the shell script to avoid the 3 second timeout (which makes
this much more manageable) and gdm3 just keeps respawning using
gdm-simple-slave, incrementing the --display-id each time.

More investigation will follow but at least this provides what should
be a reproducible method and a hint as to a starting point in the
codebase. 

To avoid spinning the CPU at 100%, it could be trivial to add an
explicit sleep if the elapsed time in gdm-display.c is less than a few
seconds - the conditional already exists in the codebase.

daemon/gdm-display.c : 723
        elapsed = g_timer_elapsed (display->priv->slave_timer, NULL);
        if (elapsed < 3) {
                g_warning ("GdmDisplay: display lasted %lf seconds", elapsed);
                _gdm_display_set_status (display, GDM_DISPLAY_FAILED);
                sleep (2);
        } else {
                _gdm_display_set_status (display, GDM_DISPLAY_UNMANAGED);
        }

(hypothetically)

Whilst this change does nothing to prevent the re-spawning, (which may
be entirely justifiable in some use cases), it does at least ensure
that the system remains usable.

A much better fix (which previous versions of gdm appeared to
implement) would be a counter in the same loop which only let the
server become un-managed a certain number of times (e.g. 10) before
failing utterly and exiting gdm3 with a sane error message and a
non-zero exit code.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

[Message part 2 (application/pgp-signature, inline)]

Marked as found in versions gdm3/3.4.1-5. Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Sun, 27 Jan 2013 19:45:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#681830; Package gdm3. (Mon, 28 Jan 2013 09:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 681830@bugs.debian.org:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Mon, 28 Jan 2013 09:21:03 GMT) Full text and rfc822 format available.

Message #37 received at 681830@bugs.debian.org (full text, mbox):

From: Josselin Mouette <joss@debian.org>
To: Neil Williams <codehelp@debian.org>, 681830@bugs.debian.org
Subject: Re: Bug#681830: Reproduced
Date: Mon, 28 Jan 2013 10:19:14 +0100
Le dimanche 27 janvier 2013 à 19:42 +0000, Neil Williams a écrit : 
> gdm3 was stopped over an SSH connection using invoke-rc.d. Then I
> started gdm3 from the command line (on a directly connected keyboard)
> to generate endless lists of:
> 
> gdm3[17041]: WARNING: GdmDisplay: display lasted 1.681562 seconds
> gdm3[17041]: WARNING: GdmDisplay: display lasted 1.687131 seconds
> gdm3[17041]: WARNING: GdmDisplay: display lasted 1.693576 seconds
> 
>  daemon/gdm-display.c : 725
>        g_warning ("GdmDisplay: display lasted %lf seconds",elapsed);
> 
> I changed the shell script to avoid the 3 second timeout (which makes
> this much more manageable) and gdm3 just keeps respawning using
> gdm-simple-slave, incrementing the --display-id each time.

As mentioned on IRC, there is already some code to handle GdmDisplay
respawning too fast. See on_display_status_changed() in
gdm-local-display-factory.c.

I’m interested in logs with debugging enabled, especially stuff like
“GdmLocalDisplayFactory: display status changed”.

Cheers,
-- 
 .''`.      Josselin Mouette
: :' :
`. `'
  `-




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#681830; Package gdm3. (Mon, 28 Jan 2013 15:54:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Mon, 28 Jan 2013 15:54:05 GMT) Full text and rfc822 format available.

Message #42 received at 681830@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 681830@bugs.debian.org
Subject: debug logs
Date: Mon, 28 Jan 2013 15:50:41 +0000
[Message part 1 (text/plain, inline)]
On Sun, 27 Jan 2013 19:42:47 +0000
Neil Williams <codehelp@debian.org> wrote:

> I made a fresh Wheezy GNOME3 install on a desktop machine (so that the
> display could be disconnected more easily) and had the GDM3 welcome
> screen on display. 

I've now been able to reproduce this on a laptop, as long as it is the
main X session and not a virtualbox or similar, so that access is
preserved to the virtual terminals.

As requested, I've rebuilt gdm3 with the --enable-debug switch
to ./configure and repeated the test with a simple shell script
replacing /usr/bin/Xorg which is just sleep 4 ; exit 1

This should mean that anyone with an old Debian box can test this bug,
it just needs access to the virtual terminals. A simple
# mv /Xorg /usr/bin
# invoke-rc.d gdm3 start
to restore the system.

If the output in /var/log/gdm3 was more useful, it could possibly be
done inside a virtualbox instance, just by replacing /usr/bin/Xorg
with a suitable shell script which exits nonzero.

> I changed the shell script to avoid the 3 second timeout (which makes
> this much more manageable) and gdm3 just keeps respawning using
> gdm-simple-slave, incrementing the --display-id each time.

This behaviour (monitored via htop on a virtual terminal) was
reproduced - I left the test running until the ID was at least 12 or
higher before switching back to the virtual terminal which started gdm3
and killing it with Ctrl-C.

I've attached a tarball of all of the /var/log/gdm3/*greeter* log files
which were the only files in /var/log/gdm3/ which were not zero length
after the tests.

This test machine is an old laptop of mine which was upgraded to Wheezy
this morning and has a working (if clunky) X session normally.

> As mentioned on IRC, there is already some code to handle GdmDisplay
> respawning too fast. See on_display_status_changed() in
> gdm-local-display-factory.c.
> 
> I’m interested in logs with debugging enabled, especially stuff like
> “GdmLocalDisplayFactory: display status changed”.

I get no such matches in the attached logs, I'm afraid. Indeed, I don't
get any output from the logs during the re-spawning itself. Even
watching the files in /var/log/gdm3 with tail -f whilst the problem is
occurring shows no log entries being added during the restart
operations.

I have put commands into the /usr/bin/Xorg shell script replacement and
I can see that output being written to a test file, but no
corresponding entry is made either on the terminal running gdm3 or in
the files in /var/log/gdm3/

I have also tried with and without --fatal-warnings, with no effect.

This bug appears readily reproducible, assuming that
replacing /usr/bin/Xorg temporarily is a suitable mimic of the original
problem reported.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

[gdm3-logs.tgz (application/x-gtar-compressed, attachment)]
[Message part 3 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#681830; Package gdm3. (Mon, 28 Jan 2013 16:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Mon, 28 Jan 2013 16:03:03 GMT) Full text and rfc822 format available.

Message #47 received at 681830@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 681830@bugs.debian.org
Subject: Re: debug logs
Date: Mon, 28 Jan 2013 16:00:26 +0000
[Message part 1 (text/plain, inline)]
Attaching the logs resulting from editing /etc/gdm3/daemon.conf and
redirecting stdout and stderr to a file.

As before, between 12 and 20 iterations were allowed before killing the gdm3 process.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

[debug.log (application/octet-stream, attachment)]
[Message part 3 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#681830; Package gdm3. (Wed, 06 Feb 2013 09:18:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sébastien Villemot <sebastien@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Wed, 06 Feb 2013 09:18:03 GMT) Full text and rfc822 format available.

Message #52 received at 681830@bugs.debian.org (full text, mbox):

From: Sébastien Villemot <sebastien@debian.org>
To: Neil Williams <codehelp@debian.org>, 681830@bugs.debian.org, kibi@debian.org
Subject: Re: Bug#681830: gdm3: spawns X continuously when gnome-session dies
Date: Wed, 06 Feb 2013 10:16:17 +0100
[Message part 1 (text/plain, inline)]
Hi,

AIUI, GDM considers that an X server that has lasted more than 3 seconds
has not failed. The fact that it respawns it indefinitely is therefore
an intended and desirable behavior (one could discuss whether 3 seconds
is enough, but I think this is a different topic). This is what Neil's
debug logs are about.

For the case where X lasts less than 3 seconds, GDM has a mechanism that
is supposed to stop respawning after a certain number of tries. This
mechanism however does not work, as Cyril initially reported, and as
Neil reproduced by replacing /usr/bin/Xorg with a simple "exit 1" shell
script.

I attach a debug log corresponding to that latter case. As one can see,
before moving into GDM_DISPLAY_FAILED state, the display is first moved
to the GDM_DISPLAY_FINISHED state. The problem is that the code handling
the GDM_DISPLAY_FINISHED state resets to zero the counter of the number
of failures (line 330 of gdm-local-display-factory.c). Hence the maximum
number of failures is never reached, and GDM spawns X servers like
crazy.

-- 
 .''`.    Sébastien Villemot
: :' :    Debian Developer
`. `'     http://www.dynare.org/sebastien
  `-      GPG Key: 4096R/381A7594

[debug.log.xz (application/x-xz, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#681830; Package gdm3. (Sun, 10 Feb 2013 14:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sébastien Villemot <sebastien@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Sun, 10 Feb 2013 14:45:03 GMT) Full text and rfc822 format available.

Message #57 received at 681830@bugs.debian.org (full text, mbox):

From: Sébastien Villemot <sebastien@debian.org>
To: 681830@bugs.debian.org
Cc: Neil Williams <codehelp@debian.org>, joss@debian.org
Subject: Re: Bug#681830: gdm3: spawns X continuously when gnome-session dies
Date: Sun, 10 Feb 2013 15:40:34 +0100
[Message part 1 (text/plain, inline)]
Control: tags -1 + patch

First, I verified that the bug is not present in vanilla GDM3. It is
introduced by the patches about transient displays and switch_on_finish
property.

More precisely, the problem is introduced by
21_static_display_purge.patch. In the "finish" method of
GdmStaticDisplay, this patch adds a call to the "finish" method of the
parent. The latter parent method changes the status of the display to
the FINISHED state, which in turn triggers a reset of the number of
failures and spawns a new display. The problem is that the FINISHED
state is reached before the FAILED state.

I could verify that the attached patch fixes the problem. And it is
rather clear that the patch does not affect the behavior when the X
server does not fail.

joss: Are you ok with this patch? Moreover, do you think it should be
added as a separate quilt patch, or merged into
21_static_display_purge.patch?

-- 
 .''`.    Sébastien Villemot
: :' :    Debian Developer
`. `'     http://www.dynare.org/sebastien
  `-      GPG Key: 4096R/381A7594

[bug681830.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Added tag(s) patch. Request was from Sébastien Villemot <sebastien@debian.org> to 681830-submit@bugs.debian.org. (Sun, 10 Feb 2013 14:45:03 GMT) Full text and rfc822 format available.

Reply sent to Josselin Mouette <joss@debian.org>:
You have taken responsibility. (Sun, 10 Feb 2013 17:06:03 GMT) Full text and rfc822 format available.

Notification sent to Cyril Brulebois <kibi@debian.org>:
Bug acknowledged by developer. (Sun, 10 Feb 2013 17:06:03 GMT) Full text and rfc822 format available.

Message #64 received at 681830-close@bugs.debian.org (full text, mbox):

From: Josselin Mouette <joss@debian.org>
To: 681830-close@bugs.debian.org
Subject: Bug#681830: fixed in gdm3 3.4.1-6
Date: Sun, 10 Feb 2013 17:02:36 +0000
Source: gdm3
Source-Version: 3.4.1-6

We believe that the bug you reported is fixed in the latest version of
gdm3, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 681830@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Josselin Mouette <joss@debian.org> (supplier of updated gdm3 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 10 Feb 2013 17:46:18 +0100
Source: gdm3
Binary: gdm3
Architecture: source amd64
Version: 3.4.1-6
Distribution: unstable
Urgency: low
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Changed-By: Josselin Mouette <joss@debian.org>
Description: 
 gdm3       - Next generation GNOME Display Manager
Closes: 681830
Changes: 
 gdm3 (3.4.1-6) unstable; urgency=low
 .
   * 24_move_failure_detection.patch: new patch. Detect when a display is
     in FAILED state at finish() time, not unmanage(). This makes the
     logic for restarting displays upon failure correct. Closes: #681830.
     Thanks a lot to Sébastien Villemot for his spot-on analysis of the
     bug’s cause.
Checksums-Sha1: 
 cd8070ae8a87c50452d32687501df0c54031bc71 2089 gdm3_3.4.1-6.dsc
 b7ca8b1b6ab08cd33250011488a5e46daf04d419 121841 gdm3_3.4.1-6.debian.tar.gz
 7b67e5d37f497b71d71aa89cab1efd2426ccb9bc 764080 gdm3_3.4.1-6_amd64.deb
Checksums-Sha256: 
 1cfa9474fb2c1851f5de00cd3c340d0ee921508e021ce84471faad1857c30c9a 2089 gdm3_3.4.1-6.dsc
 c41e2ca7d2b227b946382b3329558ac93f546a61b332869ca3bc7b800fc4936f 121841 gdm3_3.4.1-6.debian.tar.gz
 e29a2627e87496055c9b548fc14f6050a14a4ec0b8cee3d6e9344f13ec71e694 764080 gdm3_3.4.1-6_amd64.deb
Files: 
 4bf2132d5ed32d3b9efb92b2a7e1f431 2089 gnome optional gdm3_3.4.1-6.dsc
 2db3c77f916d3dffaff1dbd2c981251f 121841 gnome optional gdm3_3.4.1-6.debian.tar.gz
 fe7a6a5f22bc25f495076b6ac4e3097f 764080 gnome optional gdm3_3.4.1-6_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iD8DBQFRF9CfrSla4ddfhTMRAnJ3AKDONDcoubrWT28hYhizL5esmFU8ogCghhfA
ZivRBC2pHeNB25aC652XyB8=
=DUaU
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 21 Mar 2013 07:25:47 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 10:52:03 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.