Bug 106152 - High CPU usage reading `/etc/passwd`
Summary: High CPU usage reading `/etc/passwd`
Alias: None
Product: accountsservice
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Matthias Clasen
QA Contact:
Depends on:
Reported: 2018-04-20 15:09 UTC by Paul Menzel
Modified: 2018-08-07 09:30 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:

backtrace captured with GDB (14.49 KB, text/plain)
2018-04-20 15:09 UTC, Paul Menzel

Description Paul Menzel 2018-04-20 15:09:30 UTC
Created attachment 138953 [details]
backtrace captured with GDB

With accounts-daemon 0.6.45, several times an hour, the daemon uses 100 % of one thread. According to `strace`, it’s opening `/etc/passwd` in that time, and reading each line after another.

$ ls -lh /etc/passwd{,.mariux}
lrwxrwxrwx 1 root system   13 Feb 26 18:27 /etc/passwd -> passwd.mariux
-rw-r--r-- 1 root system 296K Apr 20 14:43 /etc/passwd.mariux
$ wc -l /etc/passwd.mariux 
4104 /etc/passwd.mariux

Please find some back traces attached, when attaching with GDB, interrupting the daemon while hogging the CPU and doing `bt f`.
Comment 1 Paul Menzel 2018-04-26 16:57:23 UTC
Can this be somehow be linked to bug #106240 [1], where the patch is?

[1]: https://bugs.freedesktop.org/show_bug.cgi?id=106240
Comment 2 GitLab Migration User 2018-08-07 09:30:10 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/accountsservice/accountsservice/issues/6.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.