systemd --user children processes not stopped afer logout

Bug #1939196 reported by Seb Bonnard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi,

After each logout from KDE, I can find the `systemd --user` process when I log into a tty{2..6} console and its remaining 23 children still running :

$ ps -Af | grep -v grep | egrep -w "PPID|$(pgrep -u $USER systemd)"
UID PID PPID C STIME TTY TIME CMD
sebasti+ 64862 1 0 13:13 ? 00:00:00 /lib/systemd/systemd --user
sebasti+ 64865 64862 0 13:13 ? 00:00:00 (sd-pam)
sebasti+ 64881 64862 0 13:13 ? 00:00:00 /usr/libexec/tracker-miner-fs
sebasti+ 64884 64862 0 13:13 ? 00:00:01 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
sebasti+ 64901 64862 0 13:13 ? 00:00:00 /usr/libexec/gvfsd
sebasti+ 64906 64862 0 13:13 ? 00:00:00 /usr/libexec/gvfsd-fuse /run/user/1001/gvfs -f -o big_writes
sebasti+ 64908 64862 0 13:13 ? 00:00:00 /usr/libexec/gvfs-udisks2-volume-monitor
sebasti+ 64956 64862 0 13:13 ? 00:00:00 /usr/libexec/gvfs-gphoto2-volume-monitor
sebasti+ 64971 64862 0 13:13 ? 00:00:00 /usr/libexec/gvfs-goa-volume-monitor
sebasti+ 64975 64862 0 13:13 ? 00:00:00 /usr/libexec/goa-daemon
sebasti+ 64998 64862 0 13:13 ? 00:00:00 /usr/libexec/goa-identity-service
sebasti+ 65004 64862 0 13:13 ? 00:00:00 /usr/libexec/gvfs-afc-volume-monitor
sebasti+ 65010 64862 0 13:13 ? 00:00:00 /usr/libexec/gvfs-mtp-volume-monitor
sebasti+ 65020 64862 0 13:13 ? 00:00:00 /usr/lib/x86_64-linux-gnu/tumbler-1/tumblerd
sebasti+ 65339 64862 0 13:13 ? 00:00:01 /usr/libexec/gvfsd-metadata
sebasti+ 65855 64862 0 13:14 ? 00:00:00 /usr/libexec/dconf-service
sebasti+ 66233 64862 0 13:14 ? 00:00:00 /usr/bin/zeitgeist-daemon
sebasti+ 66247 64862 0 13:14 ? 00:00:00 /usr/lib/zeitgeist/zeitgeist-fts
sebasti+ 66341 64862 0 13:14 ? 00:00:00 /usr/libexec/xdg-document-portal
sebasti+ 66356 64862 0 13:14 ? 00:00:00 /usr/libexec/xdg-permission-store
sebasti+ 66463 64862 0 13:14 ? 00:00:00 /usr/lib/telepathy/mission-control-5
sebasti+ 66624 64862 0 13:14 ? 00:00:00 /usr/lib/bluetooth/obexd
sebasti+ 66793 64862 0 13:14 ? 00:00:00 /usr/libexec/xdg-desktop-portal
sebasti+ 69972 64862 0 13:20 ? 00:00:00 /usr/bin/pulseaudio --daemonize=no --log-target=journal
$ loginctl list-sessions
SESSION UID USER SEAT TTY
     99 1001 sebastien seat0
     79 126 sddm seat0
     105 1001 sebastien seat0 tty2

3 sessions listed.
$ loginctl -n 15 session-status $(loginctl list-sessions | grep -v tty | grep -m1 $USER | awk '{print $1}')
99 - sebastien (1001)
    Since: Sat 2021-08-07 15:52:39 CEST; 13min ago
   Leader: 119723
     Seat: seat0; vc1
  Display: :0
  Service: sddm; type x11; class user
  Desktop: KDE
    State: closing
     Unit: session-99.scope
    ├─120287 /usr/bin/baloo_file
    ├─120342 /usr/libexec/at-spi-bus-launcher --launch-immediately
    ├─120349 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
    ├─120407 /usr/libexec/geoclue-2.0/demos/agent
    ├─120439 /usr/bin/zeitgeist-datahub
    └─122590 /usr/libexec/at-spi2-registryd --use-gnome-session

Aug 07 15:52:39 michel-K72Jr systemd[1]: Started Session 99 of user sebastien.
Aug 07 15:52:40 michel-K72Jr sddm-helper[119790]: pam_kwallet5: final socket path: /run/user/1001/kwallet5.socket
Aug 07 15:52:40 michel-K72Jr sddm-helper[119795]: Adding cookie to "/home/sebastien/.Xauthority"
Aug 07 15:53:09 michel-K72Jr sddm[119792]: kwalletd5: Checking for pam module
Aug 07 15:53:09 michel-K72Jr sddm[119792]: kwalletd5: Got pam-login param
Aug 07 15:53:09 michel-K72Jr sddm[119792]: kwalletd5: Waiting for hash on 7-
Aug 07 15:53:09 michel-K72Jr sddm[119792]: kwalletd5: waitingForEnvironment on: 3
Aug 07 15:53:09 michel-K72Jr sddm[119792]: kwalletd5: client connected
Aug 07 15:53:09 michel-K72Jr sddm[119792]: kwalletd5: client disconnected
Aug 07 15:53:09 michel-K72Jr sddm-helper[119723]: [PAM] Closing session
Aug 07 15:53:09 michel-K72Jr sddm-helper[119723]: pam_unix(sddm:session): session closed for user sebastien
Aug 07 15:53:09 michel-K72Jr sddm-helper[119723]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_close_session
Aug 07 15:53:09 michel-K72Jr sddm-helper[119723]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
Aug 07 15:53:09 michel-K72Jr sddm-helper[119723]: [PAM] Ended.

Maybe this is related to sddm and its child processes :

$ loginctl show-session $(loginctl list-sessions | awk -v user=$USER '$0 ~ user".* $"{print$1;exit}')
Id=99
User=1001
Name=sebastien
Timestamp=Sat 2021-08-07 15:52:39 CEST
TimestampMonotonic=19979613418
VTNr=1
Seat=seat0
Display=:0
Remote=no
Service=sddm
Desktop=KDE
Scope=session-99.scope
Leader=119723
Audit=99
Type=x11
Class=user
Active=no
State=closing
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
LockedHint=no
$ ps -Af | grep -v grep | egrep -w "PPID|$(pgrep sddm)"
UID PID PPID C STIME TTY TIME CMD
root 2240 1 0 10:19 ? 00:00:00 /usr/bin/sddm
root 120872 2240 10 15:53 tty1 00:03:49 /usr/lib/xorg/Xorg -nolisten tcp -auth /var/run/sddm/{3ef665c9-84b6-413b-87e1-918808539125} -background none -noreset -displayfd 18 -seat seat0 vt1
root 121865 2240 0 15:56 ? 00:00:00 /usr/lib/x86_64-linux-gnu/sddm/sddm-helper --socket /tmp/sddm-auth6612f95d-2348-42b5-b4ae-8247c8f4d0af --id 19 --start /usr/bin/startplasma-x11 --user sebastien
sebasti+ 121890 121865 0 15:56 ? 00:00:00 /usr/bin/startplasma-x11
$ ps -Af | grep -v grep | egrep -w "PPID|$(pgrep startplasma-x11)"
UID PID PPID C STIME TTY TIME CMD
sebasti+ 121890 121865 0 15:56 ? 00:00:00 /usr/bin/startplasma-x11
sebasti+ 122249 121890 0 15:56 ? 00:00:00 /usr/bin/ssh-agent /usr/bin/im-launch env LD_PRELOAD=libgtk3-nocsd.so.0 /usr/bin/startplasma-x11
sebasti+ 122298 121890 0 15:56 ? 00:00:00 /usr/bin/plasma_session

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: xorg 1:7.7+19ubuntu14
ProcVersionSignature: Ubuntu 5.4.0-80.90-generic 5.4.124
Uname: Linux 5.4.0-80-generic x86_64
.tmp.unity_support_test.0:

ApportVersion: 2.20.11-0ubuntu27.18
Architecture: amd64
BootLog:

CasperMD5CheckResult: skip
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: None
CurrentDesktop: KDE
Date: Sat Aug 7 13:40:23 2021
DistUpgraded: 2020-12-26 17:43:58,639 DEBUG Running PostInstallScript: './xorg_fix_proprietary.py'
DistroCodename: focal
DistroVariant: ubuntu
ExtraDebuggingInterest: I just need to know a workaround
GraphicsCard:
 Advanced Micro Devices, Inc. [AMD/ATI] Park [Mobility Radeon HD 5430/5450/5470] [1002:68e0] (prog-if 00 [VGA controller])
   Subsystem: ASUSTeK Computer Inc. Park [Mobility Radeon HD 5430/5450/5470] [1043:1bf2]
InstallationDate: Installed on 2015-12-27 (2049 days ago)
InstallationMedia: Kubuntu 14.04.3 LTS "Trusty Tahr" - Beta amd64 (20150805)
MachineType: ASUSTeK Computer Inc. K72Jr
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.4.0-80-generic root=/dev/mapper/VG_ALL_Samsung_SSD_850_EVO_500GB-rootFS ro
SourcePackage: xorg
Symptom: display
UpgradeStatus: Upgraded to focal on 2020-12-26 (223 days ago)
dmi.bios.date: 09/06/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: K72Jr.209
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: K72Jr
dmi.board.vendor: ASUSTeK Computer Inc.
dmi.board.version: 1.0
dmi.chassis.asset.tag: ATN12345678901234567
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK Computer Inc.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrK72Jr.209:bd09/06/2010:svnASUSTeKComputerInc.:pnK72Jr:pvr1.0:rvnASUSTeKComputerInc.:rnK72Jr:rvr1.0:cvnASUSTeKComputerInc.:ct10:cvr1.0:
dmi.product.name: K72Jr
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK Computer Inc.
version.compiz: compiz 1:0.9.14.1+20.04.20200211-0ubuntu1
version.libdrm2: libdrm2 2.4.105-3~20.04.1
version.libgl1-mesa-dri: libgl1-mesa-dri 21.0.3-0ubuntu0.2~20.04.1
version.libgl1-mesa-glx: libgl1-mesa-glx 21.0.3-0ubuntu0.2~20.04.1
version.xserver-xorg-core: xserver-xorg-core 2:1.20.11-1ubuntu1~20.04.2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.10.6-1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20200226-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.16-1
xserver.bootTime: Sat Aug 7 13:16:54 2021
xserver.configfile: default
xserver.errors:
 Failed to open authorization file "/var/run/sddm/{e1da4916-44a6-4842-ba41-2c1b0a4fb76b}": No such file or directory
 RADEON(0): failed to set mode: Permission denied
xserver.logfile: /var/log/Xorg.0.log
xserver.outputs: Output HDMI-0 LVDS VGA-0
xserver.version: 2:1.20.11-1ubuntu1~20.04.2
xserver.video_driver: radeon

Revision history for this message
Seb Bonnard (sebma) wrote :
description: updated
Seb Bonnard (sebma)
description: updated
description: updated
Seb Bonnard (sebma)
description: updated
Seb Bonnard (sebma)
description: updated
Seb Bonnard (sebma)
description: updated
affects: xorg (Ubuntu) → systemd (Ubuntu)
Seb Bonnard (sebma)
description: updated
Seb Bonnard (sebma)
description: updated
Seb Bonnard (sebma)
description: updated
Seb Bonnard (sebma)
description: updated
description: updated
description: updated
description: updated
Seb Bonnard (sebma)
description: updated
Seb Bonnard (sebma)
description: updated
description: updated
Seb Bonnard (sebma)
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.