Now I'm really confused. I built the whole thing statically and it still
leaks:
the static build (using the same Perl):
~/test/prefix/bin/perl Makefile.PL EVERYTHING=1 \
APACHE_PREFIX=$(echo ~/test/prefix/apache) \
APACHE_SRC=../apache_1.3.19 DO_HTTPD=1
Now it still leaks 520K per restart:
> make start_httpd_fork
../apache_1.3.19/src/httpd -f `pwd`/t/conf/httpd.conf -d `pwd`/t
> ps -o pid,vsz,comm -p $(cat t/logs/httpd.pid )
PID VSZ COMMAND
4877 7856 httpd
> kill -USR1 $(cat t/logs/httpd.pid )
> ps -o pid,vsz,comm -p $(cat t/logs/httpd.pid )
PID VSZ COMMAND
4877 8488 httpd
> kill -USR1 $(cat t/logs/httpd.pid )
> ps -o pid,vsz,comm -p $(cat t/logs/httpd.pid )
PID VSZ COMMAND
4877 9108 httpd
This is on Redhat 7.1 (not Linux 7.1 as I said below). I didn't bother
trying it on Solaris.
You don't suppose building with APACHE_PREFIX could have anything to do
with it, do you? I haven't heard of any leaks with a static build.
-P
On Sun, 17 Jun 2001, Paul G. Weiss wrote:
> Doug,
>
> I'm confused as to how you managed to *not* leak when I'm still
> leaking. I've tried these tests on both a Solaris 2.7 system and
> a Linux 7.1.
>
> Here is a summary of what I do:
>
> I build Perl
>
> ./Configure -des -Uusemymalloc -Dprefix=$(echo ~/test/prefix) -Dcc=gcc
> make && make test && make install
>
> I build Apache
>
> ~/test/prefix/bin/perl Makefile.PL USE_DSO=1 EVERYTHING=1 \
> USE_APACI=1 APACHE_PREFIX=$(echo ~/test/prefix/apache) \
> APACHE_SRC=../apache_1.3.19 \
> APACI_ARGS='--enable-module=all --enable-shared=max' \
> DO_HTTPD=1
>
> make
> make test
>
> I now run the test:
>
> make start_httpd_fork
> ps -o 'pid,vsz,comm' -p $(cat t/logs/httpd.pid )
> kill -USR1 $(cat t/logs/httpd.pid )
> ps -o 'pid,vsz,comm' -p $(cat t/logs/httpd.pid )
> kill -USR1 $(cat t/logs/httpd.pid )
>
> etc. The virtual size grows each time, although by different amounts
> in Linux and Solaris. Both are around 4Mb. So what are you doing
> differently? Let me know so I can do the same thing. The Perl I'm using
> is 5.6.1 and the modperl is
> modperl_20010614113010.tar.gz.
>
> -P
>
>
> On Fri, 15 Jun 2001, Paul G. Weiss wrote:
>
> > Don't be so willing to bet. Still leaking.
> >
> > I did as you said and just rebuilt Perl and mod_perl but didn't bother to
> > rebuild all the Perl modules (I would have done so had I been successful
> > here).
> >
> > Here's what I see:
> >
> > > make start_httpd_fork
> > ../apache_1.3.19/src/httpd -f `pwd`/t/conf/httpd.conf -d `pwd`/t
> > > ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
> > PID PPID VSZ COMMAND
> > 28802 1 15528 ../apache_1.3.19/src/httpd
> > > kill -USR1 $(cat t/logs/httpd.pid )
> > > ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
> > PID PPID VSZ COMMAND
> > 28802 1 20016 ../apache_1.3.19/src/httpd
> > > kill -USR1 $(cat t/logs/httpd.pid )
> > > ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
> > PID PPID VSZ COMMAND
> > 28802 1 24544 ../apache_1.3.19/src/httpd
> > > kill -USR1 $(cat t/logs/httpd.pid )
> > > ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
> > PID PPID VSZ COMMAND
> > 28802 1 27224 ../apache_1.3.19/src/httpd
> > > make kill_httpd
> > kill `cat t/logs/httpd.pid`
> > rm -f t/logs/httpd.pid
> > rm -f t/logs/error_log
> >
> >
> >
> > On Thu, 14 Jun 2001, Doug MacEachern wrote:
> >
> > > On Fri, 15 Jun 2001, Paul G. Weiss wrote:
> > >
> > > > alignbytes=8, usemymalloc=y, prototype=define
> > > ^
> > > ok, here's why i kept asking for perl -V. i don't see Perl's malloc.c
> > > ever release its memory pool. when usemymalloc=y, free() only puts memory
> > > back into Perl's pool for use by other malloc()'s. i don't see a function
> > > to destroy this pool when perl cleans itself up. willing to bet if you
> > > rebuild Perl with: Configure -des -Uusemymalloc ...
> > > and then rebuild mod_perl, the leaks will go away.
> > >
> >
>
>
>
>
>