Process Owned By A User Running After Logout

Home » CentOS » Process Owned By A User Running After Logout
CentOS 3 Comments

After logout, process owned by the logged out user keep running. If a user connects using SSH and then, without starting any programs, signs out the following processes remain running

4 S Tom 1808940 1 0 80 0 – 22440 do_epo 11:08 ? 00:00:00 /usr/lib/systemd/systemd –user
5 S Tom 1808943 1808940 0 80 0 – 75441 – 11:08 ? 00:00:00 (sd-pam)
0 S Tom 1809033 1 0 80 0 – 108596 x64_sy 11:08 ? 00:00:00 gio monitor -f /run/systemd/sessions/13496
0 S Tom 1809062 1808940 0 80 0 – 16095 do_epo 11:08 ? 00:00:00 /usr/bin/dbus-daemon –session –address=systemd: –nofork –nopidfile –systemd-activation –syslog-only

This only applies to users who use ssh, when using the system console [Gnome 3 desktop] all processes own by a user stop when that user signs out. I have a number of users who use the computer for remote access and the number of these running process grows over a few weeks.

I am using CentOS Stream 8. Kernel : 4.18.0-365.el8.x86_64 #1 SMP Thu Feb 10 16:11:23 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

3 thoughts on - Process Owned By A User Running After Logout

  • Update:
    If I change the user’s default shell from csh to bash the problem is fixed. However, we have most of our scripts for EDA tools written in csh

    —–Original Message—

  • Hi,

    Apart from that, which version of dbus is installed on your system?

    There was a bug in dbus-1.12.8-11 and later which could be the root of your issue. I’m not sure this is already fixed in C8s.

    Simon

  • I have now discovered that the problem only occurs when the SSH session has x11 forwarding enabled. When x11 forwarding is enabled the following processes run:

    4 S root 1821338 1295 0 80 0 – 32390 x64_sy 14:31 ? 00:00:00 sshd: Tom [priv]
    4 S Tom 1821350 1 0 80 0 – 22443 do_epo 14:31 ? 00:00:00 /usr/lib/systemd/systemd –user
    5 S Tom 1821354 1821350 0 80 0 – 73760 – 14:31 ? 00:00:00 (sd-pam)
    0 S Tom 1821368 1821350 0 80 0 – 126992 x64_sy 14:31 ? 00:00:00 /usr/bin/pulseaudio –daemonize=no –log-target=journal
    5 S Tom 1821371 1821338 0 80 0 – 32390 core_s 14:31 ? 00:00:00 sshd: Tom@pts/3
    0 S Tom 1821373 1821371 0 80 0 – 55803 – 14:31 pts/3 00:00:00 -tcsh
    1 S Tom 1821453 1 0 80 0 – 14418 do_epo 14:31 ? 00:00:00 /usr/bin/dbus-daemon –syslog –fork –print-pid 5 –print-address 7 –session
    0 S Tom 1821460 1 0 80 0 – 55631 – 14:31 ? 00:00:00 /bin/bash /usr/libexec/dbus-1/dbus-kill-process-with-session 1821453
    0 S Tom 1821462 1821460 0 80 0 – 108596 x64_sy 14:31 ? 00:00:00 gio monitor -f /run/systemd/sessions/13614
    0 S Tom 1821466 1821350 0 80 0 – 14385 do_epo 14:31 ? 00:00:00 /usr/bin/dbus-daemon –session –address=systemd: –nofork –nopidfile –systemd-activation –syslog-only
    0 S Tom 1821470 1 0 80 0 – 130716 x64_sy 14:31 ? 00:00:00 /usr/libexec/gvfsd
    0 S Tom 1821476 1 0 80 0 – 94949 – 14:31 ? 00:00:00 /usr/libexec/gvfsd-fuse /run/user/1855/gvfs -f -o big_writes
    ===
    With no x11 forwarding enabled:

    4 S root 1821724 1295 0 80 0 – 32390 x64_sy 14:35 ? 00:00:00 sshd: Tom [priv]
    4 S Tom 1821739 1 0 80 0 – 22414 do_epo 14:35 ? 00:00:00 /usr/lib/systemd/systemd –user
    5 S Tom 1821742 1821739 0 80 0 – 73760 – 14:35 ? 00:00:00 (sd-pam)
    0 S Tom 1821756 1821739 0 80 0 – 126992 – 14:35 ? 00:00:00 /usr/bin/pulseaudio –daemonize=no –log-target=journal
    5 S Tom 1821758 1821724 0 80 0 – 32390 core_s 14:35 ? 00:00:00 sshd: Tom@pts/3
    0 S Tom 1821759 1821758 1 80 0 – 55819 – 14:35 pts/3 00:00:00 -tcsh
    0 S Tom 1821861 1821739 0 80 0 – 14385 do_epo 14:35 ? 00:00:00 /usr/bin/dbus-daemon –session –address=systemd: –nofork –nopidfile –systemd-activation –syslog-only

    —–Original Message—