Red Hat Bugzilla – Bug 162119
slocate / updatedb appears to have a memory leak
Last modified: 2014-06-18 05:07:52 EDT
Description of problem:
The daily cron job /etc/cron.daily/slocate.cron does not release memory.
Version-Release number of selected component (if applicable):
Secure Locate 2.7 - Released January 24, 2003
Memory usage jumps every time the cron job runs, either by the cron job or manually.
Steps to Reproduce:
1. Let the cron job run.
Memory utilization does not drop down after the cron job is done.
The memory utilization should drop,
Created attachment 116160 [details]
System monitor output when the /etc/cron.daily/slocate.cron is executed manually.
Running slocate allocates many entries in the dentry and inode caches,
which are accounted for in the Slab: line of /proc/meminfo.
libgtop2's glibtop_get_mem_s () computes "user" memory as
MemTotal: - MemFree: - Cached: - Buffer:
(using the /proc/meminfo terminology), which means that the dentry cache
is accounted for as "user" memory.
I'm not quite sure whether just subtracting Slab: from "user" memory is
good enough (some of the memory allocated as Slab: is directly caused
by user-space actions, e.g. opening a file, creating a process), but
I think it still would be an improvement. More detail is available in
/proc/slabinfo if necesary.
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.