Subject: systemd: system startup stops unless root logs in in text mode

From: Ara Keary <[email-masked]>
Date: Fri, 20 Jul 2018 08:31:09 +0200

Package: systemd
Version: 239-6
Severity: important

Dear maintainers,

since upgrading to systemd 239-6, my systems stops during startup, at a text
mode login prompt. Switching to other consoles with alt+ctrl+F1-8 gives no
graphical manager.

As soon as i log in as root, the system continues starting up and goes to the
graphical login manager (of kde).

In the syslog entry below, i log in as root at 07:51:58 ; before that nothing
happens (apart from timesyncd noise). I tried this several times and it is
reproducible: root login in text mode is mandatory for systemd to finish
startup.

(Note that the text login is not an "emergency" login after a crash).

Best,

Ara
________________________

excerpt of /var/log/syslog :

Jul 20 07:51:21 hp-zb-psm systemd[1]: Reloaded OpenBSD Secure Shell server.
Jul 20 07:51:22 hp-zb-psm avahi-daemon[1150]: Server startup complete. Host
name is hp-zb-psm.local. Local service cookie is 3715862264.
Jul 20 07:51:35 hp-zb-psm systemd-timesyncd[605]: Timed out waiting for reply
from 94.23.0.110:123 (2.debian.pool.ntp.org).
Jul 20 07:51:46 hp-zb-psm systemd-timesyncd[605]: Timed out waiting for reply
from 94.23.254.175:123 (2.debian.pool.ntp.org).
Jul 20 07:51:56 hp-zb-psm systemd-timesyncd[605]: Timed out waiting for reply
from 149.202.97.123:123 (2.debian.pool.ntp.org).
Jul 20 07:51:58 hp-zb-psm systemd[1]: Created slice User Slice of UID 0.
Jul 20 07:51:58 hp-zb-psm systemd[1]: Created slice system-
user\x2druntime\x2ddir.slice.
Jul 20 07:51:58 hp-zb-psm systemd[1]: Started /run/user/0 mount wrapper.
Jul 20 07:51:58 hp-zb-psm systemd[1]: Starting User Manager for UID 0...
Jul 20 07:51:58 hp-zb-psm systemd[1]: Started Session 1 of user root.
Jul 20 07:51:58 hp-zb-psm systemd[1205]:
/usr/lib/environment.d/99-environment.conf:2: invalid variable name "export
GTK_IM_MODULE", ignoring.
Jul 20 07:51:58 hp-zb-psm systemd[1205]:
/usr/lib/environment.d/99-environment.conf:3: invalid variable name "export
QT_IM_MODULE", ignoring.
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Listening on GnuPG cryptographic agent
(ssh-agent emulation).
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Reached target Paths.
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Reached target Timers.
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Listening on GnuPG network certificate
management daemon.
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Listening on GnuPG cryptographic agent
and passphrase cache (restricted).
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Listening on GnuPG cryptographic agent
and passphrase cache (access for web browsers).
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Listening on GnuPG cryptographic agent
and passphrase cache.
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Starting D-Bus User Message Bus
Socket.
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Listening on D-Bus User Message Bus
Socket.
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Reached target Sockets.
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Reached target Basic System.
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Reached target Default.
Jul 20 07:51:58 hp-zb-psm systemd[1205]: Startup finished in 349ms.
Jul 20 07:51:58 hp-zb-psm systemd[1]: Started User Manager for UID 0.

-- Package-specific info:

-- System Information:
Debian Release: buster/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'),
(500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.17.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages systemd depends on:
ii  adduser          3.117
ii  libacl1          2.2.52-3+b1
ii  libapparmor1     2.12-5
ii  libaudit1        1:2.8.3-1+b1
ii  libblkid1        2.32-0.1
ii  libc6            2.27-5
ii  libcap2          1:2.25-1.2
ii  libcryptsetup12  2:2.0.3-6
ii  libgcrypt20      1.8.3-1
ii  libgnutls30      3.5.19-1
ii  libgpg-error0    1.32-1
ii  libidn11         1.33-2.2
ii  libip4tc0        1.6.2-1
ii  libkmod2         25-1
ii  liblz4-1         1.8.2-1
ii  liblzma5         5.2.2-1.3
ii  libmount1        2.32-0.1
ii  libpam0g         1.1.8-3.7
ii  libseccomp2      2.3.3-3
ii  libselinux1      2.8-1+b1
ii  libsystemd0      239-6
ii  mount            2.32-0.1
ii  procps           2:3.3.15-2
ii  util-linux       2.32-0.1

Versions of packages systemd recommends:
ii  dbus            1.12.8-3
ii  libpam-systemd  239-6

Versions of packages systemd suggests:
ii  policykit-1        0.105-21
pn  systemd-container  <none>

Versions of packages systemd is related to:
pn  dracut           <none>
ii  initramfs-tools  0.131
ii  udev             239-6

---

From: Michael Biebl <[email-masked]>
Date: Fri, 20 Jul 2018 08:59:25 +0200

> graphical login manager (of kde).

Is is sufficient if you simply wiggle the mouse or type random
characters for a while?

You might have a problem of not having enough entropy. There was a
recent kernel change in that regard.
https://lists.debian.org/debian-user/2018/05/msg00599.html
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898092

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

---

From: Ara Keary <[email-masked]>
Date: Fri, 20 Jul 2018 10:29:04 +0200

Hi,

> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898092

Indeed, typing random characters did the job: the system startup
continues after enough entropy is created,
thanks,

best,

Ara

---

From: Michael Biebl <[email-masked]>
Date: Fri, 20 Jul 2018 10:33:26 +0200

> continues after enough entropy is created,

Ok, thanks for confirming. Are you using kdm or sddm?
Is this a virtual machine?

---

From: Ara Keary <[email-masked]>
Date: Fri, 20 Jul 2018 10:44:13 +0200

> Is this a virtual machine?
I'm using sddm, and booting the system normally (not on a virtual machine).

Best,
Ara

---

From: Michael Biebl <[email-masked]>
Date: Fri, 20 Jul 2018 10:51:31 +0200

Control: reassign -1 sddm
Control: forcemerge 898092 -1

> I'm using sddm, and booting the system normally (not on a virtual machine).

I'm going to reassign this issue to sddm and merge it with the existing
bug report.

VMs are typically more prone to have low entropy during bootup and there
are some mitigations for that (like installing something like haveged or
using virtio rng).

Regards,
Michael

---

From: Ara Keary <[email-masked]>
Date: Fri, 20 Jul 2018 17:29:47 +0200

> are some mitigations for that (like installing something like haveged or
Hi,
i confirm that installing haveged solves the issue (no need anymore to
produce hand-made entropy at startup)
best,
Ara