#996668 cinnamon-settings-daemon: cinnamon shutdown hang

Package:
cinnamon-settings-daemon
Source:
cinnamon-settings-daemon
Description:
daemon handling the Cinnamon session settings
Submitter:
Matt Yates
Date:
2021-12-15 23:57:03 UTC
Severity:
normal
#996668#5
Date:
2021-10-17 05:24:25 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

When shutting down from the cinnamon menu, there is a 1 minute 29 second delay
with a message "A stop job is running...".  In review os syslog, it appears
that the job is related to cinnamon-settings-daemon.  Example messages from
syslog:

Oct 17 01:01:23 duster cinnamon-session[5028]: WARNING: t+30492.06708s:
Application 'cinnamon-settings-daemon-a11y-settings.desktop' killed by signal
15
Oct 17 01:01:23 duster cinnamon-session[5028]: WARNING: t+30492.06711s:
Application 'cinnamon-settings-daemon-orientation.desktop' killed by signal 15
Oct 17 01:01:23 duster cinnamon-session[5028]: WARNING: t+30492.06713s:
Application 'cinnamon-settings-daemon-power.desktop' killed by signal 15
Oct 17 01:01:23 duster cinnamon-session[5028]: WARNING: t+30492.06714s:
Application 'cinnamon-settings-daemon-sound.desktop' killed by signal 15
Oct 17 01:01:23 duster cinnamon-session[5028]: WARNING: t+30492.06717s:
Application 'cinnamon-settings-daemon-mouse.desktop' killed by signal 15
Oct 17 01:01:23 duster cinnamon-session[5028]: WARNING: t+30492.06719s:
Application 'cinnamon-settings-daemon-background.desktop' killed by signal 15
Oct 17 01:01:23 duster cinnamon-session[5028]: WARNING: t+30492.06729s:
Application 'cinnamon-settings-daemon-a11y-keyboard.desktop' killed by signal
15
Oct 17 01:01:23 duster cinnamon-session[5028]: WARNING: t+30492.06731s:
Application 'cinnamon-settings-daemon-wacom.desktop' killed by signal 15
Oct 17 01:01:23 duster cinnamon-session[5028]: WARNING: t+30492.06733s:
Application 'cinnamon.desktop' killed by signal 15


   * What exactly did you do (or not do) that was effective (or
     ineffective)?

If the user first logs out of cinnamon before initiating shutdown, there is no
delay.

   * What was the outcome of this action?

Normal shutdown if user logs out of cinnamon session before initiating
shutdown,

   * What outcome did you expect instead?

Normal shutdown when initiating shutdown from cinnamon menu.

*** End of the template - remove these template lines ***

#996668#10
Date:
2021-10-22 18:59:51 UTC
From:
To:
I ran 'journalctl -b -1' and this is the part where the shutdown hang
happens:

Oct 22 14:41:06 db11 systemd[1]: session-2.scope: Killing process 5663
(cinnamon-launch) with signal SIGKILL.
Oct 22 14:41:06 db11 systemd[1]: session-2.scope: Killing process 5721
(n/a) with signal SIGKILL.
Oct 22 14:41:06 db11 systemd[1]: session-2.scope: Killing process 5723
(cinnamon-launch) with signal SIGKILL.
Oct 22 14:41:06 db11 systemd[1]: session-2.scope: Failed with result
'timeout'.

I ran 'ps aux | grep cinnamon' and found the PID for cinnamon-launcher.  I
killed it and it respawned.  I killed it a second time and it did not
respawn.  After that, I shutdown using the cinnamon menu with no hang.

I'm not sure what 'cinnamon-launcher' does, but I guess this problem does
not have to do with cinnamon-settings-daemon as I originally thought.

#996668#15
Date:
2021-10-31 09:02:32 UTC
From:
To:
Dear Maintainer,

I have the same problem, everytime I reboot or shut down session-2.scope it hangs for 1m30s, cinnamon-launcher seems to be the problem, killing it as suggested the system shuts down without hanging.


Oct 31 09:03:50 hellspawn systemd[1]: Stopped ACPI event daemon.
Oct 31 09:05:19 hellspawn systemd[1]: session-2.scope: Stopping timed out. Killing.
Oct 31 09:05:19 hellspawn systemd[1]: session-2.scope: Killing process 9852 (cinnamon-launch) with signal SIGKILL.
Oct 31 09:05:19 hellspawn gpg-agent[2486]: SIGTERM received - shutting down ...
Oct 31 09:05:19 hellspawn gpg-agent[2486]: gpg-agent (GnuPG) 2.2.27 stopped
Oct 31 09:05:19 hellspawn systemd[1]: session-2.scope: Killing process 9971 (gmain) with signal SIGKILL.
Oct 31 09:05:19 hellspawn systemd[1]: session-2.scope: Failed with result 'timeout'.
Oct 31 09:05:19 hellspawn systemd[1]: Stopped Session 2 of User alex.
Oct 31 09:05:19 hellspawn systemd[1]: session-2.scope: Consumed 3min 17.513s CPU time.
Oct 31 09:05:19 hellspawn systemd[1]: Stopping User Login Management...
Oct 31 09:05:19 hellspawn systemd[1]: Stopping User Manager for UID 1000...
Oct 31 09:05:19 hellspawn systemd[1776]: Stopped target Main User Target.

#996668#20
Date:
2021-10-31 11:28:03 UTC
From:
To:
Il 31/10/2021 10:02, Alex Andreotti ha scritto:
Sorry if I don't replied before, I'm unable to reproduce the issue on my
Sid environment, unfortunately recently I am also very busy and I am
used the little time to the tests instead on the big muffin rebase they
are doing upstream for cinnamon 5.2.

As soon as I have time in these days I will try to prepare the new build
with latest upstream bugfixes to upload and doing more tests.

About your environments you had some applet,extension, desklet added
(not installed by default) and enabled? if yes can you try to disable
them, and after reboot the shutdown still have the same issue? without
being able to reproduce the problem unfortunately I can not try to debug
to try to see what it cause freeze/hang the cinnamon process on shutdown.

#996668#25
Date:
2021-11-05 16:40:16 UTC
From:
To:
Sorry for the late reply too, my gmail occasionally flags Debian
emails as spam ... I just happened to see it today.

I don't have custom applets, I just added a couple of auto starts, I
tried to disable them but nothing changes.

It's not a big deal, I don't reboot often, it's just a little annoying
because when I do it's because I need it.

It would be useful to have a more precise message, I can try to take a
look, if you have suggestions where to look are welcome.

Thanks for the work you do.

#996668#30
Date:
2021-11-07 11:28:12 UTC
From:
To:
Il 05/11/2021 17:40, Alex Andreotti ha scritto:

Thanks for reply, yesterday I did other tests on Sid testing new bugfix
builds for future upload but I'm still unable to reproduce it. From a
fast search on upstream issues I don't found a similar reports.

@Joshua: Have you reproduced it or saw others users report of it with
more informations that can help to reproduce it or found the cause?

#996668#35
Date:
2021-11-08 05:56:07 UTC
From:
To:
I had the Nextcloud client app running.  Disabling it had no effect.

Removing systemd seems to eliminate the problem.  Although not really a
solution, I installed Devuan and tried running their version of Debian
Testing with sysvinit instead of systemd.  Cinnamon shuts down as
expected.  So far, I have not missed systemd, so I will probably just keep
using Devuan.

#996668#40
Date:
2021-11-17 15:01:55 UTC
From:
To:
I noticed by chance (this is the second time this has happened to me)
that the problem does not appear if I have just performed `apt
upgrade` and then reboot in the usual way (from the Cinnamon menu).

#996668#45
Date:
2021-11-17 15:20:53 UTC
From:
To:
Il 17/11/2021 16:01, Alex Andreotti ha scritto:

Thanks for reply, so the latest update of one of these components
(cinnamon, nemo, cinnamon-screensaver, xapp, muffin and
cinnamon-session) seems solved it, can you confirm after other try if
still unreproducible please?

If someone still reproduce it on updated Sid (or testing after migration
of updated components above) please reply or if nobody will reproduce it
anymore I'll close this after 1-2 weeks

#996668#50
Date:
2021-11-17 16:19:04 UTC
From:
To:
No, I'm sorry, I tried to summarize but obviously I was not clear.

The problem persists, even after the system upgrade I did today.

But the reboot of the session where I ran `apt upgrade` wasn't
affected, I don't know if the upgrade process ends or restart
cinnamon-launcher or what else.  In today's upgrade I noticed there
were cinnamon packagess, I don't remember if there were any the first
time I noticed it, I'll try to pay attention next time.

#996668#55
Date:
2021-11-17 16:52:07 UTC
From:
To:
Il 17/11/2021 17:19, Alex Andreotti ha scritto:

Sorry if I didn't understand right, since I'm unable to reproduce it is
difficult found the cause of issue and try to solves it.

Can you try to check syslog and kern.log and see if there is any crash
(for example search segfault which is perhaps the most common cause of
crashes) and post the line/s about crash here if there are please?

I suppose that can be one process that crash on shutdown that make one
service or other process that use it wait until force kill on timeout
(like cinnamon-launcher) an high probable cause of this (but is only a
suppose).

If instead the cause is unexpected case that make a process freeze or do
something in loop (and other process that deps on it or parent wait)
need a debug reproducing it

#996668#60
Date:
2021-11-18 09:43:22 UTC
From:
To:
I don't see anything significant in the logs, no crash / segv. I am
attaching a few, I have also added some prints to cinnamon-launcher
but nothing stands out for me.

In the meantime I had the opportunity to do another `apt upgrade`
where there were no Cinnamon packages and during the reboot the
problem occurred.

#996668#65
Date:
2021-11-18 10:16:25 UTC
From:
To:
Il 18/11/2021 10:43, Alex Andreotti ha scritto:
Thanks for logs, I only did a very fast look (sorry but I don't have
much time) and I notice 2 things:

- "Nov 17 17:06:40 hellspawn cinnamon-session[1747]: WARNING:
t+0.06097s: Failed to start app: Unable to start application: Failed to
execute child process “gsettings-data-convert” (No such file or
directory)" at start of session (that fail to terminate on shutdown
until kill for timeout). On my testing system I have gconf2 installed
(that contain gsettings-data-convert), if you want do a fast test do
install it, reboot and after retry (as is started on session start) but
I'm don't know is the cause of unexpected case on shutdown

- "Nov 17 17:07:11 hellspawn systemd[1]: nfs-blkmap.service: Failed with
result 'exit-code'."   before "Nov 17 17:08:41 hellspawn systemd[1]:
session-2.scope: Stopping timed out. Killing." I don't have have that
service on my testing system (I don't use nfs), you use nfs for one or
more remote filesystem? but also in that case I don't know if can be the
cause of unexpected case on shutdown

#996668#70
Date:
2021-11-18 13:27:11 UTC
From:
To:
On Thu, Nov 18, 2021 at 11:16:25AM +0100, Fabio Fantoni wrote:

[cut]

Thanks Fabio,

the problem seems to be gone, it's not clear to me why, I didn't see a
direct effect installing gconf2 and uninstalling nfs-kernel-sever, but
after a series of other operations and several reboots it is now gone.

- I tried to install gconf2 and reboot 2 times, the problem remained.
- I tried to remove nfs-kernel-server + autoremove and reboot 2 times,
  the problem remained.
- I tried to enable avahi-daemon.{socket,service} and reboot 2 times
  and the problem remained (later I stopped them, disabled + mask).
- I tried to use an alternate user that I created some time ago but that
  I rarely used and log in with Cinnamon and I noticed that the new user
  did not have the problem, while the old user continued to have it.
- I installed lttng and eclipse-tracecompass to see if anything stood out
  during a `systemctl stop session-2.scope`, but I didn't notice anything
  special (for tracecompass I had to change alternatives for java
  oracle8 -> openjdk11).

#996668#75
Date:
2021-11-22 09:34:12 UTC
From:
To:
Same problem for me on Testing, obviously with Cinnamon and lightdm. I
have no applet and, as always, only the TimeAndDate @ nightflame
desklet. I noticed that if I log out of the session and inspect the
system from lightdm, the problem does not arise

#996668#80
Date:
2021-12-03 08:50:28 UTC
From:
To:
Dear Maintainer,

i have exactly the same problem on a fresh install of debian sid on a new
laptop.

I could even reproduce the issue on an install on a KVM virtual machine.

On both I used the daily netiboot image [
https://d-i.debian.org/daily-images/amd64/20211202-00:16/netboot/mini.iso]


Occurred on both on the first reboot after Installation. No other software
installed. Only the desktop and cinnamon-desktop tasks from tasksel during
the installation process (and laptop for the laptop).


On the laptop it occurs on each reboot. On the VM it does not always
happen. Seems random.

The log entries are similar as above.


*If you need anything else, please let me know.*



*-- System Information:*

*Debian Release: bookworm/sid*

* APT prefers unstable*

* APT policy: (500, 'unstable')*

*Architecture: amd64 (x86_64)*


*Kernel: Linux 5.15.0-2-amd64 (SMP w/16 CPU threads)*

*Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en*

*Shell: /bin/sh linked to /usr/bin/dash*

*Init: systemd (via /run/systemd/system)*

*LSM: AppArmor: enabled*

#996668#85
Date:
2021-12-03 17:26:54 UTC
From:
To:
Il 03/12/2021 09:50, Nikos K ha scritto:
Thanks for replay, today I found the vm of clean Sid I used for testing
cinnamon 4.8 packages before upload and was unable to reproduce, on
updated clean Sid done today I finally reproduced it, I did some check
and tests but I wasn't able to solves it for now.

#996668#90
Date:
2021-12-10 10:47:52 UTC
From:
To:
On 5.2 packages testing for experimental
(https://lists.debian.org/debian-cinnamon/2021/12/msg00006.html) on Sid
vm where I reproduced the issue I wasn't able to reproduce anymore (but
I'm 100% sure as I didn't found the exact cause of issue), if someone
want test it in the link there is an explain to test the packages not
uploaded to experimental for now (or wait for upload to debian
experimental).

#996668#95
Date:
2021-12-15 23:53:09 UTC
From:
To:
I've been having this issue for months now, but I don't know the first
version it cropped up on. I've been running Sid on multiple machines, and
all of them have this issue.

I've not had to use mailing lists for anything before, much less for a
Debian issue, so I'm unsure what to include or how to format this... time
to guess, I suppose. This is info from just one of multiple machines
affected, but they're all kept up-to-date, more or less.

"apt list cinnamon-* cinnamon | grep installed":

cinnamon-common/unstable,unstable,now 5.0.6-1 all [installed,automatic]
cinnamon-control-center-data/unstable,unstable,now 5.0.2-2 all
[installed,automatic]
cinnamon-control-center-goa/unstable,now 5.0.2-2 amd64 [installed,automatic]
cinnamon-control-center/unstable,now 5.0.2-2 amd64 [installed,automatic]
cinnamon-core/unstable,unstable,now 5.0.1 all [installed,automatic]
cinnamon-desktop-data/unstable,unstable,now 5.0.0-2 all
[installed,automatic]
cinnamon-desktop-environment/unstable,unstable,now 5.0.1 all
[installed,automatic]
cinnamon-l10n/unstable,unstable,now 5.0.2-2 all [installed,automatic]
cinnamon-screensaver/unstable,now 5.0.7-1 amd64 [installed,automatic]
cinnamon-session-common/unstable,unstable,now 5.0.1-3 all
[installed,automatic]
cinnamon-session/unstable,now 5.0.1-3 amd64 [installed,automatic]
cinnamon-settings-daemon/unstable,now 5.0.4-2 amd64 [installed,automatic]
cinnamon/unstable,now 5.0.6-1 amd64 [installed,automatic]

"uname -a":

Linux portable-suffering 5.15.0-2-amd64 #1 SMP Debian 5.15.5-1 (2021-11-26)
x86_64 GNU/Linux