Stas Bekman wrote:
I'm hunting down those numerous mysterious leak reports we have at the shutdown under threaded mpm. One of them is easily reproduced with the following minimal config file:
PerlModule Apache2 <Perl > sub foo { } </Perl>
This is unfortunately a bug in perl. The rest is explained in the bug report below.
So we may need to revert this change:
Added test to ensure <Perl> sections can have things like %Location tied [Gozer]
or rework it so perl doesn't report leaks, as it's really bad to have these leaks reported. I first thougt it was a leak from my recent revamp of the END blocks, wasting tons of time, just to realize that it wasn't my change :(
Philippe, did you by chance watch the error log when testing that change? I guess you did, but not with the worker/threaded mpm. :)
I must have been running prefork that time. Sorry, should have caught this.
my bug report still didn't make it to p5p. But even when it does I doubt anybody is going to look at it. threads support is pretty dead at the moment at p5p.
Suggest this patch to just move the tied sub declaration to one of the startup-scripts instead of in a <Perl > block
Index: t/conf/extra.last.conf.in =================================================================== RCS file: /home/cvs/modperl-2.0/t/conf/extra.last.conf.in,v retrieving revision 1.20 diff -u -I$Id -r1.20 extra.last.conf.in --- t/conf/extra.last.conf.in 27 Mar 2004 07:43:39 -0000 1.20 +++ t/conf/extra.last.conf.in 22 Apr 2004 23:00:26 -0000 @@ -13,19 +13,6 @@ </Perl>
<Perl >
-package Tie::PerlSection;
-use Tie::Hash;
[EMAIL PROTECTED] = (Tie::StdHash);
-sub FETCH {
- my ($hash, $key) = @_;
- if ($key eq '/tied') {
- return 'TIED';
- }
- return $hash->{$key};
-}
-</Perl>
-
-<Perl >
#Test tied %Location
tie %Location, 'Tie::PerlSection';
$Location{'/tied'} = 'test_tied';
Index: t/conf/modperl_extra.pl
===================================================================
RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v
retrieving revision 1.44
diff -u -I$Id -r1.44 modperl_extra.pl
--- t/conf/modperl_extra.pl 22 Apr 2004 21:36:11 -0000 1.44
+++ t/conf/modperl_extra.pl 22 Apr 2004 23:00:26 -0000
@@ -356,4 +356,16 @@
%before = %after;
}+#For the tied %Location in <Perl > sections
+use Tie::Hash;
[EMAIL PROTECTED]::PerlSection::ISA = qw(Tie::StdHash);
+sub Tie::PerlSection::FETCH {
+ my ($hash, $key) = @_;
+ if ($key eq '/tied') {
+ return 'TIED';
+ }
+ return $hash->{$key};
+}
+
+
1;__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
signature.asc
Description: OpenPGP digital signature
