[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#987431: Graphical session or LightDM do not close until unattended-upgrades has applied all updates



Hi Balint,

Le 26/04/2021 à 11:56, Balint Reczey a écrit :
Control: reassign -1 lightdm

Hi Yvan,

On Fri, Apr 23, 2021 at 9:21 PM Yvan Masson <yvan@masson-informatique.fr> wrote:

Package: unattended-upgrades
Version: 2.8
Severity: normal

Dear Maintainer,

I am preparing some Debian 11 desktops (for when it will be the new
stable). The setup is very simple: no root account, one partition, tasks
desktop/Cinnamon/standard tools/SSH. Unattended-upgrades is configured
to install updates on shutdown (see 1): upgrading works properly, but is
very disturbing for the users:

When the user chooses to shutdown or reboot the computer from his
Cinnamon session, the session does not close until all updates are
applied. While waiting:
- icons on the desktop disappear
- the usual menu that allows choosing between
suspend/hibernate/reboot/cancel/shutdown won't appear again (see 2)
- it is still possible to start applications

When a user session has been opened, then closed, and the user clicks on
shutdown or reboot from LightDM, the behavior is similar: LightDM does
not stop. It is even possible to log in again, while unattended-upgrades
is applying updates, but when updates are applied the computer
shutdowns/reboots as requested originally from LightDM.

I would expect the session to be completely closed, LightDM stopped, and
the console or Plymouth displaying a message indicating the ongoing
updates. I am almost sure this has already worked for me in a previous
Debian version or Ubuntu, with the same setup from me.

Please let me know if you need more information or if you want me to do
some tests.

The change that took place in unattended-upgrades 1.8:

unattended-upgrades (1.8) unstable; urgency=medium

When InstallOnShutdown was configured unattended-upgrades in
versions before 1.7 installed updates _after_ the shutdown transaction
is started by systemd making maintainer scripts restarting services
fail or wait in a deadlock until being killed by shutdown's timeout
leaving a broken installation behind.

Starting with version 1.7 configuring InstallOnShutdown makes
unattended-upgrades start package installations _before_ the shutdown
transaction is started, when PrepareForShutdown() signal is received
via DBus.

Unattended-upgrades 1.7 also increases logind's InhibitDelayMaxSec to
30 seconds. This allows more time for unattended-upgrades to shut down
gracefully or even install a few packages in InstallOnShutdown mode,
but is still a big step back from the 30 minutes allowed for
InstallOnShutdown previously.

Users enabling InstallOnShutdown mode are advised to increase
InhibitDelayMaxSec even further, possibly to 30 minutes.
--

When shutdown is successfully initiated from a graphical session the
user should be logged out and if the shutdown is successfully
initiated from a login manager it should stop, otherwise any inhibitor
holding up the shutdown can cause the described problems.

Thanks for the detailed answer.

I just checked again on my simple test VM, the only "shutdown" inhibitor is Unattended Upgrades Shutdown.

For comparison, I installed Gnome and GDM on this same VM:
- When choosing to shutdown from the Gnome session, the session is properly closed, but GDM stays on while upgrades are applied. It is even possible to log in again. - When I boot, log in, log out and then choosing to shutdown from GDM, GDM seems to be properly closed: screen becomes all black with only the blinking "_" on top-left, but `ps` from a SSH session shows that it is still running.

If I understand properly, all of this means that GDM/LightDM and Cinnamon do no always react properly to "shutdown" systemd inhibitors: is my understanding correct?

Do not hesitate to ask if I can help, by testing reporting this elsewhere.

Regards,
Yvan

Cheers,
Balint


Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: