Your message dated Tue, 07 Apr 2020 15:34:33 +0000
with message-id <e1jlqff-0006kv...@fasolo.debian.org>
and subject line Bug#943424: fixed in plymouth 0.9.4-3
has caused the Debian Bug report #943424,
regarding Plymouth prevents clean shutdown in some cases, which may result in
data loss
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
943424: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=943424
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: plymouth
Version: 0.9.4-1.1
Severity: grave
Justification: may result in data loss
Hi,
I've noticed that when using offline-updates[1], remounting the root
filesystem read-only at shutdown fails with 'Device or resource busy'
(see the attached screenshot). As the result, the filesystem is left in
an unclean state, which may lead to data loss. Given that the installed
by default GNOME desktop environment currently provides no upgrade
method other than offline-updates, the impact is pretty wide.
It turned out that it is plymouth's fault. plymouthd runs early during
boot, typically from initrd. It runs with --mode=boot --attach-to-
session, so when the root filesystem is remounted read-write, it opens
/var/log/boot.log for writing and logs console messages there. When the
system is booting normally, this plymouthd instance is stopped either
by plymouth-quit.service in multi-user.target or by gdm.service which
stops plymouthd on its own. However, when performing offline-updates
the system doesn't boot any further than sysinit.target, so plymouthd
keeps running and logging to /var/log/boot.log. After all updates are
installed, a reboot is initiated, during which the running services are
stopped and remaining processes are killed. However, plymouthd uses a
trick to survive systemd's killing spree (see [2] or src/main.c:2240),
so it doesn't get killed, and by keeping /var/log/boot.log opened for
writing prevents remounting the root filesystem read-only.
I'm not sure how to best fix this issue. As a workaround, I added
ExecStartPre=-/bin/plymouth --wait quit
to plymouth-{halt,kexec,poweroff,reboot}.service-s (which run during
shutdown) to ensure that if plymouthd instance in --mode=boot is still
running, it is stopped before executing plymouthd in --mode=shutdown
(which doesn't do logging and therefor doesn't interfere with the
shutdown process). Aside from a small flicker during offline-updates
caused by reexecuting plymouthd, there should be no side effects. A
proposed patch is attached.
Another possible fix is to make plymouthd close the log file when its
mode changes to 'shutdown' by pk-offline-update. It makes sense and
seems trivial; however, it relies on the update service to switch
plymouth to that state, which doesn't look like a reliable solution in
the long term.
plymouthd can also be changed so that instead of just giving up if it
detects an already running instance, it will transfer its state
requested by command line options to that instance, so when, say,
plymouth-reboot.service runs plymouthd with --mode=shutdown, the
running instance actually switches to that mode and closes the log
file. Such change however, while looking like the most correct
solution, is likely not trivial, and is better be done by the upstream.
[1]
https://www.freedesktop.org/software/systemd/man/systemd.offline-updates.html
[2]
https://sources.debian.org/src/plymouth/0.9.4-1.1/src/main.c/#L2240
diff --git a/systemd-units/plymouth-halt.service.in b/systemd-units/plymouth-halt.service.in
index 38ae98c..ad7bafc 100644
--- a/systemd-units/plymouth-halt.service.in
+++ b/systemd-units/plymouth-halt.service.in
@@ -7,6 +7,8 @@ ConditionKernelCommandLine=!plymouth.enable=0
ConditionVirtualization=!container
[Service]
+# Terminate an already running plymouthd instance if there is one
+ExecStartPre=-@PLYMOUTH_CLIENT_DIR@/plymouth --wait quit
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
Type=forking
diff --git a/systemd-units/plymouth-kexec.service.in b/systemd-units/plymouth-kexec.service.in
index bed5eb7..df7b328 100644
--- a/systemd-units/plymouth-kexec.service.in
+++ b/systemd-units/plymouth-kexec.service.in
@@ -7,6 +7,8 @@ ConditionKernelCommandLine=!plymouth.enable=0
ConditionVirtualization=!container
[Service]
+# Terminate an already running plymouthd instance if there is one
+ExecStartPre=-@PLYMOUTH_CLIENT_DIR@/plymouth --wait quit
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
Type=forking
diff --git a/systemd-units/plymouth-poweroff.service.in b/systemd-units/plymouth-poweroff.service.in
index 7891e97..d4ebf28 100644
--- a/systemd-units/plymouth-poweroff.service.in
+++ b/systemd-units/plymouth-poweroff.service.in
@@ -7,6 +7,8 @@ ConditionKernelCommandLine=!plymouth.enable=0
ConditionVirtualization=!container
[Service]
+# Terminate an already running plymouthd instance if there is one
+ExecStartPre=-@PLYMOUTH_CLIENT_DIR@/plymouth --wait quit
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
Type=forking
diff --git a/systemd-units/plymouth-reboot.service.in b/systemd-units/plymouth-reboot.service.in
index 1d57789..f665740 100644
--- a/systemd-units/plymouth-reboot.service.in
+++ b/systemd-units/plymouth-reboot.service.in
@@ -7,6 +7,8 @@ ConditionKernelCommandLine=!plymouth.enable=0
ConditionVirtualization=!container
[Service]
+# Terminate an already running plymouthd instance if there is one
+ExecStartPre=-@PLYMOUTH_CLIENT_DIR@/plymouth --wait quit
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
Type=forking
--- End Message ---
--- Begin Message ---
Source: plymouth
Source-Version: 0.9.4-3
Done: Laurent Bigonville <bi...@debian.org>
We believe that the bug you reported is fixed in the latest version of
plymouth, 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 943...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Laurent Bigonville <bi...@debian.org> (supplier of updated plymouth 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 ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Tue, 07 Apr 2020 17:06:13 +0200
Source: plymouth
Architecture: source
Version: 0.9.4-3
Distribution: unstable
Urgency: medium
Maintainer: Laurent Bigonville <bi...@debian.org>
Changed-By: Laurent Bigonville <bi...@debian.org>
Closes: 943424
Changes:
plymouth (0.9.4-3) unstable; urgency=medium
.
* Drop debian/patches/0001-awk.patch and add a break against mawk (<< 1.3.4),
the awk script has been tested gainst mawk (>= 1.3.4) and gawk
* Add RemainAfterExit=yes to plymouth's systemd service files, cherry-picked
patch from upstream
* Properly close the boot.log file when changing mode (Closes: #943424)
Checksums-Sha1:
79876ef201219c907f7a9c3520cd27b9bcca260e 2013 plymouth_0.9.4-3.dsc
3d65daffff43ed886a34a17e257e2a2b7532b0d8 29428 plymouth_0.9.4-3.debian.tar.xz
c1e715e3cd88c3ec47eab96d58cb1e15020fa325 13413
plymouth_0.9.4-3_source.buildinfo
Checksums-Sha256:
95df1333d6c65117a166a861bd8f597cc9c3dd2196dcaeb6ba1f7b129367814e 2013
plymouth_0.9.4-3.dsc
ac225c2fcadbe30980f3162be39706ce1f844caa216d4477f259fc40d2c5daaa 29428
plymouth_0.9.4-3.debian.tar.xz
a9f4fb1c5693734cd79ee9bd2bafd4c550428b57cec00c7234664c32d528e6a1 13413
plymouth_0.9.4-3_source.buildinfo
Files:
d577d760b7e185236d058abf76742623 2013 misc optional plymouth_0.9.4-3.dsc
07d75de01ab65d7f2902a654acf9cebd 29428 misc optional
plymouth_0.9.4-3.debian.tar.xz
6ec4dddc43edee86d1c392817ef33a02 13413 misc optional
plymouth_0.9.4-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQFFBAEBCAAvFiEEmRrdqQAhuF2x31DwH8WJHrqwQ9UFAl6Ml0sRHGJpZ29uQGRl
Ymlhbi5vcmcACgkQH8WJHrqwQ9WdLAf/fg5mpL6qCN3d2FzA0D0dNKDtdTdoVUVh
bMVvOHlBhov58SVZU6z3+XzM1PmKESjRxmsKxjTMiKKdX7MJMfdqzK5mLjIJ9MmG
1x7QNanor0o2I7uWjeOfDjCXSzMXLfKP3UhRVt/IUAtrIHdDd3F+6soQD5FcRnDV
vpW7ULHYhJpvRj9qJHJ4ZXBfhPv6qzIDGt0nTcQ+SVFeAAqyjTPdenHuRJSE/SgQ
jo8JRLWmxkG7UiObt2p7+PiBJz8wk/vUsQcz8MiND36sqaHYji4CqwbAxev5cNme
RRAQCHy/F6xoU4aWBK/R+tat//MT0P3wwmsTcYT0K+s+F1JAWEE2xQ==
=8VCq
-----END PGP SIGNATURE-----
--- End Message ---