Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 76932 - rdist leaks memory badly when many except_pat's are used
Summary: rdist leaks memory badly when many except_pat's are used
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rdist
Version: 8.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-29 17:13 UTC by John Heidemann
Modified: 2015-03-05 01:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-09-01 12:56:30 UTC


Attachments (Terms of Use)

Description John Heidemann 2002-10-29 17:13:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021017

Description of problem:
rdist leaks memory badly when many except_pat's are used.
This appears to be due to the fact that glibc's re_comp leaks about 100KB per
invocation (see bug 76594).

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. set up a distfile something like this

MASTER1_FILES = ( ~ )
HOSTS = ( other machine )
rmaster1: ${RMASTER1_FILES} -> ${HOSTS}
	install -w -y -R;
	except_pat ${EXCEPT_PAT};
EXCEPT_PAT = (
        xxx
        yyy
        zzz
	)

2. run rdist with that distfile (rdist -f distfile)
  make sure there are 100s of files in ~
3. cring as the machine swaps like mad

(See bug 76594 for a much simpler test case illustrating the re_comp problem.)
	

Actual Results:  the rdist process quickly consumes 100s of MB of RAM

Expected Results:  rdist should run in <30MB ram

Additional info:

IMHO, the proper fix is to fix glibc (see bug 76594).

This patch will work-around the glibc bug by using rdist's internal re_comp:

dash> diff -u config/mf.linux{~,}
--- config/mf.linux~    1998-11-09 19:53:01.000000000 -0800
+++ config/mf.linux     2002-10-24 13:42:28.000000000 -0700
@@ -16,7 +16,7 @@
 # Functions that are missing in this OS are contained in the
 # files specified in ${MISSINGOBJS}.
 #
-#MISSINGOBJS   = $(O)strerror.o $(O)strcasecmp.o
+MISSINGOBJS    = $(O)regex.o
 
 #
 # System libraries that we need to load.

Comment 1 Phil Knirsch 2003-09-01 12:56:30 UTC
Fixed with newer glibc in newer release.

Read ya, Phil


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