Bug 120980 - ypserv-2.12.1 has memory leak
Summary: ypserv-2.12.1 has memory leak
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: ypserv (Show other bugs)
(Show other bugs)
Version: 3.0
Hardware: All Linux
Target Milestone: ---
Assignee: Steve Dickson
QA Contact:
Keywords: Security
Depends On:
TreeView+ depends on / blocked
Reported: 2004-04-15 20:33 UTC by Feng Qin
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-14 20:42:37 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Feng Qin 2004-04-15 20:33:31 UTC
Description of problem:
The memory leak can be triggerred remotely. After the `fast_open_file
[]' cache is full with the opend map file, client requests the maps 
that exist and not exist alternatively, then the memory for those 
maps that not exist will leak. Repeat runs will result in ypserv use 
more and more memory, and running more slowly. Actually, this problem 
is similar to the previous one [RHSA-2002:223-07] reported 
at: "http://www.redhat.com/archives/redhat-announce-list/2002-
October/msg00015.html". But with different inputs

Version-Release number of selected component (if applicable):
prior and up to 2.12.1

How reproducible:

Steps to Reproduce:
1.modify cached_map_file number in configuration file 'ypserv.conf' 
as follows. "files: 3"
2.send three requests "ypmatch nfsnobody passwd", "ypmatch nfsnobody 
group", "ypmatch nfsnobody rpc" (this is to fill the map file caches)
3.send request map that does not exist, like "ypmatch aaa foooooooooo"
, and request map that exist, like "ypmatch nfsnobody netgroup" 
Actual results:
memory used by ypserv more and more

Expected results:
should keep constant

Additional info:
The bug exists in file ./lib/yp_db.c. The leaked memory is allocated 
at line 376 and line 377 and is leaked at line 338 and 339.

Comment 1 Steve Dickson 2004-10-14 20:42:37 UTC
Fixed in ypserv-1.3.9-3.6x

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