<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>359651</bug_id>
          
          <creation_ts>2016-02-21 22:21:00 +0000</creation_ts>
          <short_desc>Dangling user processes after KDE session crash</short_desc>
          <delta_ts>2021-11-09 16:08:36 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>ksmserver</product>
          <component>general</component>
          <version>5.19.2</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=244250</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bernie Innocenti">bernie</reporter>
          <assigned_to name="Lubos Lunak">l.lunak</assigned_to>
          <cc>bugseforuns</cc>
    
    <cc>colaboracs</cc>
    
    <cc>dario</cc>
    
    <cc>eric.donkersloot</cc>
    
    <cc>kde</cc>
    
    <cc>kde</cc>
    
    <cc>mario+bugs.kde.org</cc>
    
    <cc>nate</cc>
    
    <cc>niels_ole</cc>
    
    <cc>rdieter</cc>
    
    <cc>steve</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-workspace/commit/f377696bff39e35ae0f7ae6104d8732b3856744e</cf_commitlink>
          <cf_versionfixedin>5.24</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1577894</commentid>
    <comment_count>0</comment_count>
    <who name="Bernie Innocenti">bernie</who>
    <bug_when>2016-02-21 22:21:00 +0000</bug_when>
    <thetext>After killing a KDE session, several processes remain dangling around:

bernie     877  0.0  0.0  45216  4816 ?        Ss   Feb20   0:00 /usr/lib/systemd/systemd --user
bernie     884  0.0  0.1 189548 13244 ?        S    Feb20   0:00 /usr/bin/kwalletd --pam-login 14 18 --nofork
bernie   21949  0.0  0.9 1660192 75676 ?       Sl   Feb20   0:25 kded5 [kdeinit5]
bernie    4295  0.0  0.0      0     0 ?        Z    15:13   0:00  \_ [ibus] &lt;defunct&gt;
bernie   22319  0.0  0.3 338740 26176 ?        S    Feb20   0:00 /usr/bin/kuiserver5
bernie   23897  0.0  0.0 170644  3028 ?        Ss   Feb20   0:02 gpg-agent --homedir /home/bernie/.gnupg --use-standard-socket --daemon
bernie    4482  0.0  1.4 3168140 112336 ?      Tl   15:16   0:05 /usr/bin/plasmashell -s --crashes 1


Reproducible: Always

Steps to Reproduce:
This scenario can easily be reproduced by killing the X server with CTRL-ALT-BS.


Actual Results:  
This leads to confusing / malfunctioning behavior in subsequent KDE sessions. The only fix for non-technical users is rebooting the machine.

Expected Results:  
The entire process tree under kdeinit / ksmserver should be killed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577895</commentid>
    <comment_count>1</comment_count>
    <who name="Bernie Innocenti">bernie</who>
    <bug_when>2016-02-21 22:24:04 +0000</bug_when>
    <thetext>This bug could be refiled under the kdeframeworks-kinit component. Not sure which one is responsible for session cleanup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1681500</commentid>
    <comment_count>2</comment_count>
    <who name="Bernie Innocenti">bernie</who>
    <bug_when>2017-06-09 04:19:14 +0000</bug_when>
    <thetext>Still present in Plasma 5.10.1. Also present in Archlinux.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1888708</commentid>
    <comment_count>3</comment_count>
    <who name="Bernie Innocenti">bernie</who>
    <bug_when>2019-10-30 06:15:11 +0000</bug_when>
    <thetext>Even though the session is now managed by systemd, I still see an entire dangling session when logging out from a Plasma session:

bernie  889  Ss  /usr/lib/systemd/systemd --user
bernie  890  S    \_ (sd-pam)
bernie  901  Ss   \_ /usr/bin/ssh-agent -a /run/user/1000/ssh-agent.socket
bernie  911  Ss   \_ /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
bernie  965  Sl   \_ /usr/lib/dconf-service
bernie 1048  Ssl  \_ /usr/lib/gvfsd
bernie 1058  Sl   \_ /usr/lib/gvfsd-fuse /run/user/1000/gvfs -f
bernie 1118  Ssl  \_ /usr/lib/at-spi-bus-launcher
bernie 1125  S    |   \_ /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address
bernie 1126  Ssl  \_ /usr/lib/xdg-desktop-portal
bernie 1131  Ssl  \_ /usr/lib/xdg-document-portal
bernie 1134  Ssl  \_ /usr/lib/xdg-permission-store
bernie 1203  Ssl  \_ /usr/bin/pipewire
bernie 1240  Ss   \_ /usr/lib/bluetooth/obexd
bernie 1039  Sl  /usr/lib/geoclue-2.0/demos/agent</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1928657</commentid>
    <comment_count>4</comment_count>
    <who name="Bernie Innocenti">bernie</who>
    <bug_when>2020-05-10 12:51:06 +0000</bug_when>
    <thetext>Perhaps this bug will be fixed by this commit?

https://github.com/sddm/sddm/commit/9ce5bd6e62b2fd1f96421b9797e64181883d15c3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1928659</commentid>
    <comment_count>5</comment_count>
    <who name="Bernie Innocenti">bernie</who>
    <bug_when>2020-05-10 12:52:29 +0000</bug_when>
    <thetext>David, do you reckon your recent commit to SDDM will fix this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1928662</commentid>
    <comment_count>6</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2020-05-10 12:59:32 +0000</bug_when>
    <thetext>Yeah but I might end up reverting it.

Have you tried logind&apos;s KillUserProcesses option?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1940490</commentid>
    <comment_count>7</comment_count>
    <who name="Bernie Innocenti">bernie</who>
    <bug_when>2020-06-29 13:33:11 +0000</bug_when>
    <thetext>This is still happening with latest sddm and plasma-workspace

bernie2    11301  0.0  0.0  19552 10620 ?        Ss   22:28   0:00 /usr/lib/systemd/systemd --user
bernie2    11302  0.0  0.0 194380  3596 ?        S    22:28   0:00  \_ (sd-pam)
bernie2    11322  0.0  0.0 267340  3268 ?        Ss   22:28   0:00  \_ /usr/bin/dbus-broker-launch --scope user
bernie2    11323  0.0  0.0   5048  3200 ?        S    22:28   0:00  |   \_ dbus-broker --log 4 --controller 10 --machine-id 6ed6dbe65a274a909e5e7af2f4570b62 --max-bytes 100000000000000 --max-fds 25000000000000 --max-matches 5000000000
bernie2    11325  0.0  0.0 236908  7364 ?        Ssl  22:28   0:00  \_ /usr/lib/gvfsd
bernie2    11330  0.0  0.0 382412  7816 ?        Sl   22:28   0:00  \_ /usr/lib/gvfsd-fuse /run/user/1001/gvfs -f
bernie2    11423  0.0  0.0 154920  3624 ?        Ssl  22:28   0:00  \_ /usr/lib/dconf-service
bernie2    11554  0.0  0.0  44176  6820 ?        Ss   22:28   0:00  \_ /usr/lib/bluetooth/obexd
bernie2    11924  0.6  0.0 158500  9244 ?        S&lt;sl 22:29   0:00  \_ /usr/bin/pulseaudio --daemonize=no
bernie2    11940  0.0  0.0 238104  9600 ?        Sl   22:30   0:00      \_ /usr/lib/pulse/gsettings-helper
bernie2    11451  0.0  0.1 268668100 26068 ?     SNl  22:28   0:00 /home/bernie/kde/usr/bin/baloo_file
bernie2    11501  0.0  0.0 234140  5036 ?        Sl   22:28   0:00 /usr/lib/geoclue-2.0/demos/agent</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961011</commentid>
    <comment_count>8</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-09-29 03:33:41 +0000</bug_when>
    <thetext>*** Bug 422322 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961013</commentid>
    <comment_count>9</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-09-29 03:34:05 +0000</bug_when>
    <thetext>*** Bug 417889 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961015</commentid>
    <comment_count>10</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-09-29 03:34:36 +0000</bug_when>
    <thetext>This is being worked in in a generic way via the systemd slices and cgroup work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961443</commentid>
    <comment_count>11</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2020-09-29 22:45:00 +0000</bug_when>
    <thetext>*** Bug 427111 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961561</commentid>
    <comment_count>12</comment_count>
    <who name="S. Bryant">steve</who>
    <bug_when>2020-09-30 07:06:33 +0000</bug_when>
    <thetext>This is reproducible under openSUSE Leap 15.2 with Plasma 5.19.90 (prebuilt RPMs).

I have two systems here.  The list of dangling processes on each is not identical to each other.

I tested a little: on one machine, killing only kio_http_cache_cleaner resulted in the other dangling processes exiting without needing to be killed.  This is reproducible on that machine.

On the other machine, some processes still remained after killing kio_http_cache_cleaner.  I was able to trigger them exiting by killing kwin_x11 I think (didn&apos;t make a note).

Perhaps they don&apos;t exit because they&apos;re still waiting for the bus.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963953</commentid>
    <comment_count>13</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-10-12 03:38:34 +0000</bug_when>
    <thetext>*** Bug 362142 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963957</commentid>
    <comment_count>14</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-10-12 03:45:37 +0000</bug_when>
    <thetext>*** Bug 244250 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2076267</commentid>
    <comment_count>15</comment_count>
    <who name="Aleix Pol">aleixpol</who>
    <bug_when>2021-11-09 12:17:25 +0000</bug_when>
    <thetext>Git commit f377696bff39e35ae0f7ae6104d8732b3856744e by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 09/11/2021 at 12:17.
Pushed by apol into branch &apos;master&apos;.

startplasma: Make sure we terminate the processes we start

Changes how plasma_session works. Instead of just starting the
processes, plays the startup sound and stays around. This process then
gets to be terminated as the session ends.
Related: bug 433293

M  +14   -23   startkde/CMakeLists.txt
M  +4    -6    startkde/plasma-session/CMakeLists.txt
A  +47   -0    startkde/plasma-session/sessiontrack.cpp     [License: LGPL(v2.0)]
A  +22   -0    startkde/plasma-session/sessiontrack.h     [License: LGPL(v2.0)]
A  +60   -0    startkde/plasma-session/signalhandler.cpp     [License: LGPL(v2.0)]
A  +38   -0    startkde/plasma-session/signalhandler.h     [License: LGPL(v2.0)]
M  +35   -3    startkde/plasma-session/startup.cpp
M  +15   -0    startkde/plasma-session/startup.h
M  +1    -1    startkde/startplasma-waylandsession.cpp
M  +18   -16   startkde/startplasma.cpp
M  +1    -1    startkde/startplasma.h
M  +9    -0    startkde/waitforname/main.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/f377696bff39e35ae0f7ae6104d8732b3856744e</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>