Xenial -> Bionic - System fails to boot after upgrade - gnome-screensaver & gnome-shell fail to start?

Bug #1765724 reported by Jean-Baptiste Lallement
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cryptsetup (Ubuntu)
Invalid
Critical
Unassigned
gnome-shell (Ubuntu)
Expired
Undecided
Unassigned
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Test Case:
1. Install Xenial Desktop with encrypted home
2. Upgrade to bionic
3. Reboot

Actual Result
The system appears to fail to start gnome-shell / gnome-screensaver:

Apr 23 14:17:12 ubuntu dbus-daemon[1645]: [session uid=121 pid=1645] Activating service name='org.gnome.ScreenSaver' requested by ':1.3' (uid=121 pid=1647 comm="/usr/lib/gnome-session/gnome-session-binary --auto
Apr 23 14:17:12 ubuntu org.gnome.ScreenSaver[1645]: Unable to init server: Could not connect: Connection refused
Apr 23 14:17:12 ubuntu gnome-screensav[1654]: Cannot open display:
Apr 23 14:17:12 ubuntu dbus-daemon[1645]: [session uid=121 pid=1645] Activated service 'org.gnome.ScreenSaver' failed: Process org.gnome.ScreenSaver exited with status 1
Apr 23 14:17:12 ubuntu gnome-session[1647]: gnome-session-binary[1647]: CRITICAL: Unable to create a DBus proxy for GnomeScreensaver: Error calling StartServiceByName for org.gnome.ScreenSaver: GDBus.Error:org.f
Apr 23 14:17:12 ubuntu gnome-session-binary[1647]: CRITICAL: Unable to create a DBus proxy for GnomeScreensaver: Error calling StartServiceByName for org.gnome.ScreenSaver: GDBus.Error:org.freedesktop.DBus.Error
Apr 23 14:17:12 ubuntu gnome-shell[1656]: Failed to create backend: Could not find a primary drm kms device
Apr 23 14:17:12 ubuntu gnome-session[1647]: gnome-session-binary[1647]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
Apr 23 14:17:12 ubuntu gnome-session-binary[1647]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
Apr 23 14:17:12 ubuntu gnome-session-binary[1647]: Unrecoverable failure in required component org.gnome.Shell.desktop
Apr 23 14:17:12 ubuntu gdm-launch-environment][1627]: pam_unix(gdm-launch-environment:session): session closed for user gdm
Apr 23 14:17:12 ubuntu gdm3[1187]: GdmDisplay: display lasted 0.292659 seconds
Apr 23 14:17:12 ubuntu systemd-logind[1028]: Removed session c2.
Apr 23 14:17:12 ubuntu spice-vdagentd[1186]: Error getting active session: No data available
Apr 23 14:17:12 ubuntu spice-vdagentd[1186]: Error getting active session: No data available
Apr 23 14:17:12 ubuntu gdm3[1187]: Child process -1643 was already dead.

Also the system hangs on boot when it activates the encrypted swap. There are the following entries in the journal:
$ journalctl -b-1 -o short-monotonic |grep crypt
[ 1.535326] ubuntu kernel: Key type encrypted registered
[ 125.637205] ubuntu systemd[1]: Dependency failed for Cryptography Setup for cryptswap1.
[ 125.637789] ubuntu systemd[1]: Dependency failed for dev-mapper-cryptswap1.device.
[ 125.638311] ubuntu systemd[1]: Dependency failed for /dev/mapper/cryptswap1.
[ 125.639351] ubuntu systemd[1]: dev-mapper-cryptswap1.swap: Job dev-mapper-cryptswap1.swap/start failed with result 'dependency'.
[ 125.639478] ubuntu systemd[1]: dev-mapper-cryptswap1.device: Job dev-mapper-cryptswap1.device/start failed with result 'dependency'.
[ 125.639594] ubuntu systemd[1]: Dependency failed for Local Encrypted Volumes.
[ 125.640128] ubuntu systemd[1]: cryptsetup.target: Job cryptsetup.target/start failed with result 'dependency'.
[ 125.640266] ubuntu systemd[1]: <email address hidden>: Job <email address hidden>/start failed with result 'dependency'.
[ 383.902153] ubuntu systemd[1]: Starting Cryptography Setup for cryptswap1...
[ 383.913899] ubuntu systemd-cryptsetup[672]: Set cipher aes, mode xts-plain64, key size 256 bits for device /dev/disk/by-uuid/34ea85fd-854b-4892-95b9-7073dd2dbf7b.
[ 384.138596] ubuntu systemd[1]: Started Cryptography Setup for cryptswap1.
[ 384.143845] ubuntu systemd[1]: Reached target Local Encrypted Volumes.
[ 384.167475] ubuntu systemd[1]: Found device /dev/mapper/cryptswap1.
[ 384.171327] ubuntu systemd[1]: Activating swap /dev/mapper/cryptswap1...
[ 384.184639] ubuntu kernel: Adding 2093564k swap on /dev/mapper/cryptswap1. Priority:-2 extents:1 across:2093564k FS
[ 384.191435] ubuntu systemd[1]: Activated swap /dev/mapper/cryptswap1.

But eventually activates, once the device is there. Note this is not a hang, as timeouts are reached "instantly".

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: cryptsetup 2:2.0.2-1ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-15.16-generic 4.15.15
Uname: Linux 4.15.0-15-generic x86_64
ApportVersion: 2.20.9-0ubuntu5
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri Apr 20 15:56:52 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2018-04-18 (2 days ago)
InstallationMedia: Ubuntu 16.04.4 LTS "Xenial Xerus" - Release amd64 (20180228)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: cryptsetup
UpgradeStatus: Upgraded to bionic on 2018-04-20 (0 days ago)
cmdline: BOOT_IMAGE=/boot/vmlinuz-4.15.0-15-generic root=UUID=ba774fed-a987-4070-9571-0e4790b08680 ro recovery nomodeset
crypttab: cryptswap1 UUID=34ea85fd-854b-4892-95b9-7073dd2dbf7b /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
tags: added: rls-bb-incoming
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Similar to bug 1736072

Note that in the fstab attached I commented out the swap entry to allow the system to boot.

Changed in cryptsetup (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Ian Hodgson (hodgson-ian75) wrote :

I am finding something possibly related (as are a few that have posted on Reddit). After update I can boot but I get 'welcome to ubuntu' screen and everything freezes. I can press enter to get through the welcome wizard but after that nothing works except the mouse pointer. Boring into Wayland doesn't work either. I can Alt F3 and login to a terminal. Could someone advise me what to do from here so I can provide a log.

Ian

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

/var/log with a failed boot.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

$ sudo blkid
[sudo] password for ubuntu:
/dev/vda1: UUID="b3ffe16f-0cd1-4cf1-b886-528cc4fd6f3e" TYPE="ext4" PARTUUID="47db2999-01"
/dev/vda5: UUID="387abb3c-c278-4c33-9573-39481a177c8b" TYPE="swap" PARTUUID="47db2999-05"
/dev/mapper/cryptswap1: UUID="1d5f641c-047c-497e-bd9b-163c9d10a3e4" TYPE="swap"

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

tarball of /run after enabling swap and running systemctl daemon-reload

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

and /etc

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

There are multiple things that I have identified that prevent quick boots with systems configured with encrypted swap.

1) resume device is most likely incorrect
Steps to mitigate:
$ echo RESUME=none | sudo tee -a /etc/initramfs-tools/conf.d/resume
$ sudo initramfs-update -u

2) systems, not in fact hanging to boot...

I can reproduce and see the timeouts reliably in the log, but they are not causing the system to fail to boot and the systems do come up non-degraged. Specifically eventually during boot and after a few Job Timeouts, the swap does come up and is activated.

If you experience this, please switch to tty3 and do:
$ systemctl is-system-running
$ systemctl list-units --failed

If that is "running", and no units are listed, all is good. On the systems I've reproduced the timeout on, they would boot non-degraded without any failed units.

I wonder if the system is simply still upgrading... for example, I can see in jibel's logs that e.g. there is a tonne of incomplete upgrades due to .dpkg-new and .dpkg-tmp files:

Apr 23 08:46:25 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-sudoku.desktop.dpkg-tmp file: cannot process file of type text/plain
Apr 23 08:46:25 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-sudoku.desktop file: cannot process file of type application/x-desktop
Apr 23 08:46:26 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-system-log.desktop.dpkg-new file: Error opening file: Permission denied
Apr 23 08:46:26 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-system-log.desktop.dpkg-tmp file: cannot process file of type text/plain
Apr 23 08:46:26 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-system-log.desktop file: cannot process file of type application/x-desktop
Apr 23 08:46:27 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-system-monitor-kde.desktop.dpkg-new file: Error opening file: Permission denied

And similar.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Download full text (3.3 KiB)

From dist-upgrade logs:
2018-04-23 09:04:43,230 ERROR got error from PostInstallScript ./xorg_fix_proprietary.py (g-exec-error-quark: Failed to
execute child process "./xorg_fix_proprietary.py" (No such file or directory) (8))

From journal:
screensaver is broken?
Apr 23 14:17:10 ubuntu org.gnome.ScreenSaver[1341]: Unable to init server: Could not connect: Connection refused
Apr 23 14:17:10 ubuntu gnome-screensav[1390]: Cannot open display:

gnome-shell fails to start?
Apr 23 14:17:12 ubuntu gnome-shell[1606]: Failed to create backend: Could not find a primary drm kms device
Apr 23 14:17:12 ubuntu gnome-session[1355]: gnome-session-binary[1355]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
Apr 23 14:17:12 ubuntu gnome-session-binary[1355]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
Apr 23 14:17:12 ubuntu gnome-session-binary[1355]: Unrecoverable failure in required component org.gnome.Shell.desktop
Apr 23 14:17:12 ubuntu gdm-launch-environment][1195]: pam_unix(gdm-launch-environment:session): session closed for user gdm
Apr 23 14:17:12 ubuntu systemd-logind[1028]: Removed session c1.
Apr 23 14:17:12 ubuntu spice-vdagentd[1186]: Error getting active session: No data available

Apr 23 14:17:12 ubuntu dbus-daemon[1645]: [session uid=121 pid=1645] Activating service name='org.gnome.ScreenSaver' requested by ':1.3' (uid=121 pid=1647 comm="/usr/lib/gnome-session/gnome-session-binary --auto
Apr 23 14:17:12 ubuntu org.gnome.ScreenSaver[1645]: Unable to init server: Could not connect: Connection refused
Apr 23 14:17:12 ubuntu gnome-screensav[1654]: Cannot open display:
Apr 23 14:17:12 ubuntu dbus-daemon[1645]: [session uid=121 pid=1645] Activated service 'org.gnome.ScreenSaver' failed: Process org.gnome.ScreenSaver exited with status 1
Apr 23 14:17:12 ubuntu gnome-session[1647]: gnome-session-binary[1647]: CRITICAL: Unable to create a DBus proxy for GnomeScreensaver: Error calling StartServiceByName for org.gnome.ScreenSaver: GDBus.Error:org.f
Apr 23 14:17:12 ubuntu gnome-session-binary[1647]: CRITICAL: Unable to create a DBus proxy for GnomeScreensaver: Error calling StartServiceByName for org.gnome.ScreenSaver: GDBus.Error:org.freedesktop.DBus.Error
Apr 23 14:17:12 ubuntu gnome-shell[1656]: Failed to create backend: Could not find a primary drm kms device
Apr 23 14:17:12 ubuntu gnome-session[1647]: gnome-session-binary[1647]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
Apr 23 14:17:12 ubuntu gnome-session-binary[1647]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
Apr 23 14:17:12 ubuntu gnome-session-binary[1647]: Unrecoverable failure in required component org.gnome.Shell.desktop
Apr 23 14:17:12 ubuntu gdm-launch-environment][1627]: pam_unix(gdm-launch-environment:session): session closed for user gdm
Apr 23 14:17:12 ubuntu gdm3[1187]: GdmDisplay: display lasted 0.292659 seconds
Apr 23 14:17:12 ubuntu systemd-logind[1028]: Removed session c2.
Apr 23 14:17:12 ubuntu spice-vdagentd[1186]: Error getting active session: No data available
Apr 23 14:17:12 ubuntu spice-vdagentd[1186]: Error getting active session: No data available
Apr 23 14:17:12 ubuntu gdm3[1187]: Child process -1643 was already d...

Read more...

Changed in cryptsetup (Ubuntu):
status: New → Invalid
Changed in systemd (Ubuntu):
status: New → Invalid
summary: - Xenial -> Bionic - System fails to boot after upgrade - systemd-
- cryptsetup@cryptswap1.service fails to start
+ Xenial -> Bionic - System fails to boot after upgrade - gnome-
+ screensaver & gnome-shell fail to start?
description: updated
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I cannot reproduce this issue anymore with a fresh installation of xenial upgraded to bionic. I'm wondering if the fontconfig fix that delayed the boot was causing this issue (bug 1749546)

Setting to incomplete.

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
tags: added: rls-bb-notfixing
removed: rls-bb-incoming
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gnome-shell (Ubuntu) because there has been no activity for 60 days.]

Changed in gnome-shell (Ubuntu):
status: Incomplete → Expired
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.