Bug 120980 - ypserv-2.12.1 has memory leak
ypserv-2.12.1 has memory leak
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: ypserv (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Steve Dickson
: Security
Depends On:
  Show dependency treegraph
Reported: 2004-04-15 16:33 EDT by Feng Qin
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

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

Attachments (Terms of Use)

  None (edit)
Description Feng Qin 2004-04-15 16:33:31 EDT
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 16:42:37 EDT
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.