Red Hat Bugzilla – Bug 1000364
accounts-daemon leaks memory on ssh login
Last modified: 2015-02-17 11:53:20 EST
Description of problem:
accountsservice leaks memory on ssh login
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. login via ssh a lot
memory use of /usr/libexec/accounts-daemon increases significantly (I noticed this when it was at 9 % of the total memory of the system)
accounts-daemon should not leak memory
sudo systemctl restart accounts-daemon.service
once in a while.
has two patches which cure two small memory leaks and
has a patch which seems to cure the big one, though there might still be another small leak somewhere.
The latter one is the important one. When /var/log/wtmp is changed, on_users_monitor_changed (daemon.c), calls queue_reload_users_soon, which schedules a call to reload_users_timeout, which calls reload_users, which calls create_users_hash_table to allocate a hash table. It then replaces the one in daemon->priv->users with that table and calls g_hash_table_destroy on the old one, but since user_finalize (user.c) doesn't free user->login_history, that memory is lost. This happens every time a user logs in and the sum of all the login histories seems to be quite large. So this is rather a big leak.
I can confirm this problem. accounts-daemon had ballooned up to 1G of resident memory. This occurred as a result of a day of ansible usage against localhost. Restarting temporarily releases the memory being use.
I see 0.6.35, which has the patches mentioned above, is in fedora 20. Will it also be available in fedora 19?
That would be good, or even just to patch the 0.6.34, as I did back in August. I've been using the patched version since I reported the issue and have experienced no problems since then. Either way, I'm sure users, who don't know how to apply the patches themselves, would like to have one solution or the other.
This message is a notice that Fedora 19 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 19. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.
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 19 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.
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 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
Thank you for reporting this bug and we are sorry it could not be fixed.