Bug 1086459 - user systemd service (plus others) not shutting down on logout
user systemd service (plus others) not shutting down on logout
Status: NEW
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Current
64bit All
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-22 12:28 UTC by Ian Powell
Modified: 2021-08-10 15:44 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Powell 2018-03-22 12:28:29 UTC
I'm using opensuse:tumbleweed:20180319, systemd-237-1.1.x86_64, kcm_systemd-1.2.1-1.55, KDE Frameworks: 5.43.0 - KDE Plasma:  5.12.3 - kwin 5.12.3, Kernel:  4.15.10-1-default

When logging out of a kde plasma session, it doesn't shut user the user systemd (plus (sd-pam), dbus_daemon, gvfsd, gvfsd-fuse, dconf-service) so if you login into a another user (user=meed for this example) and do a ps -eaf | grep systemd, you will get several instances of different user systemd. This does seem to be a recent occurrence - is it supposed to do this now? If you do a System Activity the GUI session you'll see the systemd with (sd-pam), dbus_daemon, gvfsd, gvfsd-fuse, dconf-service attached to it.

:> ps -eaf | grep systemd
root         1     0  0 08:52 ?        00:00:02 /usr/lib/systemd/systemd --switched-root --system --deserialize 33
root       415     1  0 08:52 ?        00:00:01 /usr/lib/systemd/systemd-journald
root       440     1  0 08:52 ?        00:00:00 /usr/lib/systemd/systemd-udevd
systemd+   663     1  0 08:52 ?        00:00:00 /usr/lib/systemd/systemd-timesyncd
message+   668     1  0 08:52 ?        00:00:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root       741     1  0 08:52 ?        00:00:00 /usr/lib/wicked/bin/wickedd-dhcp4 --systemd --foreground
root       746     1  0 08:52 ?        00:00:00 /usr/lib/wicked/bin/wickedd-auto4 --systemd --foreground
root       747     1  0 08:52 ?        00:00:00 /usr/lib/wicked/bin/wickedd-dhcp6 --systemd --foreground
root       788     1  0 08:52 ?        00:00:00 /usr/sbin/wickedd --systemd --foreground
root       789     1  0 08:52 ?        00:00:00 /usr/lib/systemd/systemd-logind
root       792     1  0 08:52 ?        00:00:00 /usr/sbin/wickedd-nanny --systemd --foreground
meed      1348     1  0 08:53 ?        00:00:00 /usr/lib/systemd/systemd --user
meed      1369  1348  0 08:53 ?        00:00:01 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
jazz      2030     1  0 08:54 ?        00:00:00 /usr/lib/systemd/systemd --user
jazz      2051  2030  0 08:54 ?        00:00:02 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
tri       3298     1  0 09:04 ?        00:00:00 /usr/lib/systemd/systemd --user
tri       3319  3298  0 09:04 ?        00:00:01 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
mpz       8562     1  0 09:41 ?        00:00:00 /usr/lib/systemd/systemd --user
mpz       8583  8562  0 09:41 ?        00:00:01 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
meed     16456 16436  0 12:17 pts/0    00:00:00 grep --color=auto systemd
Comment 1 Joachim Wagner 2018-03-22 12:58:29 UTC
On openSUSE Leap 42.3, I see "systemd", "(sd-pam)" and "kdeconnectd" from one previous user but nothing from another previous user (both logged into KDE earlier today).

Anybody trying to fix this, please don't break stuff running in the background with nohup, screen, tmux, slurm, pbs etc., and also not stuff in other sessions of the same user, for example within an ssh cli login over the network.
Comment 2 Ian Powell 2018-04-13 09:21:55 UTC
This is still happening.
opensuse:tumbleweed:20180410
Qt: 5.10.0 KDE Frameworks: 5.44.0 - KDE Plasma:  5.12.4 - kwin 5.12.4
kmail2 5.7.3 - akonadiserver 5.7.3 - Kernel:  4.16.0-1-default  - xf86-video-nouveau:  1.0.15
Comment 3 Ian Powell 2018-05-11 11:05:54 UTC
"ps -eaf" edited output of stuff still running for logged out users 
 
jazz      3197     1  0 09:43 ?        00:00:00 /usr/lib/systemd/systemd --user
jazz      3198  3197  0 09:43 ?        00:00:00 (sd-pam)
jazz      3218  3197  0 09:43 ?        00:00:01 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
jazz      3365  3197  0 09:43 ?        00:00:00 /usr/lib/dconf-service
jazz      3371     1  0 09:43 ?        00:00:00 /usr/bin/baloo_file
jazz      3729     1  0 09:44 ?        00:00:00 /usr/lib64/libexec/kf5/kio_http_cache_cleaner
jazz      3797  3197  0 09:45 ?        00:00:00 /usr/lib/gvfs/gvfsd
jazz      3802  3197  0 09:45 ?        00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1001/gvfs -f -o big_writes
mdf       4758     1  0 10:14 ?        00:00:00 /usr/lib/systemd/systemd --user
mdf       4759  4758  0 10:14 ?        00:00:00 (sd-pam)
mdf       4779  4758  0 10:14 ?        00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
mdf       4918  4758  0 10:14 ?        00:00:00 /usr/lib/dconf-service
mdf       4924     1  0 10:14 ?        00:00:00 /usr/bin/baloo_file
mdf       5199     1  0 10:14 ?        00:00:00 /usr/lib64/libexec/kf5/kio_http_cache_cleaner
mdf       5217  4758  0 10:14 ?        00:00:00 /usr/lib/gvfs/gvfsd
mdf       5222  4758  0 10:14 ?        00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
mdf       5269  4758  0 10:14 ?        00:00:00 /usr/lib/at-spi2/at-spi-bus-launcher

Running: opensuse:tumbleweed:20180502
Qt: 5.10.0 KDE Frameworks: 5.45.0 - KDE Plasma:  5.12.4 - kwin 5.12.4
kmail2 5.8.0 - akonadiserver 5.8.0 - Kernel:  4.16.6-1-default  - xf86-video-nouveau:  1.0.15
Comment 4 Joachim Wagner 2018-05-11 11:28:07 UTC
Are standard backup solutions at risk of producing unusable / inconsistent backups due to this behaviour? If yes, severity should be increased. (My backup strategy is affected.)

Do these processes behave well on SIGTERM, e.g. is the baloo database guaranteed to be consistent after it? What should a backup script do to stop these processes after checking that the user is not logged in?

If these processes didn't handle SIGTERM well this would also mean that there is a (small) risk of damaging data when shutting down the system.
Comment 5 Ian Powell 2021-08-10 12:21:22 UTC
3 years on and this seems to have been fixed sometime between logging it and now.
So it can be closed as far as I'm concerned.

opensuse:tumbleweed:20210806
Qt: 5.15.2 KDE Frameworks: 5.84.0 - KDE Plasma:  5.22.4 - kwin 5.22.4
kmail2 5.17.3 (21.04.3) - akonadiserver 5.17.3 (21.04.3) - Kernel:  5.13.6-1-default
Comment 6 Joachim Wagner 2021-08-10 15:44:04 UTC
It still happens in Leap 15.3. Here 10 minutes after logging out from a 7h session working with Konsole, Firefox and KDE-PIM:

$ ps aux | fgrep jwagner
jwagner   2902  0.0  0.0  89560 12404 ?        Ss   09:31   0:00 /usr/lib/systemd/systemd --user
jwagner   2903  0.0  0.0 280704  4216 ?        S    09:31   0:00 (sd-pam)
jwagner   2918  0.0  0.0  44332  6308 ?        Ss   09:31   0:08 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
jwagner   2992  0.0  0.0 184052  5432 ?        Sl   09:31   0:00 /usr/lib/dconf-service
jwagner   3042  0.0  0.0  64536  7540 ?        S    09:31   0:00 /usr/lib/bluetooth/obexd
jwagner   3061  0.0  3.1 268867700 1023500 ?   SNl  09:31   0:09 /usr/bin/baloo_file
jwagner   3152  0.0  0.0  68160  6068 ?        S    09:31   0:00 /usr/lib/GConf/2/gconfd-2
jwagner   3912  0.0  0.0 280564  7544 ?        Ssl  09:32   0:00 /usr/lib/gvfs/gvfsd
jwagner   3917  0.0  0.0 416160  5340 ?        Sl   09:32   0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/5026/gvfs -f
jwagner   3959  0.0  0.0 343216  5572 ?        Ssl  09:32   0:00 /usr/lib/at-spi2/at-spi-bus-launcher
jwagner   6228  0.0  0.0 196088  6340 ?        Ssl  10:50   0:00 /usr/lib/gvfs/gvfsd-metadata
jwagner   6692  0.0  0.0 274568 23680 ?        Sl   11:06   0:14 /usr/lib64/libexec/kf5/kio_http_cache_cleaner
jwagner  12100  0.0  0.0 392008 11172 ?        Ssl  15:08   0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
jwagner  12105  0.0  0.0 348644  9316 ?        Ssl  15:08   0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
jwagner  12110  0.0  0.0 267360  5372 ?        Ssl  15:08   0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
jwagner  12114  0.0  0.0 279796  6232 ?        Ssl  15:08   0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
jwagner  12118  0.0  0.0 263264  5848 ?        Ssl  15:08   0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
jwagner  12122  0.0  0.1 931520 37388 ?        Sl   15:08   0:00 /usr/lib/goa-daemon
jwagner  12131  0.0  0.0 500088 15360 ?        Sl   15:08   0:00 /usr/lib/goa-identity-service
root     14540  0.0  0.0   7560   752 tty1     S+   16:22   0:00 grep -F --color=auto jwagner