Bug 7468 - Sessions fail to start when upgrading from Ubuntu 16.04
Summary: Sessions fail to start when upgrading from Ubuntu 16.04
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Server OS (show other bugs)
Version: 4.11.0
Hardware: PC Linux Ubuntu
: P2 Major
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-06 17:31 CET by Peter Bortas
Modified: 2023-11-21 08:06 CET (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments
xinit.log from failed session (6.21 KB, text/plain)
2020-02-06 22:32 CET, Peter Bortas
Details

Description Peter Bortas 2020-02-06 17:31:12 CET
A server running ThinLinc 4.11.0 on Ubuntu 16.04 had Ubuntu upgraded to 18.04. After this all sessions are thrown out after clicking OK on the "Welcome to ThinLinc dialog with the following in the server system log:

Feb  6 16:56:06 crux dbus-daemon[5712]: [session uid=1000 pid=5710] AppArmor D-Bus mediation is enabled
Feb  6 16:56:06 crux dbus-daemon[5712]: [session uid=1000 pid=5710] Activating service name='org.freedesktop.systemd1' requested by ':1.0' (uid=1000 pid=5713 comm="dbus-update-activation-environment --systemd DISPL" label="unconfined")
Feb  6 16:56:06 crux dbus-daemon[5712]: [session uid=1000 pid=5710] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
Feb  6 16:56:09 crux dbus-daemon[5712]: [session uid=1000 pid=5710] Activating service name='org.freedesktop.systemd1' requested by ':1.1' (uid=1000 pid=5818 comm="dbus-update-activation-environment --systemd --all" label="unconfined")
Feb  6 16:56:09 crux dbus-daemon[5712]: [session uid=1000 pid=5710] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1

Rerunning tl-config had no effect.

I could not find anything in the documentation regarding upgrades. Is there something I missed?
Comment 1 Pierre Ossman cendio 2020-02-06 21:38:35 CET
We'll need to see the session log (xinit.log) from one of these sessions to debug things further. You might want to send it to our support address instead if you don't want to share it publicly.
Comment 2 Peter Bortas 2020-02-06 22:32:14 CET
Created attachment 919 [details]
xinit.log from failed session
Comment 3 Peter Bortas 2020-02-06 22:37:26 CET
Only exposing my own session, so it's GDPR safe
Comment 4 Pierre Ossman cendio 2020-02-07 15:14:08 CET
The issue is here:

> Executing XDG session command: init --user
> init: unrecognized option '--user'

This is something we've seen before (bug 7168) but haven't pinpointed the cause of. Somehow something goes wrong with the upgrade of upstart. It's odd that it happens between 16.04 and 18.04 though. We would have expected it when upgrading from 14.04 (i.e. when switching to systemd).

Can you check if the file /etc/upstart-xsessions exists? And if it does, which package owns it? You can check this by running "dpkg-query -S /etc/upstart-xsessions".
Comment 5 Peter Bortas 2020-02-07 15:22:44 CET
zino@crux:~$ ls -l /etc/upstart-xsessions
-rw-r--r-- 1 root root 270 Feb 29  2016 /etc/upstart-xsessions
zino@crux:~$ dpkg-query -S /etc/upstart-xsessions
upstart: /etc/upstart-xsessions

The notes for this machine states that it was originally installed with 14.04 in Jan 2016 and upgraded to 16.04 later that year.
Comment 6 Pierre Ossman cendio 2020-02-07 15:39:23 CET
Alright, that explains the bad behaviour partially then at least. I would have expected ThinLinc to try to use upstart in that case.

Does /usr/sbin/upstart exist? And is it found if you do "which upstart" as a normal user?

If it doesn't exist, then what does "dpkg-query -s upstart" say?
Comment 7 Peter Bortas 2020-02-07 15:49:04 CET
zino@crux:~$ ls -l /usr/sbin/upstart
ls: cannot access '/usr/sbin/upstart': No such file or directory
zino@crux:~$ dpkg-query -s upstart
Package: upstart
Status: deinstall ok config-files
Priority: required
Section: admin
Installed-Size: 1654
Maintainer: James Hunt <james.hunt@ubuntu.com>
Architecture: amd64
Multi-Arch: foreign
Version: 1.13.2-0ubuntu21.1
Config-Version: 1.13.2-0ubuntu21.1
Replaces: init-system-helpers (<< 1.24ubuntu1), startup-tasks, system-services, sysvinit, upstart-bin (<< 1.13.2-0ubuntu10~), upstart-job
Provides: startup-tasks, system-services, upstart-compat-sysv, upstart-job
Depends: libc6 (>= 2.15), libcgmanager0 (>= 0.28), libdbus-1-3 (>= 1.9.14), libjson-c2 (>= 0.10), libnih-dbus1 (>= 1.0.0), libnih1 (>= 1.0.0), libudev1 (>= 183), sysvinit-utils, initscripts, mountall, ifupdown (>= 0.6.10ubuntu5), debianutils (>= 4)
Suggests: python3, graphviz, bash-completion, upstart-monitor
Breaks: friendly-recovery (<< 0.2.13), initramfs-tools (<< 0.103ubuntu8), libc6 (<< 2.12.1-0ubuntu12), upstart-bin (<< 1.13.2-0ubuntu10~)
Conflicts: lxcguest, startup-tasks, system-services, sysvinit, upstart-job
Conffiles:
 /etc/X11/Xsession.d/00upstart 46b4576b1f2ceffb2450a88d58786b95
 /etc/X11/Xsession.d/99upstart f8bc04672e2d4b60ab318197500b4e98
 /etc/cron.daily/upstart 0f9c6a5212b1e63666337414e812c8e8
 /etc/dbus-1/system.d/Upstart.conf 64be74cddb0c74b7d98202b40389784c
 /etc/init/console.conf 8d79b0205f2daffb473604ce53e1dc83
 /etc/init/container-detect.conf 6bae6257355ad7322e7263e567817465
 /etc/init/control-alt-delete.conf 16e6603524084b63b0f0ca04eb56757e
 /etc/init/failsafe.conf 0b88eeccf6c8fd456e886aa7a76e3291
 /etc/init/flush-early-job-log.conf 09e959647877c39f6490ad29b8a35a28
 /etc/init/rc-sysinit.conf a50c045d9390a6e6c43c18b19cd72fe5
 /etc/init/rc.conf 3ebc6ddcd00482cfb24ce09a14ded29f
 /etc/init/rcS.conf 8533688686f75d7bcf20da5a0d36d94b
 /etc/init/shutdown.conf 559659602cefe7e8d3c1e76820f5ae5d
 /etc/init/tty1.conf f42f2298f711147ecf177054294861a7
 /etc/init/tty2.conf 0d9326fdda081ac96d92bbc57ff773e4
 /etc/init/tty3.conf 6608f08adf00a282358a1eeb9bdcf78e
 /etc/init/tty4.conf 2c78cd865d848bb2674104905151dbe2
 /etc/init/tty5.conf 6d5794f72a1098b008e53e326a6bb5a0
 /etc/init/tty6.conf e8ad2f0411614f9c8dc9c4e364763549
 /etc/init/upstart-file-bridge.conf 57ea7ed6cba1f1259ac87410c59237ca
 /etc/init/upstart-socket-bridge.conf 5f3eaca09ee1f03d5d0686ea99f8c051
 /etc/init/upstart-udev-bridge.conf 2c24bb70877476b5e7016ccf6de745a4
 /etc/init/wait-for-state.conf 20b85b55c3f1e040fdbbf669afe4d2a1
 /etc/logrotate.d/upstart 070767086a27883ec119e1dde779a856
 /etc/upstart-xsessions 61d640ee115c63b330a6e321c00f48a9
 /etc/bash_completion.d/upstart 080f7eee4a3f3e5f76197eaa581fb4da obsolete
Description: event-based init daemon - essential binaries
 upstart is a replacement for the /sbin/init daemon which handles
 starting of tasks and services during boot, stopping them during
 shutdown and supervising them while the system is running.
 .
 This package provides all essential upstart components, sufficient
 for running user sessions managed by upstart.
Homepage: http://upstart.ubuntu.com/
Orig-Maintainer: Steve Langasek <vorlon@debian.org>
Comment 8 Pierre Ossman cendio 2020-02-10 11:35:21 CET
Ah, all right. The problem is that upstart is uninstalled but its config files remain.

We can see if we can handle this case in the future. Until then you can work around this by doing `dpkg --purge upstart` which should remove the stray config files.
Comment 9 Peter Bortas 2020-02-10 20:24:48 CET
Worked perfectly. Thanks for the help!
Comment 13 Pierre Ossman cendio 2023-11-20 08:57:53 CET
Ubuntu 16.04 has been EOL for some time now, even 18.04 is EOL. Perhaps we can just remove this old code from the profile launcher?

Note You need to log in before you can comment on or make changes to this bug.