Bug 546133 - autofs - memory leak on reload
Summary: autofs - memory leak on reload
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: autofs
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: yanfu,wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-10 05:14 UTC by Ian Kent
Modified: 2018-11-14 12:51 UTC (History)
4 users (show)

Fixed In Version: autofs-5.0.1-0.rc2.134.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 08:41:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch - fix memory leak on reload (1.64 KB, patch)
2009-12-10 05:14 UTC, Ian Kent
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1079 0 normal SHIPPED_LIVE autofs bug fix and enhancement update 2011-07-21 08:37:25 UTC

Description Ian Kent 2009-12-10 05:14:05 UTC
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.

Comment 7 RHEL Program Management 2010-08-09 18:49:45 UTC
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.

Comment 14 yanfu,wang 2011-06-01 07:49:36 UTC
verified on autofs-5.0.1-0.rc2.156.el5 and there isn't memory usage increase rapidly now according to comment #0.

Comment 15 errata-xmlrpc 2011-07-21 08:41:21 UTC
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

Comment 16 errata-xmlrpc 2011-07-21 12:31:08 UTC
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


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