Bug 1070403 - systemd leaves behind processes belonging to logged out users
Summary: systemd leaves behind processes belonging to logged out users
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-26 17:59 UTC by Michal Jaegermann
Modified: 2015-06-29 19:07 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-29 19:07:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michal Jaegermann 2014-02-26 17:59:17 UTC
Description of problem:

After logging in and logging out one would expect that processes owned by the id in question would terminate.  There is an exception.  There are pairs left behind despite that user 'michal' is not logged in at this moment:

# pgrep -u michal -a
1911 systemd
1912 (sd-pam)

michal    1911  ...   Feb20   0:00 /usr/lib/systemd/systemd --user
michal    1912  ...   Feb20   0:00  \_ (sd-pam)

There will be no more of such pairs on the next login of 'michal' but it still does not smell right.  Even less so on an installation with a big number of users coming and going.

Version-Release number of selected component (if applicable):
systemd-208-14.fc20

How reproducible:
always

Additional info:
I wonder if this is not somehow related to an infamous "ssh connection left hanging after poweroff" bug 626477?

Comment 1 Zbigniew Jędrzejewski-Szmek 2014-02-26 19:07:09 UTC
Yes, processes are left around because we don't clean up properly. We could, but then we run into bug 1053315. This area is much better with systemd-210..., but the problems with cron are not solved either.

Comment 2 Lennart Poettering 2014-02-27 18:05:50 UTC
Did you use "loginctl set-linger" on your user maybe?

Comment 3 Michal Jaegermann 2014-02-27 18:42:39 UTC
(In reply to Lennart Poettering from comment #2)
> Did you use "loginctl set-linger" on your user maybe?

Definitely not.  Until you asked I was not even aware that such possibility exists.  I guess that you mean 'enable-linger' as 'man loginctl' fails to mention 'set-linger'.

In the meantime I looked at other machines running Fedora 20.  The reported behaviour is consistent across different installations.

Comment 4 Šimon Lukašík 2014-03-27 16:10:51 UTC
I was just hit by this when I tried to remove a user on my Fedora 20.
The reproducer is as simple as:

    # adduser mgrepl
    # su - mgrepl
    $ systemctl --user status default.target > /dev/null
    $ logout
    # userdel -r mgrepl
    userdel: user mgrepl is currently used by process 1538

Comment 5 Gilboa Davara 2014-05-21 17:21:22 UTC
Hit the same issue.
Managed to kill the user by manually stopping the user unit via:
$ systemctl stop user@<target-user-id>.service
$ userdel -r <target-user>

As Simon, I never ran loginctl set-linger.

- Gilboa

Comment 6 Peter Backes 2014-12-10 01:50:55 UTC
still observing this after upgrade to f21

systemd-216-12.fc21.i686

Comment 7 Zbigniew Jędrzejewski-Szmek 2014-12-10 02:26:21 UTC
This should be fixed upstream now, I'll make a new systemd for F21 this week.

Comment 8 Fedora End Of Life 2015-05-29 11:04:16 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2015-06-29 19:07:23 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.