Created attachment 377379 [details] Patch - fix memory leak on reload Description of problem: When sending a signal to the automount daemon to re-load the maps a map entry cache is pre-allocated before checking if the entry already exists. If the master map entry is found to exist the pre-allocated cache is not freed. How reproducible: Always. Steps to Reproduce: 1. Setup a simple indirect map. In /etc/auto.master: /test /etc/auto.test In /etc/auto.test foo localhost:/export/foo and mkdir /export/foo 2. Modify the autofs configuration to set large number of hash table buckets by setting "MAP_HASH_TABLE_SIZE=6000" in /etc/sysconfig/autofs. 2. Start autofs and ensure it is functional by checking an ls /test/foo mounts /export/foo. 3. Run "top -p <automount pid>" in another window. 4. Run the following script and observe significant memory increase over time. #!/bin/bash while [ 1 ]; do /etc/init.d/autofs reload sleep 1 done Actual results: Memory usage increase rapidly. Expected results: Memory usage increase modestly or settles down to a constant amount as time passes.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
verified on autofs-5.0.1-0.rc2.156.el5 and there isn't memory usage increase rapidly now according to comment #0.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1079.html