gdm3 in cosmic fails to start fully in autopkgtest

Bug #1790478 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
New
Undecided
Unassigned
systemd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In systemd package for a while, there is a boot-and-services test case, which tries to install common/typical things and ensure they continue to operate with new systemd.

One of the test cases is gdm3. The test case dependencies are:

Tests: boot-and-services
Depends: systemd-sysv,
  systemd,
  udev,
  systemd-container,
  systemd-coredump,
  libpam-systemd,
  xserver-xorg-video-dummy,
  xserver-xorg,
  gdm3 [!s390x],
  cron,
  network-manager,
  busybox-static,
  apparmor,
  pkg-config,
  python3

The test does following:
out = subprocess.check_output(['ps', 'u', '-C', 'gdm-x-session'])
self.assertIn(b'gdm-x-session gnome-session', out)
out = subprocess.check_output(['ps', 'u', '-C', 'Xorg'])
self.assertIn(b'Xorg vt1', out)
self.active_unit('gdm')

However, this now errors out upon the first command, meaning gdm-x-session is not running anymore.
On bionic, this test case continues to operate correctly in the autopkgtest cloud.

test_gdm3 (__main__.ServicesTest) ... ERROR

======================================================================
ERROR: test_gdm3 (__main__.ServicesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.RNx2A1/build.2Wy/src/debian/tests/boot-and-services", line 66, in test_gdm3
    out = subprocess.check_output(['ps', 'u', '-C', 'gdm-x-session'])
  File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ps', 'u', '-C', 'gdm-x-session']' returned non-zero exit status 1.

----------------------------------------------------------------------
Ran 24 tests in 18.974s

FAILED (errors=1)

From http://autopkgtest.ubuntu.com/packages/systemd/cosmic/i386

Thus it looks like there is a regression or a change of behavior of gdm3 in the cloud in cosmic; since bionic continues to work correctly.

I will mark this test as an expected failure for now, and monitor it separately, as currently, this is blocking many migrations.

Tags: autopkgtest
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I have found this to be locally reproducible with:
$ autopkgtest --shell-fail --apt-upgrade --no-built-binaries --testname=boot-and-services --apt-pocket=proposed=src:systemd,src:dbus,src:iproute2,src:glibc systemd_239-7ubuntu6.dsc -- qemu --qemu-options='-cpu host' --qemu-command=qemu-system-i386 --cpus 8 --ram-size=4096 ~/autopkgtest-cosmic-i386.img

What I see is that it really is failing.
There are plenty of crashes in journal but those seem to be a swarm of red herring.

The first start of gdm ends with X11 initializing and giving up like:
/usr/lib/gdm3/gdm-x-session[pid]: dbus-daemon[1112]: [session uid=119 pid=1112] Activating service name='org.freedesktop.systemd1' requested by ':1.0' (uid=119 pid=1053 comm="/usr/lib/gdm3/gdm-x-session gnome-session --autost" label="unconfined")
/usr/lib/gdm3/gdm-x-session[pid]: dbus-daemon[1112]: [session uid=119 pid=1112] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
/usr/lib/gdm3/gdm-x-session[pid]: Unable to register display with display manager

But if you log in later and run "systemctl restart gdm" then all initializes as it is supposed to.
It seems something yet unknown isn't available at early boot.

I compared the X11 init of good/bad case but there is no difference (e.g. in detected HW), the first things that fails/differs is the org.freedesktop.systemd1 activation.

But the boot start of gdm seems to be really (too early?) as halfway through I see:
  "Reached target Basic System"

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I just found that further calls to
  $ sudo systemctl restart gdm

Seem to alternate between good/bad state.

Here is the log of one such bad restarts: http://paste.ubuntu.com/p/Dx7Sk3wDyx/

OTOH, the service could just in general not be restarable - so take this with a grain of salt

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Try gdm version 3.29.92, which has a fix for some rather serious issues:

https://bugs.launchpad.net/ubuntu/+source/gdm3/+bugs?field.tag=fixed-in-gdm-3.29.92

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

...ubuntu7 completed tonight thanks!
I tested 2 times from proposed in the local tester and working as expected now.

Unfortunately the systemd upload itself failed at some of the flaky (boot and smoke) tests. But it seemed more like the VM it ran in would be dead.

I retriggered the 4 tests (systemd, iproute2, cryptsetup, dbus) currently blocked on i386-systemd with appropriate triggers (currently triggers need: glibc, dbus, systemd).

So in a few hours we know if those now resolve ...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

@Daniel: the latest gdm even in proposed that Dimitri and I can easily try is currently 3.29.91-1ubuntu2

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 239-7ubuntu7

---------------
systemd (239-7ubuntu7) cosmic; urgency=medium

  * boot-and-services: skip gdm test, when gdm-x-session fails.
    Across all architectures, gdm fails to come up reliably since cosmic.
    (LP: #1790478)

 -- Dimitri John Ledkov <email address hidden> Mon, 03 Sep 2018 16:33:00 +0100

Changed in systemd (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.