RE: announce: mod_perl-1.25_01
- Original Message - From: Doug MacEachern [EMAIL PROTECTED] To: Christian Gilmore [EMAIL PROTECTED] Cc: 'Modperl Mailing List (E-mail)' [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 12:47 PM Subject: RE: announce: mod_perl-1.25_01 On Tue, 10 Jul 2001, Christian Gilmore wrote: Hrm. Ok, I'll have to release new versions of my modules that have tests for mod_perl 1.26. At what release level do you expect this patch to be committed? well, i don't want to make any promises like i did for 1.26 :)
RE: announce: mod_perl-1.25_01
Hrm. Ok, I'll have to release new versions of my modules that have tests for mod_perl 1.26. At what release level do you expect this patch to be committed? Regards, Christian -Original Message- From: Doug MacEachern [mailto:[EMAIL PROTECTED]] Sent: Monday, July 09, 2001 10:37 PM To: Christian Gilmore Cc: 'Modperl Mailing List (E-mail)' Subject: Re: announce: mod_perl-1.25_01 On Mon, 9 Jul 2001, Christian Gilmore wrote: Doug, I didn't see in the announcement that the below fix is included in 1.25_01. Can you please confirm? the patch has not been committed and will probably wait until after 1.26. i'm concerned that the current patch might introduce bugs elsewhere, its a thorny problem to solve and i don't want to delay 1.26 any longer.
RE: announce: mod_perl-1.25_01
On Tue, 10 Jul 2001, Christian Gilmore wrote: Hrm. Ok, I'll have to release new versions of my modules that have tests for mod_perl 1.26. At what release level do you expect this patch to be committed? well, i don't want to make any promises like i did for 1.26 :)
Re: announce: mod_perl-1.25_01
On Fri, 6 Jul 2001, Doug MacEachern wrote: adjust perl_clear_symtab() to deal properly bleedperl's version of cv_undef() (which broke modules with directive handlers) thanks to Geoffrey Young for the spot FWIW, perl_clear_symtab is the only part of config directives now that cause segfaults for AxKit users. Without that line, we're totally clear of complaints (removed for AxKit 1.4_80), apart from the old expat segfaults. -- Matt/ /||** Founder and CTO ** ** http://axkit.com/ ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** mod_perl news and resources: http://take23.org ** \\// //\\ // \\
Re: announce: mod_perl-1.25_01
On Sat, 7 Jul 2001, Stas Bekman wrote: On Fri, 6 Jul 2001, Doug MacEachern wrote: all tests pass cleanly. cool. under bleed-perl (one week old compilation) (the rest is the same) there are some problems: (perl build args are at the end of this post) $ ./t/TEST -v modules/cgi fails to start the server, whereas 1.xx never did start the server like that, its a 2.0 only feature. $ make start_httpd cp t/conf/mod_perl_srm.conf t/conf/srm.conf ../apache_1.3.20/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t httpd listening on port 8529 will write error_log to: t/logs/error_log letting apache warm up...\c done (it reports 'done' even if it's failed to start the server, because there was another server running already on the same port. try to run 'make start_httpd' twice in a row and you will see) $ more t/logs/error_log [Sat Jul 7 20:55:01 2001] [crit] (98)Address already in use: make_sock: could not bind to port 8529 same problem if you 'make test' and there's already a server running. has always been this way. 2.0 however, first tests that the port is available before attempting to start the server. reason: [Sat Jul 7 20:57:02 2001] [error] (13)Permission denied: exec of /usr/src/httpd_perl/mod_perl-1.25_01/t/net/perl/cgi.pl failed [Sat Jul 7 20:57:02 2001] [error] [client 127.0.0.1] Premature end of script headers: /usr/src/httpd_perl/mod_perl-1.25_01/t/net/perl/cgi.pl this only happens when running this test standalone or also during full 'make test' ? is it setup to use the correct perl? % head -1 t/net/perl/cgi.pl build warnings: ... mod_perl.c:333: warning: unused variable `my_perl' these have also been here as long as ithreads, left as a reminder, 1.xx should be optimized for ithreads.
Re: announce: mod_perl-1.25_01
under bleed-perl (one week old compilation) (the rest is the same) there are some problems: (perl build args are at the end of this post) $ ./t/TEST -v modules/cgi fails to start the server, whereas 1.xx never did start the server like that, its a 2.0 only feature. I'm spoiled with 2.0 :) reason: [Sat Jul 7 20:57:02 2001] [error] (13)Permission denied: exec of /usr/src/httpd_perl/mod_perl-1.25_01/t/net/perl/cgi.pl failed [Sat Jul 7 20:57:02 2001] [error] [client 127.0.0.1] Premature end of script headers: /usr/src/httpd_perl/mod_perl-1.25_01/t/net/perl/cgi.pl this only happens when running this test standalone or also during full 'make test' ? is it setup to use the correct perl? % head -1 t/net/perl/cgi.pl A correct one. But I cannot reproduce the problem anymore. I've recompiled with 5.6.1 and then back with bleed-perl, and it's fine now. Sorry about that. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: announce: mod_perl-1.25_01
Doug, I didn't see in the announcement that the below fix is included in 1.25_01. Can you please confirm? Regards, Christian -Original Message- From: Doug MacEachern [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 15, 2000 7:59 PM To: [EMAIL PROTECTED] Cc: 'Modperl Mailing List (E-mail)' Subject: Re: Yet more on set_handlers() and new-found problems with lookup_uri() i think the jist of the problem(s), is that set_handlers() modifies the configuration structure (the one created at startup from httpd.conf), so any subrequests will end up with the modified structure (which is not reset until the end of the request). this patch implements {get,set}_handlers in terms of r-per_request_config, which is unique to each (sub-)request. if this doesn't fix the problem, it would really help to have a small test case that i can drop in to see the bug in action. Index: src/modules/perl/Apache.xs === RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v retrieving revision 1.103 diff -u -r1.103 Apache.xs --- src/modules/perl/Apache.xs 2000/08/15 19:36:32 1.103 +++ src/modules/perl/Apache.xs 2000/08/16 00:46:44 @@ -73,12 +73,6 @@ void (*set_func) (void *, void *, SV *); } perl_handler_table; -typedef struct { -I32 fill; -AV *av; -AV **ptr; -} perl_save_av; - static void set_handler_dir (perl_handler_table *tab, request_rec *r, SV *sv); static void set_handler_srv (perl_handler_table *tab, request_rec *r, SV *sv); @@ -101,28 +95,17 @@ {HandlerDirEntry(PerlFixupHandler, PerlFixupHandler)}, {HandlerDirEntry(PerlHandler, PerlHandler)}, {HandlerDirEntry(PerlLogHandler, PerlLogHandler)}, +{HandlerDirEntry(PerlCleanupHandler, PerlCleanupHandler)}, { FALSE, NULL } }; -static void perl_restore_av(void *data) -{ -perl_save_av *save_av = (perl_save_av *)data; - -if(save_av-fill != DONE) { -AvFILLp(*save_av-ptr) = save_av-fill; -} -else if(save_av-av != Nullav) { -*save_av-ptr = save_av-av; -} -} - static void perl_handler_merge_avs(char *hook, AV **dest) { int i = 0; HV *hv = perl_get_hv(Apache::PerlStackedHandlers, FALSE); SV **svp = hv_fetch(hv, hook, strlen(hook), FALSE); AV *base; - + if(!(svp SvROK(*svp))) return; @@ -133,45 +116,53 @@ } } +#define avptr_from_offset(ptr, tab) \ +(AV **)((char *)ptr + (int)(long)tab-offset) + static void set_handler_base(void *ptr, perl_handler_table *tab, pool *p, SV *sv) { -AV **av = (AV **)((char *)ptr + (int)(long)tab-offset); +int do_register_cleanup = 0; +AV **av = avptr_from_offset(ptr, tab); -perl_save_av *save_av = -(perl_save_av *)palloc(p, sizeof(perl_save_av)); - -save_av-fill = DONE; -save_av-av = Nullav; - -if((sv == sv_undef) || (SvIOK(sv) SvIV(sv) == DONE)) { -if(AvTRUE(*av)) { -save_av-fill = AvFILL(*av); -AvFILLp(*av) = -1; -} -} -else if(SvROK(sv) SvTYPE(SvRV(sv)) == SVt_PVAV) { -if(AvTRUE(*av)) -save_av-av = av_copy_array(*av); -*av = (AV*)SvRV(sv); -++SvREFCNT(*av); +if ((sv == sv_undef) || (SvIOK(sv) SvIV(sv) == DONE)) { +if (!*av) { +do_register_cleanup = 1; +} +if (*av SvREFCNT(*av)) { +SvREFCNT_dec(*av); +} +*av = newAV(); +} +else if (SvROK(sv) SvTYPE(SvRV(sv)) == SVt_PVAV) { +*av = (AV*)SvRV(sv); +++SvREFCNT(*av); +do_register_cleanup = 1; } else { -croak(Can't set_handler with that value); +croak(Can't set_handler with that value); +} + +if (do_register_cleanup) { +register_cleanup(p, (void*)*av, mod_perl_cleanup_av, mod_perl_noop); } -save_av-ptr = av; -register_cleanup(p, save_av, perl_restore_av, mod_perl_noop); } -static void set_handler_dir(perl_handler_table *tab, request_rec *r, SV *sv) +void set_handler_dir(perl_handler_table *tab, request_rec *r, SV *sv) { -dPPDIR; -set_handler_base((void*)cld, tab, r-pool, sv); +dPPREQ; +if (!cfg-dir_cfg) { +cfg-dir_cfg = perl_create_dir_config(r-pool, r-uri); +} +set_handler_base((void*)cfg-dir_cfg, tab, r-pool, sv); } static void set_handler_srv(perl_handler_table *tab, request_rec *r, SV *sv) { -dPSRV(r-server); -set_handler_base((void*)cls, tab, r-pool, sv); +dPPREQ; +if (!cfg-srv_cfg) { +cfg-srv_cfg = perl_create_server_config(r-pool, NULL); +} +set_handler_base((void*)cfg-srv_cfg, tab, r-pool, sv); } static perl_handler_table *perl_handler_lookup(char *name) @@ -185,29 +176,45 @@ return NULL; } - static SV *get_handlers(request_rec *r, char *hook) { AV *avcopy; AV **av; +dPPREQ; dPPDIR; dPSRV(r-server);
Re: announce: mod_perl-1.25_01
On Mon, 9 Jul 2001, Christian Gilmore wrote: Doug, I didn't see in the announcement that the below fix is included in 1.25_01. Can you please confirm? the patch has not been committed and will probably wait until after 1.26. i'm concerned that the current patch might introduce bugs elsewhere, its a thorny problem to solve and i don't want to delay 1.26 any longer.
Re: announce: mod_perl-1.25_01
On Fri, 6 Jul 2001, Ken Williams wrote: [EMAIL PROTECTED] (Doug MacEachern) wrote: this is a 1.26 canidate, test reports most appreciated as always.. I just tested on Darwin (Mac OS X) with Apache 1.3.20 and using a simple 'perl Makefile.PL EVERYTHING=1' . All tests pass, with no warnings emitted during compilation. I think this is the first time that's happened for me on Darwin. =) great news!
Re: announce: mod_perl-1.25_01
On Fri, 6 Jul 2001, Doug MacEachern wrote: this is a 1.26 canidate, test reports most appreciated as always.. - Linux 2.2.19-4.1mdk i686 unknown. - perl 5.6.1 - apache 1.20 - mod_perl 1.25_01 - perl Makefile.PL APACHE_SRC=../apache_1.3.20/src \ DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 \ APACHE_PREFIX=/home/httpd/httpd_perl \ APACI_ARGS='--prefix=/home/httpd/httpd_perl --enable-module=info \ --enable-module=rewrite --enable-module=proxy \ --without-execstrip' \ PERL_TRACE=1 PERL_DEBUG=1 all tests pass cleanly. under bleed-perl (one week old compilation) (the rest is the same) there are some problems: (perl build args are at the end of this post) $ ./t/TEST -v modules/cgi fails to start the server, whereas $ make start_httpd cp t/conf/mod_perl_srm.conf t/conf/srm.conf ../apache_1.3.20/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t httpd listening on port 8529 will write error_log to: t/logs/error_log letting apache warm up...\c done (it reports 'done' even if it's failed to start the server, because there was another server running already on the same port. try to run 'make start_httpd' twice in a row and you will see) $ more t/logs/error_log [Sat Jul 7 20:55:01 2001] [crit] (98)Address already in use: make_sock: could not bind to port 8529 -- ./t/TEST -v modules/cgi modules/cgi.module CGI is installed 1..5 ok 1 ok 2 ok 3 ok 4 #(fileupload) !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN HTMLHEAD TITLE500 Internal Server Error/TITLE /HEADBODY H1Internal Server Error/H1 The server encountered an internal error or misconfiguration and was unable to complete your request.P Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.P More information about this error may be available in the server error log.P /BODY/HTML FAILED test 5 Failed 1/5 tests, 80.00% okay Failed Test Status Wstat Total Fail Failed List of Failed modules/cgi.t 51 20.00% 5 Failed 1/1 test scripts, 0.00% okay. 1/5 subtests failed, 80.00% okay. reason: [Sat Jul 7 20:57:02 2001] [error] (13)Permission denied: exec of /usr/src/httpd_perl/mod_perl-1.25_01/t/net/perl/cgi.pl failed [Sat Jul 7 20:57:02 2001] [error] [client 127.0.0.1] Premature end of script headers: /usr/src/httpd_perl/mod_perl-1.25_01/t/net/perl/cgi.pl but it shouldn't be a problem: ~stas/perl-bleed/bin/perl /usr/src/httpd_perl/mod_perl-1.25_01/t/net/perl/cgi.pl x-perl-script: cgi.pl Content-Type: text/plain; charset=ISO-8859-1 --- ./t/TEST -v modules/include modules/include.1..4 ok 1 ok 3 FAILED tests 2, 4 Failed 2/4 tests, 50.00% okay Failed Test Status Wstat Total Fail Failed List of Failed modules/include.t 42 50.00% 2, 4 Failed 1/1 test scripts, 0.00% okay. 2/4 subtests failed, 50.00% okay. reason: [Sat Jul 7 20:59:17 2001] [error] (13)Permission denied: exec of /usr/src/httpd_perl/mod_perl-1.25_01/t/net/perl/cgi.pl failed [Sat Jul 7 20:59:17 2001] [error] [client 127.0.0.1] Premature end of script headers: /usr/src/httpd_perl/mod_perl-1.25_01/t/net/perl/cgi.pl [Sat Jul 7 20:59:17 2001] [error] (13)Permission denied: exec of /usr/src/httpd_perl/mod_perl-1.25_01/t/net/perl/cgi.pl failed [Sat Jul 7 20:59:17 2001] [error] [client 127.0.0.1] Premature end of script headers: /usr/src/httpd_perl/mod_perl-1.25_01/t/net/perl/cgi.pl the same as for modules/cgi: -rwxr-xr-x1 stas stas 452 Jul 7 20:42 /usr/src/http d_perl/mod_perl-1.25_01/t/net/perl/cgi.pl* I didn't have all the tests running since I miss some modules, will try later build warnings: === src/modules/perl cc -g -I/home/stas/perl-bleed/lib/5.7.1/i686-linux-thread-multi/CORE -D_REENTRANT -Wall -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DMOD_PERL_VERSION=\1.25_01\ -DMOD_PERL_STRING_VERSION=\mod_perl/1.25_01\ -DPERL_TRACE=1 -I../.. -I/home/stas/perl-bleed/lib/5.7.1/i686-linux-thread-multi/CORE -I../../os/unix -I../../include-DLINUX=22 -I/usr/include/db1 -DMOD_PERL -DUSE_PERL_SSI -D_REENTRANT -Wall -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_HSREGEX -DNO_DL_NEEDED -D_REENTRANT -Wall -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -DPERL_DESTRUCT_LEVEL=2 `../../apaci` -c mod_perl.c mod_perl.c: In function `perl_restart': mod_perl.c:333: warning: unused variable `my_perl' mod_perl.c:359: warning: unused variable `my_perl' mod_perl.c: In function `perl_handler': mod_perl.c:853: warning: unused variable `my_perl' mod_perl.c:879: warning: unused variable `my_perl' mod_perl.c:826: