You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by to...@apache.org on 2008/06/29 19:21:28 UTC
svn commit: r672647 - in /perl/modperl/branches/threading: ./
ModPerl-Registry/t/conf/ lib/ lib/Apache2/ lib/ModPerl/ src/modules/perl/
t/apr/ t/filter/ t/filter/TestFilter/ t/hooks/ t/hooks/TestHooks/
t/modperl/ t/modules/ t/perl/ t/response/TestAPI/ ...
Author: torsten
Date: Sun Jun 29 10:21:27 2008
New Revision: 672647
URL: http://svn.apache.org/viewvc?rev=672647&view=rev
Log:
Merged revisions 594682,594786,606232,606831,606833,606835,606980,607687,607690,607692-607694,607697,609090,614146,615741,615751,617965,620440,628249,628251,628359,629672,630597,630678-630679,632247,636631,648961,648975,648991,649412,654655,654922,654924,656819,659866,672484 via svnmerge from
https://svn.eu.apache.org/repos/asf/perl/modperl/trunk
........
r594682 | gozer | 2007-11-13 23:43:25 +0100 (Tue, 13 Nov 2007) | 4 lines
Simplify this test, using keepalives instead of the same_interp
stuff works just fine. And it's simpler. This one is for Fred.
........
r594786 | phred | 2007-11-14 07:47:39 +0100 (Wed, 14 Nov 2007) | 2 lines
We no longer need TestCommon::SameInterp here.
........
r606232 | phred | 2007-12-21 17:18:24 +0100 (Fri, 21 Dec 2007) | 7 lines
Apache2::Reload is being moved to an externally maintained CPAN distribution.
Apache::Reload has been graciously donated to the ASF by Matt Sergeant. This
commit is part of an svn mv of related files to that distribution.
Reviewed in different parts by:
Phillip Gollucci, Gozer, Geoff
........
r606831 | phred | 2007-12-26 03:50:29 +0100 (Wed, 26 Dec 2007) | 3 lines
Refactor to use keep_alives instead of TestCommon::SameInterp.
As done originally in revision 594682 at ApacheCon 2007
........
r606833 | phred | 2007-12-26 03:55:37 +0100 (Wed, 26 Dec 2007) | 3 lines
Now that we are using keepalives, it doen't make sense to retain the t_debug
statement, since that is implicit in the test configuration.
........
r606835 | phred | 2007-12-26 04:08:19 +0100 (Wed, 26 Dec 2007) | 3 lines
Refactor additional tests to use keepalives instead of same_interp.
See revision 594682 for additional details.
........
r606980 | phred | 2007-12-27 01:09:57 +0100 (Thu, 27 Dec 2007) | 4 lines
Remove sameinterp mechanism in favor of using keepalives in the test
client to reuse the same modperl interpreter for subsequent requests.
See revision 606831 for the details.
........
r607687 | gozer | 2007-12-31 07:48:57 +0100 (Mon, 31 Dec 2007) | 11 lines
Fix a crash when running a sub-request from within a filter where
mod_perl was not the content handler.
Running modperl_wbucket_flush(rcfg->wbucket) before the subrequest
is run ensures we've flushed our own content handler if it has
any data in the pipeline. Problem was rcfg->wbucket will not be
set if we are not the content handler.
Solution is to avoid the flush in that particular case.
........
r607690 | gozer | 2007-12-31 08:20:50 +0100 (Mon, 31 Dec 2007) | 8 lines
*Whitespace*
delete trailing spaces and trailing empty lines
Reviewed-By: gozer
Submitted-By: Torsten Foertsch <to...@gmx.net>
Message-Id: <20...@gmx.net>
........
r607692 | gozer | 2007-12-31 08:31:16 +0100 (Mon, 31 Dec 2007) | 8 lines
*Whitespace*
expands tabs in C files
Reviewed-by: gozer
Submitted-by: Torsten Foertsch <to...@gmx.net>
Message-Id: <20...@gmx.net>
........
r607693 | gozer | 2007-12-31 08:36:46 +0100 (Mon, 31 Dec 2007) | 8 lines
*Whitespace*
removes trailing whitespace and expands tabs in t/*.t
Reviewed-by: gozer
Submitted-by: Torsten Foertsch <to...@gmx.net>
Message-Id: <20...@gmx.net>
........
r607694 | gozer | 2007-12-31 08:49:31 +0100 (Mon, 31 Dec 2007) | 8 lines
*Whitespace*
remove trailing newlines from MP_TRACE_x calls
Reviewed-by: gozer
Submitted-by: Torsten Foertsch <to...@gmx.net>
Message-Id: <20...@gmx.net>
........
r607697 | gozer | 2007-12-31 09:05:11 +0100 (Mon, 31 Dec 2007) | 9 lines
*Whitespace*
Cleanup trailing whitespace, whitespace-only lines and litteral
tab characters.
Reviewed-By: gozer
Submitted-by: Torsten Foertsch <to...@gmx.net>
Message-Id: <20...@gmx.net>
........
r609090 | randyk | 2008-01-05 05:46:50 +0100 (Sat, 05 Jan 2008) | 4 lines
Fix problems with redefinitions of perl_free as free and perl_malloc as malloc on Win32, as described at
http://marc.info/?l=apache-modperl&m=119896407510526&w=2
[Tom Donovan]
........
r614146 | gozer | 2008-01-22 09:33:54 +0100 (Tue, 22 Jan 2008) | 4 lines
Simplify the test as well as handle all possible Perl version
numbers possible. (5.10.0 for instance)
........
r615741 | gozer | 2008-01-28 08:21:58 +0100 (Mon, 28 Jan 2008) | 1 line
whitespace (realign)
........
r615751 | gozer | 2008-01-28 09:01:57 +0100 (Mon, 28 Jan 2008) | 7 lines
Fix erratic behaviour when filters were used with Perl 5.10.
Get rid of MP_CODE_ATTRS and re-implement it as modperl_code_attrs(aTHX_ CV *cv)
relying on magic instead of some obscure CV field CvXSUBANY we were piggybacking,
and hoping nobody was using (It was used in perl 5.10)
........
r617965 | gozer | 2008-02-03 10:10:04 +0100 (Sun, 03 Feb 2008) | 4 lines
Apache::Reload isn't part of the core anymore, so don't expect
it to be available.
........
r620440 | gozer | 2008-02-11 09:51:08 +0100 (Mon, 11 Feb 2008) | 13 lines
Fix a crash when spawning Perl threads under Perl 5.10.
The way we used to stash a pointer to the current modperl_interp_t into
the current PerlInterpreter * relied on HvPMROOT or stashing things
in unused fields of PL_modglobal.
This borked under 5.10, as there was no unused fields left to use,
and things had moved from under our feet.
This patches changes the implementation to using PL_modglobal, a
per-interpreter hash specifically designed for this purpose.
........
r628249 | gozer | 2008-02-16 08:59:54 +0100 (Sat, 16 Feb 2008) | 8 lines
Remove strange, leftover 'static' declaration.
Surprising this is even valid C
Reported-By: Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Message-ID: <Pi...@theoryx5.uwinnipeg.ca>
........
r628251 | gozer | 2008-02-16 09:04:46 +0100 (Sat, 16 Feb 2008) | 8 lines
Sprinkle a few missing #ifdefs introduced by the recently introduced
Perl 5.10 changes when building without ithreads.
Reviewed-By: gozer
Submitted-By: Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Message-ID: <Pine.LNX.4.64.0802151447160.11691@theoryx5.uwinnipeg.ca
........
r628359 | randyk | 2008-02-16 17:59:58 +0100 (Sat, 16 Feb 2008) | 2 lines
replace & by &
........
r629672 | randyk | 2008-02-21 02:54:21 +0100 (Thu, 21 Feb 2008) | 2 lines
Add Apache::request, using Apache2::compat::request, as discussed at
http://marc.info/?t=120291200200005&r=1&w=2
........
r630597 | gozer | 2008-02-24 08:23:16 +0100 (Sun, 24 Feb 2008) | 9 lines
Fix a possible $r->location curruption. Sometimes, the
path copied into $r->location would end it's life before
$r.
Reviewed-By: gozer
Submitted-By: Torsten Foertsch <to...@gmx.net>
Message-ID: <20...@gmx.net>
........
r630678 | phred | 2008-02-24 21:49:58 +0100 (Sun, 24 Feb 2008) | 2 lines
Update svn:external list to include Apache::Reload and Apache::SizeLimit
........
r630679 | phred | 2008-02-24 21:57:23 +0100 (Sun, 24 Feb 2008) | 1 line
fix spelling error
........
r632247 | phred | 2008-02-29 08:20:31 +0100 (Fri, 29 Feb 2008) | 4 lines
Revert earlier commit r630678, more needs to be done before the other
modules can be added to external.
Thought I committed this yesterday but it appears to have not gone through.
........
r636631 | gozer | 2008-03-13 06:25:22 +0100 (Thu, 13 Mar 2008) | 7 lines
Fix a subtle typo. return; is mostly undefined, try return NULL instead.
Reviewed-By: gozer
Submitted-By: Niko Tyni <nt...@mappi.helsinki.fi>
Message-ID: <20...@rebekka>
........
r648961 | gozer | 2008-04-17 08:05:15 +0200 (Thu, 17 Apr 2008) | 1 line
Releasing 2.0.4
........
r648975 | gozer | 2008-04-17 08:37:13 +0200 (Thu, 17 Apr 2008) | 1 line
start 2.0.4-dev cycle
........
r648991 | gozer | 2008-04-17 10:02:01 +0200 (Thu, 17 Apr 2008) | 3 lines
Cleanup the RELEASE instructions for next time.
........
r649412 | gozer | 2008-04-18 10:53:11 +0200 (Fri, 18 Apr 2008) | 8 lines
Make sure mod_perl's own ChildInitHandlers are run before user
supplied ones. This fixes the incorrectly reported value of $$
at ChildInit time
Reported-By: Mark Blackman <ma...@blackmans.org>
Message-Id: <88...@blackmans.org>
........
r654655 | pgollucci | 2008-05-09 01:49:16 +0200 (Fri, 09 May 2008) | 7 lines
Fix compiles with non-threaded APRs.
Reported by: pgollucci, Simon Bertrang <ja...@errornet.de>
Submitted by: gozer, Simon Bertrang <ja...@errornet.de>
Reviewed by: pgollucci
........
r654922 | pgollucci | 2008-05-09 22:01:17 +0200 (Fri, 09 May 2008) | 3 lines
mp 2.0 came and went
........
r654924 | pgollucci | 2008-05-09 22:08:39 +0200 (Fri, 09 May 2008) | 3 lines
these are done
........
r656819 | pgollucci | 2008-05-15 22:31:31 +0200 (Thu, 15 May 2008) | 3 lines
adding so we don't forget
........
r659866 | phred | 2008-05-24 22:15:30 +0200 (Sat, 24 May 2008) | 3 lines
Add some questions, add Apache::Test 1.31 goal, add current devs who have
starting working on those issues.
........
r672484 | torsten | 2008-06-28 11:45:31 +0200 (Sat, 28 Jun 2008) | 1 line
change "XSLoader::load(@_)" to "goto &XSLoader::load" in {APR,Apache2}::XSLoader
........
Added:
perl/modperl/branches/threading/t/filter/TestFilter/with_subrequest.pm
- copied unchanged from r672484, perl/modperl/trunk/t/filter/TestFilter/with_subrequest.pm
perl/modperl/branches/threading/t/filter/with_subrequest.t
- copied unchanged from r672484, perl/modperl/trunk/t/filter/with_subrequest.t
perl/modperl/branches/threading/todo/2.0.5
- copied unchanged from r672484, perl/modperl/trunk/todo/2.0.5
Removed:
perl/modperl/branches/threading/lib/Apache2/Reload.pm
perl/modperl/branches/threading/t/modperl/sameinterp.t
perl/modperl/branches/threading/t/modules/reload.t
perl/modperl/branches/threading/t/response/TestModperl/sameinterp.pm
perl/modperl/branches/threading/t/response/TestModules/reload.pm
perl/modperl/branches/threading/todo/release-checklist
Modified:
perl/modperl/branches/threading/ (props changed)
perl/modperl/branches/threading/Changes
perl/modperl/branches/threading/Makefile.PL
perl/modperl/branches/threading/ModPerl-Registry/t/conf/extra.conf.in
perl/modperl/branches/threading/README
perl/modperl/branches/threading/RELEASE
perl/modperl/branches/threading/STATUS
perl/modperl/branches/threading/SVN-MOVE
perl/modperl/branches/threading/lib/Apache2/compat.pm
perl/modperl/branches/threading/lib/ModPerl/BuildMM.pm
perl/modperl/branches/threading/lib/ModPerl/WrapXS.pm
perl/modperl/branches/threading/lib/mod_perl2.pm
perl/modperl/branches/threading/src/modules/perl/mod_perl.c
perl/modperl/branches/threading/src/modules/perl/mod_perl.h
perl/modperl/branches/threading/src/modules/perl/modperl_apache_compat.h
perl/modperl/branches/threading/src/modules/perl/modperl_callback.c
perl/modperl/branches/threading/src/modules/perl/modperl_config.c
perl/modperl/branches/threading/src/modules/perl/modperl_config.h
perl/modperl/branches/threading/src/modules/perl/modperl_interp.c
perl/modperl/branches/threading/src/modules/perl/modperl_interp.h
perl/modperl/branches/threading/src/modules/perl/modperl_mgv.c
perl/modperl/branches/threading/src/modules/perl/modperl_perl_includes.h
perl/modperl/branches/threading/src/modules/perl/modperl_svptr_table.c
perl/modperl/branches/threading/src/modules/perl/modperl_types.h
perl/modperl/branches/threading/src/modules/perl/modperl_util.c
perl/modperl/branches/threading/src/modules/perl/modperl_util.h
perl/modperl/branches/threading/t/apr/pool_lifetime.t
perl/modperl/branches/threading/t/hooks/TestHooks/inlined_handlers.pm
perl/modperl/branches/threading/t/hooks/inlined_handlers.t
perl/modperl/branches/threading/t/modperl/cookie.t
perl/modperl/branches/threading/t/modperl/cookie2.t
perl/modperl/branches/threading/t/modperl/request_rec_perlio_api.t
perl/modperl/branches/threading/t/modules/apache_status.t
perl/modperl/branches/threading/t/perl/ithreads3.t
perl/modperl/branches/threading/t/response/TestAPI/add_config.pm
perl/modperl/branches/threading/t/response/TestAPR/pool_lifetime.pm
perl/modperl/branches/threading/t/response/TestModperl/cookie.pm
perl/modperl/branches/threading/t/response/TestModperl/cookie2.pm
perl/modperl/branches/threading/t/response/TestModperl/request_rec_perlio_api.pm
perl/modperl/branches/threading/t/response/TestPerl/ithreads3.pm
perl/modperl/branches/threading/xs/APR/Pool/APR__Pool.h
perl/modperl/branches/threading/xs/Apache2/Filter/Apache2__Filter.h
perl/modperl/branches/threading/xs/Apache2/SubRequest/Apache2__SubRequest.h
perl/modperl/branches/threading/xs/ModPerl/Interpreter/ModPerl__Interpreter.h
perl/modperl/branches/threading/xs/tables/current/ModPerl/FunctionTable.pm
Propchange: perl/modperl/branches/threading/
------------------------------------------------------------------------------
svn:mergeinfo = /perl/modperl/trunk:594682-672484
Propchange: perl/modperl/branches/threading/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Jun 29 10:21:27 2008
@@ -1 +1 @@
-/perl/modperl/trunk:1-588158
+/perl/modperl/trunk:1-672628
Modified: perl/modperl/branches/threading/Changes
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/Changes?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/Changes (original)
+++ perl/modperl/branches/threading/Changes Sun Jun 29 10:21:27 2008
@@ -10,7 +10,7 @@
=over 3
-=item 2.0.4-dev
+=item 2.0.5-dev
PerlInterpScope is now more advisory. Using $(c|r)->pnotes will bind
the current interpreter to that object for it's lifetime.
@@ -29,11 +29,45 @@
Expose modperl_interp_t via ModPerl::Interpreter [Torsten Foertsch]
+Fix a problem that could make APR::XSLoader and Apache2::XSLoader
+load the wrong shared library. [Torsten Foertsch]
+
+Fix compilation when using a non-threaded APR.
+[Gozer, Philip M. Gollucci]
+
+Make sure mod_perl's own ChildInitHandlers are run before user
+supplied ones. This fixes the incorrectly reported value of $$
+at ChildInit time [Gozer]
+
+=item 2.0.4 April 16, 2008
+
+Fix $r->location corruption under certain conditions
+[Gozer]
+
+Fix a crash when spawning Perl threads under Perl 5.10
+[Gozer]
+
+Fix erratic behaviour when filters were used with Perl 5.10
+[Gozer]
+
+Fix problems with redefinitions of perl_free as free and perl_malloc
+as malloc on Win32, as described at
+ http://marc.info/?l=apache-modperl&m=119896407510526&w=2
+[Tom Donovan]
+
+Fix a crash when running a sub-request from within a filter where
+mod_perl was not the content handler. [Gozer]
+
+Refactor tests to use keepalives instead of same_interp [Gozer, Phred]
+
+Apache2::Reload has been moved to an externally maintained
+CPAN distribution [Fred Moyer <fr...@redhotpenguin.com>]
+
PerlCleanupHandler are now registered with a subpool of $r->pool,
instead of $r->pool itself, ensuring they run _before_ any other
$r->pool cleanups [Torsten Foertsch]
-Fix a bug that would prevent pnotes from being cleaned up proprely
+Fix a bug that would prevent pnotes from being cleaned up properly
at the end of the request [Torsten Foertsch]
n Win32, embed the manifest file, if present, in mod_perl.so,
Modified: perl/modperl/branches/threading/Makefile.PL
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/Makefile.PL?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/Makefile.PL (original)
+++ perl/modperl/branches/threading/Makefile.PL Sun Jun 29 10:21:27 2008
@@ -817,7 +817,6 @@
tag :
svn copy https://svn.apache.org/repos/asf/perl/modperl/trunk https://svn.apache.org/repos/asf/perl/modperl/tags/$(VERSION_SYM)
svn copy https://svn.apache.org/repos/asf/perl/modperl/docs/trunk https://svn.apache.org/repos/asf/perl/modperl/docs/tags/$(VERSION_SYM)
- @$(ECHO) update mod_perl2.pm VERSION now
EOF
return $string;
Modified: perl/modperl/branches/threading/ModPerl-Registry/t/conf/extra.conf.in
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/ModPerl-Registry/t/conf/extra.conf.in?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/ModPerl-Registry/t/conf/extra.conf.in (original)
+++ perl/modperl/branches/threading/ModPerl-Registry/t/conf/extra.conf.in Sun Jun 29 10:21:27 2008
@@ -21,12 +21,6 @@
# run on startup
PerlRequire @ServerRoot@/conf/modperl_extra_startup.pl
-#### DEVMODE: Remove in production ###
-PerlModule Apache2::Reload
-PerlInitHandler Apache2::Reload
-PerlSetVar ReloadAll Off
-PerlSetVar ReloadModules "ModPerl::*"
-
PerlSetVar ModPerl::RegistryCooker::DEBUG 2
PerlModule ModPerl::RegistryCooker
Modified: perl/modperl/branches/threading/README
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/README?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/README (original)
+++ perl/modperl/branches/threading/README Sun Jun 29 10:21:27 2008
@@ -3,8 +3,8 @@
*** Prerequisites ***
Apache:
- Dynamic mod_perl (DSO): Apache 2.0.47 - 2.0.59.
- Static mod_perl: Apache 2.0.51 - 2.0.59.
+ Dynamic mod_perl (DSO): Apache 2.0.47 - 2.2.8.
+ Static mod_perl: Apache 2.0.51 - 2.2.8.
Newer Apache versions may work with this version of mod_perl. If
not, the svn version likely will, which can be obtained from:
Modified: perl/modperl/branches/threading/RELEASE
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/RELEASE?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/RELEASE (original)
+++ perl/modperl/branches/threading/RELEASE Sun Jun 29 10:21:27 2008
@@ -30,7 +30,7 @@
make sure you give the correct permissions to them.
1. 'make dist' - to make sure nothing is missing from the manifest,
- etc. Now test this generated package mod_perl-2.0.4.tar.gz (not
+ etc. Now test this generated package mod_perl-2.0.5.tar.gz (not
the current build) with as many
configurations as possible on as many platforms as possible,
unpacking the package each time afresh.
@@ -55,7 +55,7 @@
to the modperl/dev list (may be longer to give most people a chance
to catch up). no need to tag this package
- Subject: [RELEASE CANDIDATE]: mod_perl-2.0.4 RC\d+
+ Subject: [RELEASE CANDIDATE]: mod_perl-2.0.5 RC\d+
2a. if problems are detected during stage 2, repeat stages 1 and 2.
@@ -75,59 +75,68 @@
% make -n tag
d. commit Changes README Makefile.PL
- % svn ci Changes README Makefile.PL
+ % svn ci -m "Releasing 2.0.5" Changes README Makefile.PL
e. tag
% make tag
f. Update the svn:externals in the new tag
(you can't propedit remotely yet in svn)
- svn co https://svn.apache.org/repos/asf/perl/modperl/tags/2_0_3
- svn propedit svn:externals 2_0_3
- Update the Apache-Test line to the tag you previously created.
+ % svn co https://svn.apache.org/repos/asf/perl/modperl/tags/2_0_5
+ % svn propedit svn:externals 2_0_5
+ Update the Apache-Test line to current revision
+ % svn info https://svn.apache.org/repos/asf/perl/Apache-Test/trunk | grep "Last Changed Rev"
Update the docs line to the current tag.
- svn ci
+ It should look like:
+ % svn propget svn:externals 2_0_5
+ Apache-Test -r 608229 https://svn.apache.org/repos/asf/perl/Apache-Test/trunk
+ docs https://svn.apache.org/repos/asf/perl/modperl/docs/tags/2_0_5/src/docs/2.0
+
+ % svn ci -m "Releasing 2.0.5"
g. create the final package
% make dist
h. test the final package again at least once
-4. Release the package and update links (e.g. mod_perl-2.0.4.tar.gz)
+4. Release the package and update links (e.g. mod_perl-2.0.5.tar.gz)
- a. upload to www.apache.org:/www/perl.apache.org/dist/
+ a. upload to perl.apache.org:/www/perl.apache.org/dist/
- % scp mod_perl-2.0.4.tar.gz perl.apache.org:/www/perl.apache.org/dist/
+ % scp mod_perl-2.0.5.tar.gz perl.apache.org:/www/perl.apache.org/dist/
b. ssh to perl.apache.org, unpack the package, update symlinks to the
tar ball and unpacked distro:
% ssh perl.apache.org
% cd /www/perl.apache.org/dist/
- % ln -sf mod_perl-2.0.4.tar.gz mod_perl-2.0-current.tar.gz
- % tar -xzvf mod_perl-2.0.4.tar.gz
+ % ln -sf mod_perl-2.0.5.tar.gz mod_perl-2.0-current.tar.gz
+ % tar -xzvf mod_perl-2.0.5.tar.gz
% rm /www/perl.apache.org/dist/mod_perl-2.0-current
- % ln -sf mod_perl-2.0.4 mod_perl-2.0-current
+ % ln -sf mod_perl-2.0.5 mod_perl-2.0-current
c. archive older releases (keep current + one prior release)
- % mv /www/perl.apache.org/dist/mod_perl-2.0.2.tar.gz \
+ % mv /www/perl.apache.org/dist/mod_perl-2.0.3.tar.gz \
/www/perl.apache.org/dist/old
- % mv /www/perl.apache.org/dist/mod_perl-2.0.2.tar.gz.asc \
+ % mv /www/perl.apache.org/dist/mod_perl-2.0.3.tar.gz.asc \
/www/perl.apache.org/dist/old
- % rm -rf /www/perl.apache.org/dist/mod_perl-2.0.2
-
- d. update the version and release date
- modperl-docs/src/download/index_top.html and commit. It'll be
- automatically updated within 6 hours. Alternatively you can do a
- manual update by logging into www.apache.org and running:
+ % rm -rf /www/perl.apache.org/dist/mod_perl-2.0.3
- % /home/perlwww/apache.org/modperl-docs/bin/site_build
+ d. update the version and release date in the docs:
+ % vi modperl-docs/src/download/index_top.html
+ % vi modperl-docs/doap_Perl.rdf
- e. update our projects.apache.org doap file with the new release
- version and date
+ and commit.
+ % svn ci -m "Releasing 2.0.5" \
+ modperl-docs/src/download/index_top.html \
+ modperl-docs/doap_Perl.rdf
+
+ It'll be automatically updated within 6 hours. Alternatively
+ you can do a manual update by logging into www.apache.org and
+ running:
- % vi modperl-docs/doap_Perl.rdf
+ % /home/perlwww/apache.org/modperl-docs/bin/site_build
5. Upload the package to CPAN
@@ -138,33 +147,33 @@
a. sign your local copy of the tarball:
- % gpg --detach-sign --armor mod_perl-2.0.4.tar.gz
+ % gpg --detach-sign --armor mod_perl-2.0.5.tar.gz
- % pgps -b --armor mod_perl-2.0.4.tar.gz
+ % pgps -b --armor mod_perl-2.0.5.tar.gz
- b. upload the generated sig file to www.apache.org:
+ b. upload the generated sig file to perl.apache.org:
- % scp mod_perl-2.0.4.tar.gz.asc perl.apache.org:/www/perl.apache.org/dist/
- % ssh www.apache.org
+ % scp mod_perl-2.0.5.tar.gz.asc perl.apache.org:/www/perl.apache.org/dist/
+ % ssh perl.apache.org
% cd /www/perl.apache.org/dist/
- % chmod 0664 mod_perl-2.0.4.tar.gz.asc
- % ln -sf mod_perl-2.0.4.tar.gz.asc mod_perl-2.0-current.tar.gz.asc
+ % chmod 0664 mod_perl-2.0.5.tar.gz.asc
+ % ln -sf mod_perl-2.0.5.tar.gz.asc mod_perl-2.0-current.tar.gz.asc
c. ask one of the other developers to double check the signature file
and tarball: download both files and verify the signature:
- http://perl.apache.org/dist/mod_perl-2.0.4.tar.gz.asc
- http://perl.apache.org/dist/mod_perl-2.0.4.tar.gz
+ http://perl.apache.org/dist/mod_perl-2.0.5.tar.gz.asc
+ http://perl.apache.org/dist/mod_perl-2.0.5.tar.gz
- % gpg --verify mod_perl-2.0.4.tar.gz.asc
+ % gpg --verify mod_perl-2.0.5.tar.gz.asc
- % pgpv mod_perl-2.0.4.tar.gz.asc
+ % pgpv mod_perl-2.0.5.tar.gz.asc
d. make sure that the files you just created are group rw so
all the dist admins can make changes:
- % find /www/perl.apache.org/dist/ -user $USER -type f -exec chmod 0664 {} \;
- % find /www/perl.apache.org/dist/ -user $USER -type d -exec chmod 0775 {} \;
+ % find /www/perl.apache.org/dist/ -user $USER -type f -print0 | xargs -0 chmod 0664
+ % find /www/perl.apache.org/dist/ -user $USER -type d -print0 | xargs -0 chmod 0775
7. Distribute to www.apache.org/dist/perl
and archive the old package under /www/archive.apache.org/dist/perl/
@@ -172,27 +181,27 @@
a. unpack the package, update symlinks to the tarball and unpacked distro:
% cd /www/www.apache.org/dist/perl/
- % cp /www/perl.apache.org/dist/mod_perl-2.0.4.tar.gz* .
- % tar -xzvf mod_perl-2.0.4.tar.gz
- % mv mod_perl-2.0.2.tar.gz* /www/archive.apache.org/dist/perl/
- % rm -rf mod_perl-2.0.2
+ % cp /www/perl.apache.org/dist/mod_perl-2.0.5.tar.gz* .
+ % tar -xzvf mod_perl-2.0.5.tar.gz
+ % mv mod_perl-2.0.3.tar.gz* /www/archive.apache.org/dist/perl/
+ % rm -rf mod_perl-2.0.3
b. make sure that the files you just created are group rw so
all the dist admins can make changes:
- % find /www/www.apache.org/dist/ -user $USER -type f -exec chmod 0664 {} \;
- % find /www/www.apache.org/dist/ -user $USER -type d -exec chmod 0775 {} \;
+ % find /www/www.apache.org/dist/perl/ -user $USER -type f -print0 | xargs -0 chmod 0664
+ % find /www/www.apache.org/dist/perl/ -user $USER -type d -print0 | xargs -0 chmod 0775
8. Announce the package
a. post ... to the modperl, announce lists
Note, to post to announce@, you must be sending from an apache.org address.
- Subject: [ANNOUNCE] mod_perl 2.0.4
+ Subject: [ANNOUNCE] mod_perl 2.0.5
include
- link at perl.apache.org:
- http://apache.org/dist/perl/mod_perl-2.0.4.tar.gz
- http://apache.org/dist/perl/mod_perl-2.0.4.tar.gz.asc (pgp sig)
+ http://apache.org/dist/perl/mod_perl-2.0.5.tar.gz
+ http://apache.org/dist/perl/mod_perl-2.0.5.tar.gz.asc (pgp sig)
- MD5 sig (as it comes from CPAN upload announce).
- the latest Changes
@@ -203,21 +212,21 @@
b. edit ./Changes:
- start a new item with incremented version + '-dev'
- =item 2.0.5-dev
+ =item 2.0.6-dev
c. add a release entry in STATUS
d. update this file versions to make it easy to copy-n-paste things
on the next release:
- $ perl -pi -e 's/(\d+)\.(\d+)\.(\d+)/join(".", $1, $2, $3+1)/eg' RELEASE
+ $ perl -pi -e 's/(\d+)([._])(\d+)(\2)(\d+)/join($2, $1, $3, $5+1)/eg' RELEASE
e. commit the changed files
- % svn ci -m "start 2.0.4-dev cycle" Changes lib/mod_perl2.pm \
+ % svn ci -m "start 2.0.5-dev cycle" Changes lib/mod_perl2.pm \
STATUS RELEASE
10. Old Versions
Remind other Developers to delete versions older then the prior release
- from CPAN. Old releases can always be found on BackPan.
+ from CPAN. Old releases can always be found on BACKPAN.
Modified: perl/modperl/branches/threading/STATUS
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/STATUS?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/STATUS (original)
+++ perl/modperl/branches/threading/STATUS Sun Jun 29 10:21:27 2008
@@ -3,6 +3,7 @@
Release:
--------
+ 2.000.04 : Released Apr 16, 2008
2.000.03 : Released Nov 29, 2006
2.000.02 : Released Oct 20, 2005
2.000.01 : Released Jun 17, 2005
Modified: perl/modperl/branches/threading/SVN-MOVE
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/SVN-MOVE?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/SVN-MOVE (original)
+++ perl/modperl/branches/threading/SVN-MOVE Sun Jun 29 10:21:27 2008
@@ -8,14 +8,6 @@
Reviewed by:
...
-* svn:externals Apache-Test/ and docs/ doesn't work breakages:
-
- - svn diff doesn't work
- - svn tagging or branching doesn't work
-
-* the details of svn propedit svn:ignore and other propedit features
- don't appear commit messages
-
* commit messages should trim the unrelated crap in the file path
e.g. currently we get:
@@ -36,7 +28,3 @@
Proposed Subject format:
$svn_id $first_subdir/$first_file ($trunk)
-
-* cvs2svn [cvs]embperl:
- Move to [svn]/perl/embperl/trunk (with tags/branches there too)
-
Modified: perl/modperl/branches/threading/lib/Apache2/compat.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/lib/Apache2/compat.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/lib/Apache2/compat.pm (original)
+++ perl/modperl/branches/threading/lib/Apache2/compat.pm Sun Jun 29 10:21:27 2008
@@ -322,6 +322,10 @@
package Apache;
+sub request {
+ return Apache2::compat::request(@_);
+}
+
sub unescape_url_info {
my ($class, $string) = @_;
Apache2::URI::unescape_url($string);
Modified: perl/modperl/branches/threading/lib/ModPerl/BuildMM.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/lib/ModPerl/BuildMM.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/lib/ModPerl/BuildMM.pm (original)
+++ perl/modperl/branches/threading/lib/ModPerl/BuildMM.pm Sun Jun 29 10:21:27 2008
@@ -360,7 +360,7 @@
$apr_config ||= $build->get_apr_config();
- if ($path =~ m/(Thread|Global)Mutex/) {
+ if ($path =~ m/(Thread|Global)(Mutex|RWLock)/) {
return unless $apr_config->{HAS_THREADS};
}
Modified: perl/modperl/branches/threading/lib/ModPerl/WrapXS.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/lib/ModPerl/WrapXS.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/lib/ModPerl/WrapXS.pm (original)
+++ perl/modperl/branches/threading/lib/ModPerl/WrapXS.pm Sun Jun 29 10:21:27 2008
@@ -596,8 +596,9 @@
}
}
- if ($module eq 'APR::Pool') {
+ if ($module eq 'APR::Pool' && Apache2::Build::PERL_HAS_ITHREADS) {
print $fh " modperl_opt_interp_unselect = APR_RETRIEVE_OPTIONAL_FN(modperl_interp_unselect);\n\n";
+ print $fh " modperl_opt_thx_interp_get = APR_RETRIEVE_OPTIONAL_FN(modperl_thx_interp_get);\n\n";
}
close $fh;
Modified: perl/modperl/branches/threading/lib/mod_perl2.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/lib/mod_perl2.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/lib/mod_perl2.pm (original)
+++ perl/modperl/branches/threading/lib/mod_perl2.pm Sun Jun 29 10:21:27 2008
@@ -20,7 +20,7 @@
use strict;
BEGIN {
- our $VERSION = "2.000004";
+ our $VERSION = "2.000005";
our $VERSION_TRIPLET;
if ($VERSION =~ /(\d+)\.(\d\d\d)(\d+)/) {
Modified: perl/modperl/branches/threading/src/modules/perl/mod_perl.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/mod_perl.c?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/mod_perl.c (original)
+++ perl/modperl/branches/threading/src/modules/perl/mod_perl.c Sun Jun 29 10:21:27 2008
@@ -392,7 +392,7 @@
}
PERL_SET_CONTEXT(perl);
- MP_THX_INTERP_SET(perl, base_scfg->mip->parent);
+ modperl_thx_interp_set(perl, base_scfg->mip->parent);
#endif /* USE_ITHREADS */
@@ -468,7 +468,7 @@
/* after other parent perls were started in vhosts, make sure that
* the context is set to the base_perl */
PERL_SET_CONTEXT(base_perl);
- MP_THX_INTERP_SET(base_perl, base_scfg->mip->parent);
+ modperl_thx_interp_set(base_perl, base_scfg->mip->parent);
#endif
}
@@ -614,6 +614,8 @@
return OK;
}
+ MP_TRACE_i(MP_FUNC, "mod_perl hook init");
+
MP_init_status = 1; /* now starting */
modperl_restart_count_inc(s);
@@ -850,6 +852,7 @@
#ifdef USE_ITHREADS
APR_REGISTER_OPTIONAL_FN(modperl_interp_unselect);
+ APR_REGISTER_OPTIONAL_FN(modperl_thx_interp_get);
#endif
/* for <IfDefine MODPERL2> and Apache2->define("MODPERL2") */
@@ -910,7 +913,7 @@
NULL, NULL, MODPERL_HOOK_REALLY_REALLY_FIRST);
ap_hook_child_init(modperl_hook_child_init,
- NULL, NULL, APR_HOOK_FIRST);
+ NULL, NULL, MODPERL_HOOK_REALLY_REALLY_FIRST);
modperl_register_handler_hooks();
}
Modified: perl/modperl/branches/threading/src/modules/perl/mod_perl.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/mod_perl.h?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/mod_perl.h (original)
+++ perl/modperl/branches/threading/src/modules/perl/mod_perl.h Sun Jun 29 10:21:27 2008
@@ -138,11 +138,6 @@
int modperl_response_handler(request_rec *r);
int modperl_response_handler_cgi(request_rec *r);
-/* betting on Perl*Handlers not using CvXSUBANY
- * mod_perl reuses this field for handler attributes
- */
-#define MP_CODE_ATTRS(cv) (CvXSUBANY((CV*)cv).any_i32)
-
#define MgTypeExt(mg) (mg->mg_type == '~')
typedef void MP_FUNC_NONSTD_T(modperl_var_modify_t) (apr_table_t *,
@@ -153,7 +148,10 @@
/* we need to hook a few internal things before APR_HOOK_REALLY_FIRST */
#define MODPERL_HOOK_REALLY_REALLY_FIRST (-20)
+#ifdef USE_ITHREADS
APR_DECLARE_OPTIONAL_FN(apr_status_t,modperl_interp_unselect,(void *));
+APR_DECLARE_OPTIONAL_FN(modperl_interp_t *,modperl_thx_interp_get,(PerlInterpreter *));
+#endif
/*
* perl context overriding and restoration is required when
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_apache_compat.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_apache_compat.h?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_apache_compat.h (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_apache_compat.h Sun Jun 29 10:21:27 2008
@@ -22,6 +22,7 @@
#if !APR_HAS_THREADS
typedef unsigned long apr_os_thread_t;
typedef void * apr_thread_mutex_t;
+typedef void * apr_thread_rwlock_t;
#endif
/* back compat adjustements for older Apache versions
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_callback.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_callback.c?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_callback.c (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_callback.c Sun Jun 29 10:21:27 2008
@@ -197,7 +197,7 @@
/* Child{Init,Exit}, OpenLogs */
aTHX = scfg->mip->parent->perl;
PERL_SET_CONTEXT(aTHX);
- MP_THX_INTERP_SET(scfg->mip->parent->perl, scfg->mip->parent);
+ modperl_thx_interp_set(scfg->mip->parent->perl, scfg->mip->parent);
}
#endif
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_config.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_config.c?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_config.c (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_config.c Sun Jun 29 10:21:27 2008
@@ -535,7 +535,7 @@
parms.limited = -1;
parms.server = s;
parms.override = override;
- parms.path = path;
+ parms.path = apr_pstrdup(p, path);
parms.pool = p;
#ifdef MP_HTTPD_HAS_OVERRIDE_OPTS
if (override_options == MP_HTTPD_OVERRIDE_OPTS_UNSET) {
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_config.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_config.h?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_config.h (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_config.h Sun Jun 29 10:21:27 2008
@@ -126,16 +126,6 @@
# define MP_dSCFG_dTHX dTHXa(scfg->perl)
#endif
-/* hopefully this macro will not need to be used often */
-#ifdef USE_ITHREADS
-# define MP_dTHX \
- modperl_interp_t *interp = \
- modperl_interp_select(r, r->connection, r->server); \
- dTHXa(interp->perl)
-#else
-# define MP_dTHX dNOOP
-#endif
-
int modperl_config_apply_PerlModule(server_rec *s,
modperl_config_srv_t *scfg,
PerlInterpreter *perl, apr_pool_t *p);
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_interp.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_interp.c?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_interp.c (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_interp.c Sun Jun 29 10:21:27 2008
@@ -298,7 +298,7 @@
interp->ccfg->interp = NULL;
MpInterpIN_USE_Off(interp);
- MP_THX_INTERP_SET(interp->perl, NULL);
+ modperl_thx_interp_set(interp->perl, NULL);
modperl_tipool_putback_data(mip->tipool, data, interp->num_requests);
@@ -378,7 +378,7 @@
/* set context (THX) for this thread */
PERL_SET_CONTEXT(interp->perl);
/* let the perl interpreter point back to its interp */
- MP_THX_INTERP_SET(interp->perl, interp);
+ modperl_thx_interp_set(interp->perl, interp);
return interp;
}
@@ -389,7 +389,7 @@
* is not necessary */
/* PERL_SET_CONTEXT(scfg->mip->parent->perl); */
/* let the perl interpreter point back to its interp */
- MP_THX_INTERP_SET(scfg->mip->parent->perl, scfg->mip->parent);
+ modperl_thx_interp_set(scfg->mip->parent->perl, scfg->mip->parent);
return scfg->mip->parent;
}
@@ -422,7 +422,7 @@
/* XXX: if no VirtualHosts w/ PerlOptions +Parent we can skip this */
PERL_SET_CONTEXT(scfg->mip->parent->perl);
/* let the perl interpreter point back to its interp */
- MP_THX_INTERP_SET(scfg->mip->parent->perl, scfg->mip->parent);
+ modperl_thx_interp_set(scfg->mip->parent->perl, scfg->mip->parent);
return scfg->mip->parent;
}
@@ -437,7 +437,7 @@
(unsigned long)ccfg->interp, ccfg->interp->refcnt);
/* set context (THX) for this thread */
PERL_SET_CONTEXT(ccfg->interp->perl);
- /* MP_THX_INTERP_SET is not called here because the interp
+ /* modperl_thx_interp_set is not called here because the interp
* already belongs to the perl interpreter
*/
return ccfg->interp;
@@ -450,7 +450,7 @@
/* set context (THX) for this thread */
PERL_SET_CONTEXT(interp->perl);
/* let the perl interpreter point back to its interp */
- MP_THX_INTERP_SET(interp->perl, interp);
+ modperl_thx_interp_set(interp->perl, interp);
/* make sure ccfg is initialized */
modperl_config_con_init(c, ccfg);
@@ -585,6 +585,24 @@
}
}
+#define MP_THX_INTERP_KEY "modperl2::thx_interp_key"
+modperl_interp_t *modperl_thx_interp_get(PerlInterpreter *thx)
+{
+ modperl_interp_t *interp;
+ dTHXa(thx);
+ SV **svp = hv_fetch(PL_modglobal, MP_THX_INTERP_KEY, strlen(MP_THX_INTERP_KEY), 0);
+ if (!svp) return NULL;
+ interp = INT2PTR(modperl_interp_t *, SvIV(*svp));
+ return interp;
+}
+
+void modperl_thx_interp_set(PerlInterpreter *thx, modperl_interp_t *interp)
+{
+ dTHXa(thx);
+ (void)hv_store(PL_modglobal, MP_THX_INTERP_KEY, strlen(MP_THX_INTERP_KEY), newSViv(PTR2IV(interp)), 0);
+ return;
+}
+
#else
void modperl_interp_init(server_rec *s, apr_pool_t *p,
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_interp.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_interp.h?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_interp.h (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_interp.h Sun Jun 29 10:21:27 2008
@@ -24,42 +24,8 @@
#ifdef USE_ITHREADS
-/*
- * HvPMROOT will never be used by Perl with PL_modglobal.
- * so we have stolen it as a quick way to stash the interp
- * pointer.
- *
- * However in 5.9.3 HvPMROOT was completely removed, so we have moved
- * to use another struct member that's hopefully won't be used by
- * anybody else. But if we can find a better place to store the
- * pointer to the current mod_perl interpreter object it'd be a much
- * cleaner solution. of course it must be really fast.
- */
-#ifndef HvPMROOT
-# if MP_PERL_VERSION_AT_LEAST(5, 9, 5)
-#define MP_THX_INTERP_GET(thx) \
- (modperl_interp_t *) ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_u.xmg_magic
-# else
-#define MP_THX_INTERP_GET(thx) \
- (modperl_interp_t *) ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_magic
-# endif
-#else
-#define MP_THX_INTERP_GET(thx) \
- (modperl_interp_t *)HvPMROOT(*Perl_Imodglobal_ptr(thx))
-#endif
-
-#ifndef HvPMROOT
-# if MP_PERL_VERSION_AT_LEAST(5, 9, 5)
-#define MP_THX_INTERP_SET(thx, interp) \
- ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_u.xmg_magic = (MAGIC*)interp
-# else
-#define MP_THX_INTERP_SET(thx, interp) \
- ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_magic = (MAGIC*)interp
-# endif
-#else
-#define MP_THX_INTERP_SET(thx, interp) \
- HvPMROOT(*Perl_Imodglobal_ptr(thx)) = (PMOP*)interp
-#endif
+modperl_interp_t *modperl_thx_interp_get(PerlInterpreter *thx);
+void modperl_thx_interp_set(PerlInterpreter *thx, modperl_interp_t *interp);
const char *modperl_interp_scope_desc(modperl_interp_scope_e scope);
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_mgv.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_mgv.c?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_mgv.c (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_mgv.c Sun Jun 29 10:21:27 2008
@@ -269,7 +269,7 @@
}
else {
if ((cv = get_cv(name, FALSE))) {
- handler->attrs = (U32)MP_CODE_ATTRS(cv);
+ handler->attrs = *modperl_code_attrs(aTHX_ cv);
handler->mgv_cv =
modperl_mgv_compile(aTHX_ p, HvNAME(GvSTASH(CvGV(cv))));
modperl_mgv_append(aTHX_ p, handler->mgv_cv, GvNAME(CvGV(cv)));
@@ -332,7 +332,7 @@
modperl_mgv_new_name(handler->mgv_obj, p, name);
}
- handler->attrs = (U32)MP_CODE_ATTRS(cv);
+ handler->attrs = *modperl_code_attrs(aTHX_ cv);
/* note: this is the real function after @ISA lookup */
handler->mgv_cv = modperl_mgv_compile(aTHX_ p, HvNAME(GvSTASH(gv)));
modperl_mgv_append(aTHX_ p, handler->mgv_cv, handler_name);
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_perl_includes.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_perl_includes.h?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_perl_includes.h (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_perl_includes.h Sun Jun 29 10:21:27 2008
@@ -53,7 +53,6 @@
# define uid_t perl_uid_t
# define gid_t perl_gid_t
# ifdef exit
-# define perl_exit exit
# undef exit
# endif
#endif
@@ -68,11 +67,9 @@
#if defined(WIN32) && defined(USE_LARGE_FILES)
# ifdef malloc
-# define perl_malloc malloc
# undef malloc
# endif
# ifdef free
-# define perl_free free
# undef free
# endif
#endif
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_svptr_table.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_svptr_table.c?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_svptr_table.c (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_svptr_table.c Sun Jun 29 10:21:27 2008
@@ -56,7 +56,7 @@
Newz(0, tbl, 1, PTR_TBL_t);
tbl->tbl_max = source->tbl_max;
- tbl->tbl_items = source->tbl_items;
+ tbl->tbl_items = source->tbl_items;
Newz(0, tbl->tbl_ary, tbl->tbl_max + 1, PTR_TBL_ENT_t *);
dst_ary = tbl->tbl_ary;
@@ -169,7 +169,7 @@
PTR_TBL_t *tbl;
Newz(0, tbl, 1, PTR_TBL_t);
tbl->tbl_max = 511;
- tbl->tbl_items = 0;
+ tbl->tbl_items = 0;
Newz(0, tbl->tbl_ary, tbl->tbl_max + 1, PTR_TBL_ENT_t*);
return tbl;
}
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_types.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_types.h?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_types.h (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_types.h Sun Jun 29 10:21:27 2008
@@ -196,7 +196,7 @@
const char *name;
CV *cv;
U8 flags;
- U32 attrs;
+ U16 attrs;
modperl_handler_t *next;
};
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_util.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_util.c?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_util.c (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_util.c Sun Jun 29 10:21:27 2008
@@ -864,7 +864,7 @@
if (!pnotes->pnotes) {
pnotes->pool = pool;
#ifdef USE_ITHREADS
- pnotes->interp = MP_THX_INTERP_GET(aTHX);
+ pnotes->interp = modperl_thx_interp_get(aTHX);
pnotes->interp->refcnt++;
MP_TRACE_i(MP_FUNC, "TO: (0x%lx)->refcnt incremented to %ld",
pnotes->interp, pnotes->interp->refcnt);
@@ -891,6 +891,17 @@
return newRV_inc((SV *)pnotes->pnotes);
}
+U16 *modperl_code_attrs(pTHX_ CV *cv) {
+ MAGIC *mg;
+
+ if (!SvMAGICAL(cv)) {
+ sv_magic((SV*)cv, Nullsv, PERL_MAGIC_ext, NULL, -1);
+ }
+
+ mg = mg_find((SV*)cv, PERL_MAGIC_ext);
+ return &(mg->mg_private);
+}
+
/*
* Local Variables:
* c-basic-offset: 4
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_util.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_util.h?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_util.h (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_util.h Sun Jun 29 10:21:27 2008
@@ -102,7 +102,7 @@
SV *avrv);
void modperl_package_unload(pTHX_ const char *package);
#if defined(MP_TRACE) && defined(USE_ITHREADS)
-#define MP_TRACEf_PERLID "perl id 0x%lx"
+#define MP_TRACEf_PERLID "/perl id 0x%lx"
#define MP_TRACEv_PERLID (unsigned long)my_perl
#define MP_TRACEv_PERLID_ MP_TRACEv_PERLID,
#define MP_TRACEv__PERLID ,MP_TRACEv_PERLID
@@ -139,6 +139,8 @@
SV *modperl_pnotes(pTHX_ modperl_pnotes_t *pnotes, SV *key, SV *val,
apr_pool_t *pool );
+U16 *modperl_code_attrs(pTHX_ CV *cv);
+
#endif /* MODPERL_UTIL_H */
/*
Modified: perl/modperl/branches/threading/t/apr/pool_lifetime.t
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/apr/pool_lifetime.t?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/apr/pool_lifetime.t (original)
+++ perl/modperl/branches/threading/t/apr/pool_lifetime.t Sun Jun 29 10:21:27 2008
@@ -5,26 +5,20 @@
use Apache::Test;
use Apache::TestUtil;
use Apache::TestRequest;
-use TestCommon::SameInterp;
+Apache::TestRequest::user_agent(keep_alive => 1);
plan tests => 2, need 'HTML::HeadParser';
my $module = 'TestAPR::pool_lifetime';
my $location = '/' . Apache::TestRequest::module2path($module);
-t_debug "getting the same interp ID for $location";
-my $same_interp = Apache::TestRequest::same_interp_tie($location);
-
-my $skip = $same_interp ? 0 : 1;
-
for (1..2) {
my $expected = "Pong";
- my $received = same_interp_req_body($same_interp, \&GET, $location);
- $skip++ unless defined $received;
- same_interp_skip_not_found(
- $skip,
+ my $received = GET $location;
+
+ ok t_cmp(
+ $received->content,
$expected,
- $received,
- "Pong"
+ "Pong",
);
}
Modified: perl/modperl/branches/threading/t/hooks/TestHooks/inlined_handlers.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/hooks/TestHooks/inlined_handlers.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/hooks/TestHooks/inlined_handlers.pm (original)
+++ perl/modperl/branches/threading/t/hooks/TestHooks/inlined_handlers.pm Sun Jun 29 10:21:27 2008
@@ -6,10 +6,6 @@
# previously there was a bug in non-ithreaded-perl implementation
# where the cached compiled CODE ref didn't have the reference count
# right.
-#
-# this test needs to run via the same_interpr framework, since it must
-# test that the same perl interprter/process gets to run the same
-# inlined handler
use strict;
use warnings FATAL => 'all';
@@ -31,7 +27,6 @@
<NoAutoConfig>
<Location /TestHooks__inlined_handlers>
SetHandler modperl
- PerlInitHandler Apache::TestHandler::same_interp_fixup
PerlFixupHandler 'sub { use Apache2::Const qw(DECLINED); DECLINED }'
PerlResponseHandler TestHooks::inlined_handlers
</Location>
Modified: perl/modperl/branches/threading/t/hooks/inlined_handlers.t
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/hooks/inlined_handlers.t?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/hooks/inlined_handlers.t (original)
+++ perl/modperl/branches/threading/t/hooks/inlined_handlers.t Sun Jun 29 10:21:27 2008
@@ -11,19 +11,14 @@
my $location = "/TestHooks__inlined_handlers";
-t_debug "getting the same interp ID for $location";
-my $same_interp = Apache::TestRequest::same_interp_tie($location);
-
-my $skip = $same_interp ? 0 : 1;
my $expected = "ok";
for (1..2) {
- my $received = same_interp_req_body($same_interp, \&GET, $location);
- $skip++ unless defined $received;
- same_interp_skip_not_found(
- $skip,
- $received,
+ my $received = GET $location;
+
+ ok t_cmp(
+ $received->content,
$expected,
- "anonymous handlers in httpd.conf test"
+ "anonymous handlers in httpd.conf test",
);
}
Modified: perl/modperl/branches/threading/t/modperl/cookie.t
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/modperl/cookie.t?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/modperl/cookie.t (original)
+++ perl/modperl/branches/threading/t/modperl/cookie.t Sun Jun 29 10:21:27 2008
@@ -20,8 +20,7 @@
use Apache::Test;
use Apache::TestUtil;
use Apache::TestRequest;
-
-use TestCommon::SameInterp;
+Apache::TestRequest::user_agent(keep_alive => 1);
plan tests => 3, need 'HTML::HeadParser';
@@ -42,21 +41,17 @@
my @tests_ordered = qw(header env nocookie);
-t_debug "getting the same interp ID for $location";
-my $same_interp = Apache::TestRequest::same_interp_tie($location);
+GET $location;
-my $skip = $same_interp ? 0 : 1;
for my $test (@tests_ordered) {
my $expected = $test eq 'nocookie' ? '' : "bar";
my @headers = ();
push @headers, (Cookie => $cookies{$test}) unless $test eq 'nocookie';
- my $received = same_interp_req_body($same_interp, \&GET,
- "$location?$test", @headers);
- $skip++ unless defined $received;
- same_interp_skip_not_found(
- $skip,
- $received,
+ my $received = GET "$location?$test", @headers;
+
+ ok t_cmp(
+ $received->content,
$expected,
"perl-script+SetupEnv/cookie: $test"
);
Modified: perl/modperl/branches/threading/t/modperl/cookie2.t
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/modperl/cookie2.t?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/modperl/cookie2.t (original)
+++ perl/modperl/branches/threading/t/modperl/cookie2.t Sun Jun 29 10:21:27 2008
@@ -15,7 +15,7 @@
use Apache::Test;
use Apache::TestUtil;
use Apache::TestRequest;
-use TestCommon::SameInterp;
+Apache::TestRequest::user_agent(keep_alive => 1);
plan tests => 3, need 'HTML::HeadParser';
@@ -31,21 +31,14 @@
my @tests_ordered = qw(header subprocess_env env);
-t_debug "getting the same interp ID for $location";
-my $same_interp = Apache::TestRequest::same_interp_tie($location);
-
-my $skip = $same_interp ? 0 : 1;
for my $test (@tests_ordered) {
my $cookie = "key=$test";
- my $received = same_interp_req_body($same_interp, \&GET,
- "$location?$test",
- Cookie => $cookie);
- $skip++ unless defined $received;
- same_interp_skip_not_found(
- $skip,
- $received,
+ my $received = GET "$location?$test", Cookie => $cookie;
+
+ ok t_cmp(
+ $received->content,
$expected{$test},
- "perl-script+SetupEnv/cookie: $test"
+ "perl-script+SetupEnv/cookie: $test",
);
}
Modified: perl/modperl/branches/threading/t/modperl/request_rec_perlio_api.t
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/modperl/request_rec_perlio_api.t?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/modperl/request_rec_perlio_api.t (original)
+++ perl/modperl/branches/threading/t/modperl/request_rec_perlio_api.t Sun Jun 29 10:21:27 2008
@@ -15,9 +15,13 @@
{
+ # t/response/TestModperl/request_rec_perlio_api.pm reads the first few
+ # bytes from the .pm file itself. If these are changed remember to change
+ # the expected bytes here as well.
my $content = join "", 'a'..'j', 'k'..'t';
my $location = "$uri?STDIN";
- my $expected = join "", 'a'..'j', "# please", 'k'..'t';
+ my $expected = join("", 'a'..'j',
+ "# please insert nothing before this line", 'k'..'t');
my $received = POST_BODY_ASSERT $location, content => $content;
ok t_cmp($received, $expected, "STDIN tests");
}
Modified: perl/modperl/branches/threading/t/modules/apache_status.t
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/modules/apache_status.t?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/modules/apache_status.t (original)
+++ perl/modperl/branches/threading/t/modules/apache_status.t Sun Jun 29 10:21:27 2008
@@ -19,13 +19,9 @@
{
my $url = "$base_url";
my $body = GET_BODY_ASSERT $url;
- (my $pver = $]) =~ s/00//;
- $pver =~ s/(\d\.\d)(.*)/"$1." . ($2 ? int($2) : 0)/e;
- #t_debug $body;
- t_debug $pver;
- # expecting: Embedded Perl version v5.8.2 for ...
- ok $body =~ /$pver/;
-
+ # expecting: Embedded Perl version <b>v5.8.2</b> for ...
+ my $pver = $^V ? sprintf "v%vd", $^V : $];
+ ok t_cmp($body, qr[Embedded Perl version <b>$pver</b> for]);
# menu_item, part 1
# expecting: Test Entry
ok $body =~ /Test Menu Entry/;
Modified: perl/modperl/branches/threading/t/perl/ithreads3.t
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/perl/ithreads3.t?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/perl/ithreads3.t (original)
+++ perl/modperl/branches/threading/t/perl/ithreads3.t Sun Jun 29 10:21:27 2008
@@ -6,7 +6,7 @@
use Apache::TestUtil;
use Apache::TestRequest 'GET_BODY';
-plan tests => 6, need_apache_mpm('worker') && need_perl('ithreads');
+plan tests => 20, need_apache_mpm('worker') && need_perl('ithreads') && need_lwp;
my $module = 'TestPerl::ithreads3';
@@ -25,12 +25,54 @@
return $rc;
}
+Apache::TestRequest::user_agent(reset => 1, keep_alive=>1);
+
t_debug("connecting to ".u(''));
-ok t_cmp t('/perl-script?1'), 2, 'perl-script 1';
-ok t_cmp t('/modperl?1'), 2, 'modperl 1';
-ok t_cmp t('/perl-script?2'), 5, 'perl-script 2';
-ok t_cmp t('/modperl?2'), 5, 'modperl 2';
+my ($t, $descr);
-ok t_cmp t('/perl-script?3'), 3, 'perl-script 3';
-ok t_cmp t('/modperl?3'), 3, 'modperl 3';
+$t=1;
+$descr='each phase new interp';
+ok t_cmp t('/perl-script/?'.$t), '1,1,1,1,1', 'perl-script: '.$descr;
+ok t_cmp t('/modperl/?'.$t), '1,1,1,1,1', 'modperl: '.$descr;
+ok t_cmp t('/refcnt/?'.$t), '0,0,0,0,1', 'refcnt: '.$descr;
+
+$t=2;
+$descr='interp locked by $r->pnotes';
+ok t_cmp t('/perl-script/?'.$t), '1,2,3,4,5', 'perl-script: '.$descr;
+ok t_cmp t('/cleanupnote/?0'), 'PerlResponseHandler', 'cleanupnote: '.$descr;
+ok t_cmp t('/modperl/?'.$t), '1,2,3,4,5', 'modperl: '.$descr;
+ok t_cmp t('/refcnt/?'.$t), '0,1,1,1,2', 'refcnt: '.$descr;
+
+$t=3;
+$descr='interp locked from trans to fixup';
+ok t_cmp t('/perl-script/?'.$t), '1,2,3,4,1', 'perl-script: '.$descr;
+ok t_cmp t('/cleanupnote/?0'), 'PerlFixupHandler', 'cleanupnote: '.$descr;
+ok t_cmp t('/modperl/?'.$t), '1,2,3,4,1', 'modperl: '.$descr;
+ok t_cmp t('/refcnt/?'.$t), '0,1,1,1,1', 'refcnt: '.$descr;
+
+$t=4;
+$descr='interp locked by $r->connection->pnotes';
+ok t_cmp t('/perl-script/?'.$t), '1,2,3,4,5', 'perl-script: '.$descr;
+ok t_cmp t('/modperl/?'.$t), '1,2,3,4,5', 'modperl: '.$descr;
+ok t_cmp t('/refcnt/?'.$t), '1,1,1,1,2', 'refcnt: '.$descr;
+
+Apache::TestRequest::user_agent(reset => 1, keep_alive=>1);
+
+$t=4;
+t('/refcnt/?'.$t);
+$t=5;
+$descr='interp locked by $r->connection->pnotes 2nd call';
+ok t_cmp t('/perl-script/?'.$t), '1,2,3,4,5,6,7,8,9,10,11', 'perl-script: '.$descr;
+ok t_cmp t('/modperl/?'.$t), '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16', 'modperl: '.$descr;
+ok t_cmp t('/refcnt/?'.$t), '0,1,1,1,2,2,1,1,1,1,2,1,1,1,1,2,1,1,1,1,2', 'refcnt: '.$descr;
+
+Apache::TestRequest::user_agent(reset => 1, keep_alive=>1);
+
+$t=4;
+t('/refcnt/?'.$t);
+$t=6;
+$descr='interp unlocked after 2nd call';
+ok t_cmp t('/modperl/?'.$t), '1,2,3,4,5,6,7,8,1,1,1', 'modperl: '.$descr;
+ok t_cmp t('/refcnt/?'.$t), '0,1,1,1,2,2,1,1,0,0,1,1,0,1,0,0,1', 'refcnt: '.$descr;
+ok t_cmp t('/cleanupnote/?0'), 'PerlMapToStorageHandler', 'cleanupnote: '.$descr;
Modified: perl/modperl/branches/threading/t/response/TestAPI/add_config.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/response/TestAPI/add_config.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/response/TestAPI/add_config.pm (original)
+++ perl/modperl/branches/threading/t/response/TestAPI/add_config.pm Sun Jun 29 10:21:27 2008
@@ -59,6 +59,14 @@
};
$r->pnotes(followsymlinks => "$@");
+ eval {
+ my $path="/a/path/to/somewhere";
+ $r->add_config(['PerlResponseHandler '.__PACKAGE__], -1, $path);
+ # now overwrite the path in place to see if the location pointer
+ # is really copied: see modperl_config_dir_create
+ $path=~tr[a-z][n-za-m];
+ };
+
return Apache2::Const::DECLINED;
}
@@ -83,7 +91,7 @@
my ($self, $r) = @_;
my $cf = $self->get_config($r->server);
- plan $r, tests => 8;
+ plan $r, tests => 9;
ok t_cmp $r->pnotes('add_config1'), qr/.+\n/;
ok t_cmp $r->pnotes('add_config2'), (APACHE22 ? qr/.+\n/ : '');
@@ -103,6 +111,8 @@
my $opts = APACHE22 ? Apache2::Const::OPT_SYM_LINKS : $expect;
ok t_cmp $r->allow_override_opts, $opts;
+ ok t_cmp $r->location, '/a/path/to/somewhere';
+
return Apache2::Const::OK;
}
@@ -118,7 +128,6 @@
<Directory @DocumentRoot@>
AllowOverride All
</Directory>
- PerlResponseHandler TestAPI::add_config
PerlMapToStorageHandler TestAPI::add_config::map2storage
PerlFixupHandler TestAPI::add_config::fixup
</VirtualHost>
Modified: perl/modperl/branches/threading/t/response/TestAPR/pool_lifetime.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/response/TestAPR/pool_lifetime.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/response/TestAPR/pool_lifetime.pm (original)
+++ perl/modperl/branches/threading/t/response/TestAPR/pool_lifetime.pm Sun Jun 29 10:21:27 2008
@@ -24,5 +24,3 @@
}
1;
-__END__
-PerlFixupHandler Apache::TestHandler::same_interp_fixup
Modified: perl/modperl/branches/threading/t/response/TestModperl/cookie.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/response/TestModperl/cookie.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/response/TestModperl/cookie.pm (original)
+++ perl/modperl/branches/threading/t/response/TestModperl/cookie.pm Sun Jun 29 10:21:27 2008
@@ -49,7 +49,6 @@
__DATA__
SetHandler perl-script
PerlModule TestModperl::cookie
-PerlInitHandler Apache::TestHandler::same_interp_fixup
PerlAccessHandler TestModperl::cookie::access
PerlResponseHandler TestModperl::cookie
PerlOptions -SetupEnv
Modified: perl/modperl/branches/threading/t/response/TestModperl/cookie2.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/response/TestModperl/cookie2.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/response/TestModperl/cookie2.pm (original)
+++ perl/modperl/branches/threading/t/response/TestModperl/cookie2.pm Sun Jun 29 10:21:27 2008
@@ -45,6 +45,5 @@
__DATA__
SetHandler modperl
PerlModule TestModperl::cookie2
-PerlInitHandler Apache::TestHandler::same_interp_fixup
PerlAccessHandler TestModperl::cookie2::access
PerlResponseHandler TestModperl::cookie2
Modified: perl/modperl/branches/threading/t/response/TestModperl/request_rec_perlio_api.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/response/TestModperl/request_rec_perlio_api.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/response/TestModperl/request_rec_perlio_api.pm (original)
+++ perl/modperl/branches/threading/t/response/TestModperl/request_rec_perlio_api.pm Sun Jun 29 10:21:27 2008
@@ -39,10 +39,13 @@
# lose any chars when we restore it to the POST stream
open my $stdin, "<&STDIN" or die "Can't dup STDIN: $!";
+ # this module reads the first few bytes from its .pm file. If these
+ # are changed remember to change the expected bytes in
+ # t/modperl/request_rec_perlio_api.t as well.
open STDIN, "<", __FILE__
or die "failed to open STDIN as 'in memory' file : $!";
my $data;
- read STDIN, $data, length("# please");
+ read STDIN, $data, length("# please insert nothing before this line");
print STDOUT $data;
close STDIN;
Modified: perl/modperl/branches/threading/t/response/TestPerl/ithreads3.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/response/TestPerl/ithreads3.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/t/response/TestPerl/ithreads3.pm (original)
+++ perl/modperl/branches/threading/t/response/TestPerl/ithreads3.pm Sun Jun 29 10:21:27 2008
@@ -4,72 +4,174 @@
use strict;
use warnings FATAL => 'all';
-use Apache2::RequestRec;
-use Apache2::RequestIO;
-use Apache2::RequestUtil;
-use APR::Pool;
+use Apache2::RequestRec ();
+use Apache2::RequestIO ();
+use Apache2::RequestUtil ();
+use Apache2::Connection ();
+use Apache2::ConnectionUtil ();
+use APR::Pool ();
+use ModPerl::Interpreter ();
+use ModPerl::Util ();
+use APR::Table ();
use Apache2::Const -compile => 'OK', 'DECLINED';
-# XXX: These tests rely on the assumption that the virtual host is not
-# otherwise accessed. In this case the same interpreter is chosen
-# for each phase. The $counter counts them.
-# Of course if only 1 interp is configured it must be hit each time.
+{
+ package TestPerl::ithreads3::x;
+ use strict;
+ use warnings FATAL => 'all';
-my $counter=0;
+ sub new {shift;bless [@_];}
+ sub DESTROY {my $f=shift @{$_[0]}; $f->(@{$_[0]});}
+}
+
+sub init {
+ my $r=shift;
+
+ return Apache2::Const::DECLINED unless( $r->is_initial_req );
+
+ my $interp=ModPerl::Interpreter::current;
+ $r->connection->notes->{interp}=join(':', $$interp, $interp->num_requests);
+ $r->connection->notes->{refcnt}=$interp->refcnt;
+
+ return Apache2::Const::DECLINED;
+}
+
+sub add {
+ my $r=shift;
+
+ return Apache2::Const::DECLINED unless( $r->is_initial_req );
+
+ my $interp=ModPerl::Interpreter::current;
+ $r->connection->notes->{interp}.=','.join(':', $$interp, $interp->num_requests);
+ $r->connection->notes->{refcnt}.=','.$interp->refcnt;
+
+ return Apache2::Const::DECLINED;
+}
+
+sub unlock1 {
+ my $r=shift;
+
+ return Apache2::Const::DECLINED unless( $r->is_initial_req );
+
+ $r->pnotes_kill;
+
+ return Apache2::Const::DECLINED;
+}
+
+sub unlock2 {
+ my $r=shift;
+
+ return Apache2::Const::DECLINED unless( $r->is_initial_req );
+
+ $r->connection->pnotes_kill;
+
+ return Apache2::Const::DECLINED;
+}
sub response {
- my $r=shift;
- $r->content_type('text/plain');
- $r->print($counter);
- return Apache2::Const::OK;
+ my $r=shift;
+
+ add($r);
+
+ my %interp;
+ my @rc;
+ foreach my $i (split /,/, $r->connection->notes->{interp}) {
+ $interp{$i}++;
+ push @rc, $interp{$i};
+ }
+
+ $r->content_type('text/plain');
+ $r->print(join(',', @rc));
+ return Apache2::Const::OK;
}
-sub count { $counter++; return Apache2::Const::DECLINED; }
+sub refcnt {
+ my $r=shift;
+
+ add($r);
-sub clear_pool {
- delete $_[0]->pnotes->{my_pool};
- return Apache2::Const::DECLINED;
+ $r->content_type('text/plain');
+ $r->print($r->connection->notes->{refcnt});
+ return Apache2::Const::OK;
+}
+
+sub cleanupnote {
+ my $r=shift;
+
+ $r->content_type('text/plain');
+ $r->print($r->connection->notes->{cleanup});
+ delete $r->connection->notes->{cleanup};
+ return Apache2::Const::OK;
}
sub trans {
- my $r=shift;
- my $test=$r->args;
- $counter=0;
- if( $test eq '1' ) {
- # this is to check for a bug in modperl_response_handler versus
- # modperl_response_handler_cgi. The former used to allocate an
- # extra interpreter for its work. In both cases $counter should be
- # 2 in the response phase
- $r->push_handlers( PerlMapToStorageHandler=>__PACKAGE__.'::count' );
- $r->push_handlers( PerlFixupHandler=>__PACKAGE__.'::count' );
- }
- elsif( $test eq '2' ) {
- # now add an extra PerlCleanupHandler. It is run each time the
- # interp is released. So it is run after Trans, MapToStorage and
- # Fixup. In the response phase $counter should be 5. After Response
- # it is run again but that is after.
- # This used to eat up all interpreters because modperl_interp_unselect
- # calls modperl_config_request_cleanup that allocates a new interp
- # to handle the cleanup. When this interp is then unselected
- # modperl_interp_unselect gets called again but the cleanup handler is
- # still installed. So the cycle starts again until all interpreters
- # are in use or the stack runs out. Then the thread is locked infinitely
- # or a segfault appears.
- $r->push_handlers( PerlMapToStorageHandler=>__PACKAGE__.'::count' );
- $r->push_handlers( PerlFixupHandler=>__PACKAGE__.'::count' );
- $r->push_handlers( PerlCleanupHandler=>__PACKAGE__.'::count' );
- }
- elsif( $test eq '3' ) {
- # a subpool adds an extra reference to the interp. So it is preserved
- # and bound to the request until the pool is destroyed. So the cleanup
- # handler is run only once after Fixup. Hence the counter is 3.
- $r->push_handlers( PerlMapToStorageHandler=>__PACKAGE__.'::count' );
- $r->push_handlers( PerlFixupHandler=>__PACKAGE__.'::count' );
- $r->push_handlers( PerlCleanupHandler=>__PACKAGE__.'::count' );
- $r->pnotes->{my_pool}=$r->pool->new;
- $r->push_handlers( PerlFixupHandler=>__PACKAGE__.'::clear_pool' );
- }
- return Apache2::Const::DECLINED;
+ my $r=shift;
+
+ my $test=$r->args;
+ if( !defined $test or $test eq '0' ) {
+ } elsif( $test eq '1' ) {
+ init($r);
+
+ $r->push_handlers( PerlMapToStorageHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlHeaderParserHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlFixupHandler=>__PACKAGE__.'::add' );
+ } elsif( $test eq '2' ) {
+ init($r);
+
+ # XXX: current_callback returns "PerlResponseHandler" here
+ # because it is the last phase in the request cycle that has
+ # a perl handler installed. "current_callback" is set only in
+ # modperl_callback_run_handler()
+ $r->pnotes->{lock}=TestPerl::ithreads3::x->new
+ (sub{$_[0]->notes->{cleanup}=ModPerl::Util::current_callback},
+ $r->connection);
+
+ $r->push_handlers( PerlMapToStorageHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlHeaderParserHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlFixupHandler=>__PACKAGE__.'::add' );
+ } elsif( $test eq '3' ) {
+ init($r);
+
+ # XXX: current_callback returns "PerlFixupHandler" here
+ # because pnotes are killed in the fixup handler unlock1()
+ $r->pnotes->{lock}=TestPerl::ithreads3::x->new
+ (sub{$_[0]->notes->{cleanup}=ModPerl::Util::current_callback},
+ $r->connection);
+
+ $r->push_handlers( PerlMapToStorageHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlHeaderParserHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlFixupHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlFixupHandler=>__PACKAGE__.'::unlock1' );
+ } elsif( $test eq '4' ) {
+ init($r);
+
+ $r->connection->pnotes->{lock}=1;
+
+ $r->push_handlers( PerlMapToStorageHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlHeaderParserHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlFixupHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlCleanupHandler=>__PACKAGE__.'::add' );
+ } elsif( $test eq '5' ) {
+ add($r);
+
+ $r->push_handlers( PerlMapToStorageHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlHeaderParserHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlFixupHandler=>__PACKAGE__.'::add' );
+ } elsif( $test eq '6' ) {
+ add($r);
+
+ $r->push_handlers( PerlMapToStorageHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlMapToStorageHandler=>__PACKAGE__.'::unlock2' );
+
+ $r->connection->pnotes->{lock}=TestPerl::ithreads3::x->new
+ (sub{$_[0]->notes->{cleanup}=ModPerl::Util::current_callback},
+ $r->connection);
+
+ $r->push_handlers( PerlHeaderParserHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlFixupHandler=>__PACKAGE__.'::add' );
+ $r->push_handlers( PerlCleanupHandler=>__PACKAGE__.'::add' );
+ }
+ return Apache2::Const::DECLINED;
}
1;
@@ -93,6 +195,19 @@
PerlSwitches -I@serverroot@
PerlRequire "conf/modperl_inc.pl"
PerlModule TestPerl::ithreads3
+ KeepAlive On
+ KeepAliveTimeout 300
+ MaxKeepAliveRequests 500
+
+ <Location /refcnt>
+ SetHandler modperl
+ PerlResponseHandler TestPerl::ithreads3::refcnt
+ </Location>
+
+ <Location /cleanupnote>
+ SetHandler modperl
+ PerlResponseHandler TestPerl::ithreads3::cleanupnote
+ </Location>
<Location /modperl>
SetHandler modperl
Modified: perl/modperl/branches/threading/xs/APR/Pool/APR__Pool.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/xs/APR/Pool/APR__Pool.h?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/xs/APR/Pool/APR__Pool.h (original)
+++ perl/modperl/branches/threading/xs/APR/Pool/APR__Pool.h Sun Jun 29 10:21:27 2008
@@ -39,9 +39,11 @@
*/
#ifndef MP_SOURCE_SCAN
+#ifdef USE_ITHREADS
#include "apr_optional.h"
-static
APR_OPTIONAL_FN_TYPE(modperl_interp_unselect) *modperl_opt_interp_unselect;
+APR_OPTIONAL_FN_TYPE(modperl_thx_interp_get) *modperl_opt_thx_interp_get;
+#endif
#endif
#define MP_APR_POOL_SV_HAS_OWNERSHIP(sv) mpxs_pool_is_custom(sv)
@@ -97,10 +99,12 @@
/* make sure interpreter is not putback into the mip \
* until this cleanup has run. \
*/ \
- if ((acct->interp = MP_THX_INTERP_GET(aTHX))) { \
- acct->interp->refcnt++; \
- MP_TRACE_i(MP_FUNC, "TO: (0x%lx)->refcnt incremented to %ld", \
- acct->interp, acct->interp->refcnt); \
+ if (modperl_opt_thx_interp_get) { \
+ if ((acct->interp = modperl_opt_thx_interp_get(aTHX))) { \
+ acct->interp->refcnt++; \
+ MP_TRACE_i(MP_FUNC, "TO: (0x%lx)->refcnt incr to %ld", \
+ acct->interp, acct->interp->refcnt); \
+ } \
} \
} STMT_END
@@ -340,10 +344,12 @@
/* make sure interpreter is not putback into the mip
* until this cleanup has run.
*/
- if ((data->interp = MP_THX_INTERP_GET(data->perl))) {
- data->interp->refcnt++;
- MP_TRACE_i(MP_FUNC, "(0x%lx)->refcnt incremented to %ld",
- data->interp, data->interp->refcnt);
+ if (modperl_opt_thx_interp_get) {
+ if ((data->interp = modperl_opt_thx_interp_get(data->perl))) {
+ data->interp->refcnt++;
+ MP_TRACE_i(MP_FUNC, "(0x%lx)->refcnt incr to %ld",
+ data->interp, data->interp->refcnt);
+ }
}
#endif
Modified: perl/modperl/branches/threading/xs/Apache2/Filter/Apache2__Filter.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/xs/Apache2/Filter/Apache2__Filter.h?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/xs/Apache2/Filter/Apache2__Filter.h (original)
+++ perl/modperl/branches/threading/xs/Apache2/Filter/Apache2__Filter.h Sun Jun 29 10:21:27 2008
@@ -86,9 +86,9 @@
return len;
}
-static MP_INLINE U32 *modperl_filter_attributes(SV *package, SV *cvrv)
+static MP_INLINE U16 *modperl_filter_attributes(pTHX_ SV *package, SV *cvrv)
{
- return (U32 *)&MP_CODE_ATTRS(SvRV(cvrv));
+ return modperl_code_attrs(aTHX_ (CV*)SvRV(cvrv));
}
#ifdef MP_TRACE
@@ -118,7 +118,7 @@
MP_STATIC XS(MPXS_modperl_filter_attributes)
{
dXSARGS;
- U32 *attrs = modperl_filter_attributes(ST(0), ST(1));
+ U16 *attrs = modperl_filter_attributes(aTHX_ ST(0), ST(1));
I32 i;
#ifdef MP_TRACE
HV *stash = gv_stashsv(ST(0), TRUE);
Modified: perl/modperl/branches/threading/xs/Apache2/SubRequest/Apache2__SubRequest.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/xs/Apache2/SubRequest/Apache2__SubRequest.h?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/xs/Apache2/SubRequest/Apache2__SubRequest.h (original)
+++ perl/modperl/branches/threading/xs/Apache2/SubRequest/Apache2__SubRequest.h Sun Jun 29 10:21:27 2008
@@ -23,8 +23,10 @@
if (r->main) {
modperl_config_req_t *rcfg = modperl_config_req_get(r->main);
- MP_RUN_CROAK(modperl_wbucket_flush(rcfg->wbucket, FALSE),
- "Apache2::SubRequest::run");
+ if (rcfg->wbucket) {
+ MP_RUN_CROAK(modperl_wbucket_flush(rcfg->wbucket, FALSE),
+ "Apache2::SubRequest::run");
+ }
}
return ap_run_sub_req(r);
Modified: perl/modperl/branches/threading/xs/ModPerl/Interpreter/ModPerl__Interpreter.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/xs/ModPerl/Interpreter/ModPerl__Interpreter.h?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/xs/ModPerl/Interpreter/ModPerl__Interpreter.h (original)
+++ perl/modperl/branches/threading/xs/ModPerl/Interpreter/ModPerl__Interpreter.h Sun Jun 29 10:21:27 2008
@@ -17,7 +17,7 @@
static MP_INLINE
modperl_interp_t *mpxs_ModPerl__Interpreter_current(pTHX_ SV *class)
{
- return MP_THX_INTERP_GET(aTHX);
+ return modperl_thx_interp_get(aTHX);
}
/*
Modified: perl/modperl/branches/threading/xs/tables/current/ModPerl/FunctionTable.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/xs/tables/current/ModPerl/FunctionTable.pm?rev=672647&r1=672646&r2=672647&view=diff
==============================================================================
--- perl/modperl/branches/threading/xs/tables/current/ModPerl/FunctionTable.pm (original)
+++ perl/modperl/branches/threading/xs/tables/current/ModPerl/FunctionTable.pm Sun Jun 29 10:21:27 2008
@@ -1240,6 +1240,20 @@
]
},
{
+ 'return_type' => 'U16 *',
+ 'name' => 'modperl_code_attrs',
+ 'args' => [
+ {
+ 'type' => 'PerlInterpreter *',
+ 'name' => 'my_perl'
+ },
+ {
+ 'type' => 'CV *',
+ 'name' => 'cv'
+ }
+ ]
+ },
+ {
'return_type' => 'int',
'name' => 'modperl_config_apply_PerlModule',
'args' => [
@@ -5041,6 +5055,30 @@
'args' => []
},
{
+ 'return_type' => 'modperl_interp_t *',
+ 'name' => 'modperl_thx_interp_get',
+ 'args' => [
+ {
+ 'type' => 'PerlInterpreter *',
+ 'name' => 'thx',
+ },
+ ],
+ },
+ {
+ 'return_type' => 'void',
+ 'name' => 'modperl_thx_interp_set',
+ 'args' => [
+ {
+ 'type' => 'PerlInterpreter *',
+ 'name' => 'thx',
+ },
+ {
+ 'type' => 'modperl_interp_t *',
+ 'name' => 'interp',
+ },
+ ],
+ },
+ {
'return_type' => 'void',
'name' => 'modperl_tipool_add',
'args' => [