Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

PerlRun Memory leak upgrading from 1.99_14 to 2.0.0-RC1

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


JeanFrancois.Nadeau at Ticketmaster

Dec 21, 2004, 5:14 AM

Post #1 of 6 (1128 views)
Permalink
PerlRun Memory leak upgrading from 1.99_14 to 2.0.0-RC1

Hi all,

I was using mod_perl-1.99_14 under Apache 2.0.49,

I upgraded to mod_perl-2.0.0-RC1 under Apache 2.0.52.

Im using RedHat 8.0 / perl 5.8.0 / CGI.pm 3.05

Apache configuration :

SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
PerlOptions +ParseHeaders +GlobalRequest

We only use the PerlRun handler.

Since the upgrade, Apache childs leak (fast).

Using the old PerlRun.pm with the current mod_perl.so does not leak.

I attached "mybugreport"

Let me know if more information is needed

Regards,

Jean
Attachments: mybugreport (4.30 KB)


JeanFrancois.Nadeau at Ticketmaster

Dec 21, 2004, 6:55 AM

Post #2 of 6 (1069 views)
Permalink
RE: PerlRun Memory leak upgrading from 1.99_14 to 2.0.0-RC1 [In reply to]

The problem might be in RegistryCooker.pm

I upgraded each script from 1.99_14 to current one by one to find the leak
starts when using the current RegistryCooker.pm

Let me know if this help...

thanks
_____

From: Jean-François Nadeau [mailto:JeanFrancois.Nadeau[at]ticketmaster.com]
Sent: 21 décembre 2004 08:15
To: modperl[at]perl.apache.org
Subject: PerlRun Memory leak upgrading from 1.99_14 to 2.0.0-RC1


Hi all,

I was using mod_perl-1.99_14 under Apache 2.0.49,

I upgraded to mod_perl-2.0.0-RC1 under Apache 2.0.52.

Im using RedHat 8.0 / perl 5.8.0 / CGI.pm 3.05

Apache configuration :

SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
PerlOptions +ParseHeaders +GlobalRequest

We only use the PerlRun handler.

Since the upgrade, Apache childs leak (fast).

Using the old PerlRun.pm with the current mod_perl.so does not leak.

I attached "mybugreport"

Let me know if more information is needed

Regards,

Jean


stas at stason

Dec 21, 2004, 8:25 AM

Post #3 of 6 (1061 views)
Permalink
Re: PerlRun Memory leak upgrading from 1.99_14 to 2.0.0-RC1 [In reply to]

Jean-François Nadeau wrote:
> Hi all,
>
> I was using mod_perl-1.99_14 under Apache 2.0.49,
>
> I upgraded to mod_perl-2.0.0-RC1 under Apache 2.0.52.
>
> Im using RedHat 8.0 / perl 5.8.0 / CGI.pm 3.05
>
> Apache configuration :
>
> SetHandler perl-script
> PerlResponseHandler ModPerl::PerlRun
> PerlOptions +ParseHeaders +GlobalRequest
>
> We only use the PerlRun handler.
>
> Since the upgrade, Apache childs leak (fast).
>
> Using the old PerlRun.pm with the current mod_perl.so does not leak.
>
> I attached "mybugreport"

Please inline those in the future, so one could comment on it in reply.

> *** The httpd binary was not found

Could you please attach (yes, attach this time :)
/root/NEW/mod_perl-2.0.0-RC1/lib/Apache/BuildConfig.pm
I'm trying to figure out why the above happens.

Also what were the exact arguments you've passed to Makefile.PL?

Now back to your problem.

> *** Packages of interest status:
>
> Apache::Request: -
> CGI : 3.05
> LWP : 5.64, 5.65
> mod_perl : 1.9914, 1.9918

That's after you did 'make install' for RC1? how come you have both now?
It now looks that you've installed RC1 with MP_INST_APACHE2=1, whereas
1.99_14 was installed w/o it. So you ended up with a mix of two modperls.
I suggest you go and nuke any occurences of modperl from your perl tree
and do 'make install' again. The above should report only one mod_perl of
the 1.99_ generation.

If the leak still persist, please post a shortest possible script that we
can reproduce the problem with. The best you can do is to prepare a bug
reporting tarball, based on bug-reporting-skeleton-mp2.tar.gz from:
http://perl.apache.org/docs/2.0/user/help/help.html#Problem_Description

--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas[at]stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


JeanFrancois.Nadeau at Ticketmaster

Dec 21, 2004, 11:57 AM

Post #4 of 6 (1062 views)
Permalink
RE: PerlRun Memory leak upgrading from 1.99_14 to 2.0.0-RC1 [In reply to]

Thanks for the quick reply.

I cleaned up my installation and reinstalled.
See attached bug report and BuildConfig.pm.

Configured with:
perl Makefile.PL MP_INST_APACHE2=1 MP_AP_PREFIX=/usr/local/apache-2.0.52/
make && make install

The leak persist after reinstall.

I do not have a sample script at the moment...

Regards,

Jean
-----Original Message-----
From: Stas Bekman [mailto:stas[at]stason.org]
Sent: 21 décembre 2004 11:26
To: Jean-François Nadeau
Cc: modperl[at]perl.apache.org
Subject: Re: PerlRun Memory leak upgrading from 1.99_14 to 2.0.0-RC1

Jean-François Nadeau wrote:
> Hi all,
>
> I was using mod_perl-1.99_14 under Apache 2.0.49,
>
> I upgraded to mod_perl-2.0.0-RC1 under Apache 2.0.52.
>
> Im using RedHat 8.0 / perl 5.8.0 / CGI.pm 3.05
>
> Apache configuration :
>
> SetHandler perl-script
> PerlResponseHandler ModPerl::PerlRun
> PerlOptions +ParseHeaders +GlobalRequest
>
> We only use the PerlRun handler.
>
> Since the upgrade, Apache childs leak (fast).
>
> Using the old PerlRun.pm with the current mod_perl.so does not leak.
>
> I attached "mybugreport"

Please inline those in the future, so one could comment on it in reply.

> *** The httpd binary was not found

Could you please attach (yes, attach this time :)
/root/NEW/mod_perl-2.0.0-RC1/lib/Apache/BuildConfig.pm
I'm trying to figure out why the above happens.

Also what were the exact arguments you've passed to Makefile.PL?

Now back to your problem.

> *** Packages of interest status:
>
> Apache::Request: -
> CGI : 3.05
> LWP : 5.64, 5.65
> mod_perl : 1.9914, 1.9918

That's after you did 'make install' for RC1? how come you have both now?
It now looks that you've installed RC1 with MP_INST_APACHE2=1, whereas
1.99_14 was installed w/o it. So you ended up with a mix of two modperls.
I suggest you go and nuke any occurences of modperl from your perl tree and
do 'make install' again. The above should report only one mod_perl of the
1.99_ generation.

If the leak still persist, please post a shortest possible script that we
can reproduce the problem with. The best you can do is to prepare a bug
reporting tarball, based on bug-reporting-skeleton-mp2.tar.gz from:
http://perl.apache.org/docs/2.0/user/help/help.html#Problem_Description

--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas[at]stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Attachments: mybugreport4 (4.27 KB)
  BuildConfig.pm (7.46 KB)


stas at stason

Dec 21, 2004, 2:01 PM

Post #5 of 6 (1065 views)
Permalink
Re: PerlRun Memory leak upgrading from 1.99_14 to 2.0.0-RC1 [In reply to]

> Configured with:
> perl Makefile.PL MP_INST_APACHE2=1 MP_AP_PREFIX=/usr/local/apache-2.0.52/
> make && make install

OK. Why do you use MP_AP_PREFIX and not MP_APXS? The docs suggest to use
the latter:
http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Installation
http://perl.apache.org/docs/2.0/user/install/install.html#Dynamic_mod_perl

I guess you're reading this?

----------------------
If however all Apache 2.0 files were installed under the same directory,
mod_perl 2.0's build only needs to know the path to that directory, passed
via the MP_AP_PREFIX option:

% perl Makefile.PL MP_INST_APACHE2=1 MP_AP_PREFIX=$HOME/httpd/prefork
-----------------------

right?

/usr/local/apache-2.0.52/ is the Apache source, correct? Not the binaries.


> The leak persist after reinstall.
>
> I do not have a sample script at the moment...

I have an idea of what could be the cause of the leak:

=item 1.99_17 - October 22, 2004
[...]
Added ModPerl::Util::unload_package() to remove a loaded package
as thoroughly as possible by clearing it's stash. [Gozer]

but I could be wrong. Please post a sample script that we can reproduce
the problem with and we will look at it. Ideally it should be a bug
reporting tarball, based on bug-reporting-skeleton-mp2.tar.gz from:
http://perl.apache.org/docs/2.0/user/help/help.html#Problem_Description



--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas[at]stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


gozer at ectoplasm

Jan 4, 2005, 10:59 AM

Post #6 of 6 (1059 views)
Permalink
Re: PerlRun Memory leak upgrading from 1.99_14 to 2.0.0-RC1 [In reply to]

Jean-François Nadeau wrote:
> Thanks for the quick reply.
>
> I cleaned up my installation and reinstalled.
> See attached bug report and BuildConfig.pm.
>
> Configured with:
> perl Makefile.PL MP_INST_APACHE2=1 MP_AP_PREFIX=/usr/local/apache-2.0.52/
> make && make install
>
> The leak persist after reinstall.

Could you also try applying this small debugging patch and try again? Posting
the "[clear_stash]" log lines from your error_log back ?

Index: src/modules/perl/modperl_util.c
===================================================================
--- src/modules/perl/modperl_util.c (revision 124130)
+++ src/modules/perl/modperl_util.c (working copy)
@@ -781,7 +781,13 @@
if (strcmp(this_stash, package) == 0) {
hv_delete(stash, key, len, G_DISCARD);
}
+ else {
+ fprintf(stderr, "[clear_stash] skip foreign entry %s[%s](%s)\n", package, this_stash, key);
+ }
}
+ else {
+ fprintf(stderr, "[clear_stash] skip unsafe entry %s(%s)\n", package, key);
+ }
}
}
}


--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
Attachments: signature.asc (0.25 KB)

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.