RE: [ANNOUNCE] Apache::Test 1.08 RC1
Hi All, Do have to do anything different to get it going? Thanks, Rita -Original Message- From: Thella, Rita Sent: Tuesday, February 24, 2004 9:54 AM To: [EMAIL PROTECTED] Subject: RE: [ANNOUNCE] Apache::Test 1.08 RC1 I ran into following error messages with perl 5.8.0 $ perl Makefile.PL -apxs /opt/hpws/apache/bin/apxs Useless use of a constant in void context at lib/Apache/TestRun.pm line 1196. Compilation failed in require at lib/Apache/TestConfig.pm line 36. BEGIN failed--compilation aborted at lib/Apache/TestConfig.pm line 36. Compilation failed in require at lib/Apache/TestMM.pm line 7. BEGIN failed--compilation aborted at lib/Apache/TestMM.pm line 7. Compilation failed in require at Makefile.PL line 16. BEGIN failed--compilation aborted at Makefile.PL line 16. Thanks, Rita -Original Message- From: Geoffrey Young [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 24, 2004 9:08 AM To: [EMAIL PROTECTED] Subject: Re: [ANNOUNCE] Apache::Test 1.08 RC1 Stas Bekman wrote: We would like to release Apache::Test 1.08. It includes multiple changes and improvements, therefore we need your help to test it and report any problems you may have noticed. http://apache.org/~stas/Apache-Test-1.08-dev.tar.gz I'm getting a strange error from 5.6.1 where no mod_perl is installed. $ /perl/perl-5.6.1/bin/perl Makefile.PL -apxs /apache/2.1/prefork/noperl/bin/apxs Useless use of a constant in void context at Apache-Test/lib/Apache/TestRun.pm line 1196. strangely, the attached patch fixes things. --Geoff
Re: [ANNOUNCE] Apache::Test 1.08 RC1
Thella, Rita wrote: Hi All, Do have to do anything different to get it going? This bug should have been fixed in 1.08 which you can get from CPAN. __ Stas BekmanJAm_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
[STATUS] (flood) Wed Feb 25 23:46:08 EST 2004
flood STATUS: -*-text-*- Last modified at [$Date: 2003/07/01 20:55:12 $] Release: 1.0: Released July 23, 2002 milestone-03: Tagged January 16, 2002 ASF-transfer: Released July 17, 2001 milestone-02: Tagged August 13, 2001 milestone-01: Tagged July 11, 2001 (tag lost during transfer) RELEASE SHOWSTOPPERS: * Everything needs to work perfectly Other bugs that need fixing: * I get a SIGBUS on Darwin with our examples/round-robin-ssl.xml config, on the second URL. I'm using OpenSSL 0.9.6c 21 dec 2001. * iPlanet sends Content-length - there is a hack in there now to recognize it. However, all HTTP headers need to be normalized before checking their values. This isn't easy to do. Grr. * OpenSSL 0.9.6 Segfaults under high load. Upgrade to OpenSSL 0.9.6b. Aaron says: I just found a big bug that might have been causing this all along (we weren't closing ssl sockets). How can I reproduce the problem you were seeing to verify if this was the fix? * SEGVs when /tmp/.rnd doesn't exist are bad. Make it configurable and at least bomb with a good error message. (See Doug's patch.) Status: This is fixed, no? * If APR has disabled threads, flood should as well. We might want to have an enable/disable parameter that does this also, providing an error if threads are desired but not available. * flood needs to clear pools more often. With a long running test it can chew up memory very quickly. We should just bite the bullet and create/destroy/clear pools for each level of our model: farm, farmer, profile, url/request-cycle, etc. * APR needs to have a unified interface for ephemeral port exhaustion, but aparently Solaris and Linux return different errors at the moment. Fix this in APR then take advantage of it in flood. * The examples/analyze-relative scripts fail when there are less than 5 unique URLs. Other features that need writing: * More analysis and graphing scripts are needed * Write robust tool (using tethereal perhaps) to take network dumps and convert them to flood's XML format. Status: Justin volunteers. Aaron had a script somewhere that is a start. Jacek is working on a Mozilla application, codename Flood URL bag (much like Live HTTP Headers) and small HTTP proxy. * Get chunked encoding support working. Status: Justin volunteers. He got sidetracked by the httpd implementation of input filtering and never finished this. This is a stopgap until apr-serf is completed. * Maybe we should make randfile and capath runtime directives that come out of the XML, instead of autoconf parameters. * We are using apr_os_thread_current() and getpid() in some places when what we really want is a GUID. The GUID will be used to correlate raw output data with each farmer. We may wish to print a unique ID for each of farm, farmer, profile, and url to help in postprocessing. * We are using strtol() in some places and strtoll() in others. Pick one (Aaron says strtol(), but he's not sure). * Validation of responses (known C-L, specific strings in response) Status: Justin volunteers * HTTP error codes (ie. teach it about 302s) Justin says: Yeah, this won't be with round_robin as implemented. Need a linked list-based profile where we can insert new URLs into the sequence. * Farmer (Single-thread, multiple profiles) Status: Aaron says: If you have threads, then any Farmer can be run as part of any Farm. If you don't have threads, you can currently only run one Farmer named Joe right now (this will be changed so that if you don't have threads, flood will attempt to run all Farmers in serial under one process). * Collective (Single-host, multiple farms) This is a number of Farms that have been fork()ed into child processes. * Megaconglomerate (Multiple hosts each running a collective) This is a number of Collectives running on a number of hosts, invoked via RSH/SSH or maybe even some proprietary mechanism. * Other types of urllists a) Random / Random-weighted b) Sequenced (useful with cookie propogation) c) Round-robin d) Chaining of the above strategies Status: Round-robin is complete. * Other types of reports Status: Aaron says: simple reports are functional. Justin added a new type that simply prints the approx. timestamp when the test was run, and the result as OK/FAIL; it is called easy reports (see flood_easy_reports.h). Furthermore,
[STATUS] (perl-framework) Wed Feb 25 23:46:12 EST 2004
httpd-test/perl-framework STATUS: -*-text-*- Last modified at [$Date: 2002/03/09 05:22:48 $] Stuff to do: * finish the t/TEST exit code issue (ORed with 0x2C if framework failed) * change existing tests that frob the DocumentRoot (e.g., t/modules/access.t) to *not* do that; instead, have Makefile.PL prepare appropriate subdirectory configs for them. Why? So t/TEST can be used to test a remote server. * problems with -d perl mode, doesn't work as documented Message-ID: [EMAIL PROTECTED] Date: Sat, 20 Oct 2001 12:58:33 +0800 Subject: Re: perldb Tests to be written: * t/apache - simulations of network failures (incomplete POST bodies, chunked and unchunked; missing POST bodies; slooow client connexions, such as taking 1 minute to send 1KiB; ...) * t/modules/autoindex - something seems possibly broken with inheritance on 2.0 * t/ssl - SSLPassPhraseDialog exec: - SSLRandomSeed exec:
Re: Exiting a test script if a test fails
William McKee wrote: Hi all, I am looking for a graceful way to exit a test should one of my subtests fail. I don't think that I want to skip the test; I'd prefer to report an error and discontinue processing so that I don't try to add/delete bogus data into my database. However, I'm open to persusasion g. I checked the docs at perl.apache.org but didn't find any helper routines or examples that fit my needs. The only thing I can image doing is adding a die statement after my test: die Unable to read \$userdata. unless defined $userdata ref $userdata eq 'HASH'; Any other thoughts? This is on the Test::Harness territory, not A-T's one. Looking at the T-H manpage we find: Bail out! As an emergency measure, a test script can decide that further tests are useless (e.g. missing dependencies) and testing should stop immediately. In that case the test script prints the magic words Bail out! to standard output. Any message after these words will be displayed by Test::Harness as the reason why testing is stopped. I haven't tested whether this really works in A-T, but I see no reason why it shouldn't. __ Stas BekmanJAm_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
Re: Exiting a test script if a test fails
Bail out! to standard output. Any message after these words will be displayed by Test::Harness as the reason why testing is stopped. I haven't tested whether this really works in A-T, but I see no reason why it shouldn't. I tried to use it when I was messing with the pre- and post-test foo a while back, but couldn't get it to work. it might have had something to do with the massive other changes I was trying to implement at the time, though... if we can get it to work, I'd be in favor of an Apache::Test::bail() function (or whatever you want to call it). --Geoff
Re: Exiting a test script if a test fails
Geoffrey Young wrote: Bail out! to standard output. Any message after these words will be displayed by Test::Harness as the reason why testing is stopped. I haven't tested whether this really works in A-T, but I see no reason why it shouldn't. I tried to use it when I was messing with the pre- and post-test foo a while back, but couldn't get it to work. it might have had something to do with the massive other changes I was trying to implement at the time, though... William will let us know. if we can get it to work, I'd be in favor of an Apache::Test::bail() function (or whatever you want to call it). It's an ambiguous name since it doesn't tell you that it'll bail out from the whole test suite and one may think that it'll abort only the current test. How about: Apache::Test::abort_all_tests() or a similar, more explicit name? Suggestions are welcome of course. __ Stas BekmanJAm_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
Re: Exiting a test script if a test fails
On Thu, Feb 26, 2004 at 01:17:08PM -0800, Stas Bekman wrote: I tried to use it when I was messing with the pre- and post-test foo a while back, but couldn't get it to work. it might have had something to do with the massive other changes I was trying to implement at the time, though... William will let us know. It's not working. I placed the following lines before my die statement: undef $userdata; print STDOUT Bail out! Unable to continue due to missing \$userdata unless defined $userdata ref $userdata eq 'HASH'; The die statement gets called. if we can get it to work, I'd be in favor of an Apache::Test::bail() function (or whatever you want to call it). It's an ambiguous name since it doesn't tell you that it'll bail out from the whole test suite and one may think that it'll abort only the current test. How about: Apache::Test::abort_all_tests() or a similar, more explicit name? Suggestions are welcome of course. The name doesn't matter to me as long as the functionality is present (which may be outside the realm of possibility at the moment). Just for another idea, I started looking for this ability in the Helper Functions. A function like t_abort_all_tests(Reason goes here) would make sense to me. For the time being, I'll stick with either the die or the skip. Thanks for you reponses. William -- Knowmad Services Inc. http://www.knowmad.com
Re: [PATCH-Modified-2] SSL not sending close alert message
On Wed, Feb 25, 2004 at 05:12:33PM -0800, Mathihalli, Madhusudan wrote: More feedback incorporated ! ap_flush_conn can just use a single brigade with two buckets, no extra variables needed there, also needs s/APU_DECLARE/AP_DECLARE in eoc_bucket.c, and perhaps the prototypes are more appropriate in http_connection.h but it's pretty arbitrary with the error_bucket in http_protocol.h already. +filter_ctx-nobuffer = 1; +status = ssl_filter_io_shutdown(filter_ctx, f-c, 0); +if ((status = ap_pass_brigade(f-next, bb)) != APR_SUCCESS) { should either do something with the return value of io_shutdown or not assign it to status. Nearly there ;) joe
Re: 1.x: byte-range with ErrorDocuments returns incorrect status code
Will Lowe wrote: It looks like byte-range requests on non-existant files returns 206 instead of 404 if ErrorDocument is set. I was able to verify this - it looks like there's some simple logic in 2.0 that wasn't carried over to 1.3. so, try this patch. all the byterange tests in the perl-framework pass with it, in addition to my own ErrorDocument tests that I used to reproduce the problem. if anyone on 1.3 support is paying attention, what's the proper course for insertion into the stable tree once things are verified - add to STATUS and wait for reviews/votes? --Geoff Index: src/main/http_protocol.c === RCS file: /home/cvspublic/apache-1.3/src/main/http_protocol.c,v retrieving revision 1.332 diff -u -r1.332 http_protocol.c --- src/main/http_protocol.c16 Feb 2004 22:29:33 - 1.332 +++ src/main/http_protocol.c26 Feb 2004 14:14:21 - @@ -260,7 +260,7 @@ if (!(range = ap_table_get(r-headers_in, Range))) range = ap_table_get(r-headers_in, Request-Range); -if (!range || strncasecmp(range, bytes=, 6)) { +if (!range || strncasecmp(range, bytes=, 6) || r-status != HTTP_OK) { return 0; } range += 6;
RE: finish connection hook (WAS: RE: [PATCH] SSL not sending close alert message)
--On Wednesday, February 25, 2004 1:20 PM -0800 Mathihalli, Madhusudan [EMAIL PROTECTED] wrote: Hooking the cleanups to the connection pool may be a little too late for some modules (Example SSL shutdown/SSL Alert). For filters like SSL, the EOC logic would probably be just fine - I can't think of other filters which cannot use the EOC logic. Correct. A cleanup is too late for this particular action. I'd like to understand what's the inhibition/limitation for adding a new hook - IOW, why are buckets like EOC preferable over a finish_connection hook ? I can guess it's something to do with the performance - but a detailed explaination/pointer to something would be helpful. It's that EOC is the proper parallel to the EOS bucket. We just never realized we needed it. ;-) But, I'm fairly sure that it is the 'right' solution here. Also, I'm not sure that we can add a new hook to 2.0; so if we added a hook to solve this problem, it'd have to wait for 2.2 to be resolved. (We might be able to add it to 2.0, but I'm not 100% sure.) -- justin
Re: [PATCH-Modified-2] SSL not sending close alert message
--On Thursday, February 26, 2004 11:58 AM + Joe Orton [EMAIL PROTECTED] wrote: On Wed, Feb 25, 2004 at 05:12:33PM -0800, Mathihalli, Madhusudan wrote: More feedback incorporated ! ap_flush_conn can just use a single brigade with two buckets, no extra variables needed there, also needs s/APU_DECLARE/AP_DECLARE in eoc_bucket.c, and perhaps the prototypes are more appropriate in http_connection.h but it's pretty arbitrary with the error_bucket in http_protocol.h already. +filter_ctx-nobuffer = 1; +status = ssl_filter_io_shutdown(filter_ctx, f-c, 0); +if ((status = ap_pass_brigade(f-next, bb)) != APR_SUCCESS) { should either do something with the return value of io_shutdown or not assign it to status. Nearly there ;) Ditto. My only long-term comment is that I'd wonder if the core output filter should eventually do the socket shutdown when it gets the EOC rather than delete the bucket. But, that's not related to this patch at all (other than it'd just do the delete now). Thanks! -- justin
Error in rcs file in httpd-2.0 CVS repository
I'm in the process of testing out the cvs2svn.py converter, and the converter found an inconsistency in the httpd-2.0 repository. The file /httpd-2.0/docs/manual/misc/Attic/known_client_problems.html,v Contains APACHE_1_2_X:1.3; which is a tag at rev 1.3, while all other rcs declarations of that symbolic name are a branch. For example: APACHE_1_2_X:1.6.0.2 Note that the second to last number is a zero--this is indicative of a branch. Anyway, this should be fixed (in fact, it needs to be fixed in order to convert the repository to svn), and the solution is merely to change the offending line to APACHE_1_2_X:1.3.0.2; (Don't forget the semicolon--it's the last symbolic name on that file, so it's necessary.) Can someone with the appropriate admin-fu take care of this? -Fitz
RE: Error in rcs file in httpd-2.0 CVS repository
On Thu, 2004-02-26 at 11:17, Sander Striker wrote: From: Brian. W. Fitzpatrick [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 5:53 PM I'm in the process of testing out the cvs2svn.py converter, and the converter found an inconsistency in the httpd-2.0 repository. The file /httpd-2.0/docs/manual/misc/Attic/known_client_problems.html,v Contains APACHE_1_2_X:1.3; which is a tag at rev 1.3, while all other rcs declarations of that symbolic name are a branch. For example: APACHE_1_2_X:1.6.0.2 Note that the second to last number is a zero--this is indicative of a branch. Anyway, this should be fixed (in fact, it needs to be fixed in order to convert the repository to svn), and the solution is merely to change the offending line to APACHE_1_2_X:1.3.0.2; (Don't forget the semicolon--it's the last symbolic name on that file, so it's necessary.) Can someone with the appropriate admin-fu take care of this? If no objections I'll do this next week. Was this the only problem you encountered during the conversion? Well, it's a showstopper, so I thought I'd shoot out a mail about it right away. I'll make a local copy of the httpd repository, fix that tag, and see how far I can get. -Fitz
RE: [PATCH-Modified-2] SSL not sending close alert message
-Original Message- From: Joe Orton [mailto:[EMAIL PROTECTED] [SNIP] ap_flush_conn can just use a single brigade with two buckets, no extra variables needed there, Hmmn.. will that not introduce a mem leak ? also needs s/APU_DECLARE/AP_DECLARE in eoc_bucket.c, and perhaps the prototypes are more appropriate in http_connection.h but it's pretty arbitrary with the error_bucket in http_protocol.h already. I agree - it makes more sense in http_connection.h - moved it there (the next patch will include the change) -Madhu
RE: [PATCH-Modified-2] SSL not sending close alert message
-Original Message- From: Justin Erenkrantz [mailto:[EMAIL PROTECTED] [SNIP] --On Thursday, February 26, 2004 10:17 AM -0800 Mathihalli, Madhusudan [EMAIL PROTECTED] wrote: ap_flush_conn can just use a single brigade with two buckets, no extra variables needed there, Hmmn.. will that not introduce a mem leak ? I don't think so. Why do you think so? -- justin Oh.. forget it - it was Purify(and me for some time) that didn't quite understand the logic there - it complained that there's a potential mem leak. I guess it's okay (since the memory gets freed in the core_filter). Anyways.. here's the new patch. -Madhu Index: include/http_connection.h === RCS file: /home/cvs/httpd-2.0/include/http_connection.h,v retrieving revision 1.59 diff -u -r1.59 http_connection.h --- include/http_connection.h 9 Feb 2004 20:38:21 - 1.59 +++ include/http_connection.h 26 Feb 2004 17:54:32 - @@ -103,6 +103,34 @@ */ AP_DECLARE_HOOK(int,process_connection,(conn_rec *c)) +/* End Of Connection (EOC) bucket */ + +AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_eoc; + +/** + * Determine if a bucket is an End Of Connection (EOC) bucket + * @param e The bucket to inspect + * @return true or false + */ +#define AP_BUCKET_IS_EOC(e) (e-type == ap_bucket_type_eoc) + +/** + * Make the bucket passed in an End Of Connection (EOC) bucket + * @param b The bucket to make into an EOC bucket + * @return The new bucket, or NULL if allocation failed + * @deffunc apr_bucket *ap_bucket_eoc_make(apr_bucket *b) + */ +AP_DECLARE(apr_bucket *) ap_bucket_eoc_make(apr_bucket *b); + +/** + * Create a bucket referring to an End Of Connection (EOC). This indicates + * that the connection will be closed. + * @param list The freelist from which this bucket should be allocated + * @return The new bucket, or NULL if allocation failed + * @deffunc apr_bucket *ap_bucket_eoc_create(apr_bucket_alloc_t *list) + */ +AP_DECLARE(apr_bucket *) ap_bucket_eoc_create(apr_bucket_alloc_t *list); + #ifdef __cplusplus } #endif === RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_io.c,v retrieving revision 1.118 diff -u -r1.118 ssl_engine_io.c --- modules/ssl/ssl_engine_io.c 25 Feb 2004 10:54:29 - 1.118 +++ modules/ssl/ssl_engine_io.c 26 Feb 2004 17:54:33 - @@ -100,6 +100,7 @@ BIO*pbioWrite; ap_filter_t*pInputFilter; ap_filter_t*pOutputFilter; +intnobuffer; /* non-zero to prevent buffering */ } ssl_filter_ctx_t; typedef struct { @@ -193,7 +194,8 @@ */ BIO_clear_retry_flags(bio); -if (!outctx-length (inl + outctx-blen sizeof(outctx-buffer))) { +if (!outctx-length (inl + outctx-blen sizeof(outctx-buffer)) +!outctx-filter_ctx-nobuffer) { /* the first two SSL_writes (of 1024 and 261 bytes) * need to be in the same packet (vec[0].iov_base) */ @@ -1395,6 +1397,22 @@ */ apr_bucket_delete(bucket); } +} +else if (AP_BUCKET_IS_EOC(bucket)) { +/* The special EOC bucket means a shutdown is needed; + * - turn off buffering in bio_filter_out_write + * - issue the SSL_shutdown + */ +filter_ctx-nobuffer = 1; +status = ssl_filter_io_shutdown(filter_ctx, f-c, 0); +if (status != APR_SUCCESS) { +ap_log_error(APLOG_MARK, APLOG_INFO, status, NULL, + SSL filter error shutting down I/O); +} +if ((status = ap_pass_brigade(f-next, bb)) != APR_SUCCESS) { +return status; +} +break; } else { /* filter output */ Index: server/Makefile.in === RCS file: /home/cvs/httpd-2.0/server/Makefile.in,v retrieving revision 1.91 diff -u -r1.91 Makefile.in --- server/Makefile.in 2 Feb 2004 17:04:10 - 1.91 +++ server/Makefile.in 26 Feb 2004 17:54:33 - @@ -13,7 +13,8 @@ connection.c listen.c \ mpm_common.c util_charset.c util_debug.c util_xml.c \ util_filter.c exports.c buildmark.c \ - scoreboard.c error_bucket.c protocol.c core.c request.c provider.c + scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \ + eoc_bucket.c TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h ht tpd.exp Index: server/connection.c === RCS file: /home/cvs/httpd-2.0/server/connection.c,v retrieving revision 1.114 diff -u -r1.114 connection.c --- server/connection.c 9 Feb 2004 20:40:49 - 1.114 +++ server/connection.c 26 Feb 2004 17:54:33 - @@ -74,6 +74,11 @@ b =
Re: cvs commit: httpd-2.0 STATUS
[EMAIL PROTECTED] wrote: gregames2004/02/26 12:12:13 Modified:.Tag: APACHE_2_0_BRANCH STATUS Log: vote on exception hook backport. review was fine, extra credit for cleaning up the duplication of signal handling between the mpms. Tested on RH9 w/prefork - no regression, worker - no regression, enabled mod_backtrace here which worked as expected once I set EnableExceptionHook On in httpd.conf. cool, thanks for testing I need to get the 2.x versions of mod_backtrace and mod_whatkilledus cleaned up to match the 1.3 versions and stick them in 2.1-dev's experimental directory.
Re: (97)Address family not supported by protocol causes disk ticking?
Process 1008 attached - interrupt to quit select(0, NULL, NULL, NULL, {0, 62}) = 0 (Timeout) write(6, !, 1)= 1 socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 ENOSYS (Function not implemented) socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 ENOSYS (Function not implemented) socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 EAFNOSUPPORT (Address family not supported by protocol) gettimeofday({1077743877, 15040}, NULL) = 0 write(7, [Wed Feb 25 22:17:57 2004] [warn..., 114) = 114 waitpid(-1, 0xba00, WNOHANG|WUNTRACED) = 0 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout) write(6, !, 1)= 1 socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 ENOSYS (Function not implemented) . aren't responding to the pipe of death. Could it be that network traffic is totally dried up during these periods? or could the child processes be in the By totally dried up do you mean is the host getting fewer requests? This machine gets about 20-30 requests per hour usually. middle of some long running request? server-status with ExtendedStatus On would help answer those questions. Okay, I added this to httpd.conf: Location /server-status SetHandler server-status Order Deny,Allow Deny from all Allow from 127.0.0.1 /Location ExtendedStatus on and restarted httpd. From the ps, it looks like you are using the prefork mpm...is that correct? As per out-of-the-box httpd.conf, I have: IfModule prefork.c StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 /IfModule I'm guessing you hear the disk ticking once a second like clockwork when this happens. Exactly. I'll post a bug on Saturday either way unless someone suggest otherwise. sure, might as well. Okay, now I'll wait till Sunday evening or the next occurence, whichever is first, in order to try to get the info you requested into the bug report at the same time. Alexis
Re: [PATCH] Windows IPv6
+1, but which warning does 4163 quiet? At 09:46 AM 2/26/2004, you wrote: Here's a patch to enable IPv6 on Windows XP 2003. In addition we'll need to change the setting of APR_HAVE_IPV6 in apr.hw - seems like we'll need some awk magic to do that. Note that enabling IPv6 drags in the need for the XP or 2003 platform SDK but I don't see any way around it. I believe the platform SDK can be freely downloaded from MS for those who want to do an IPv6 build. Any comments before I commit to 2.1? Allan Index: server/mpm/winnt/child.c === RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/child.c,v retrieving revision 1.26 diff -u -d -b -r1.26 child.c --- server/mpm/winnt/child.c9 Feb 2004 20:40:51 -1.26 +++ server/mpm/winnt/child.c25 Feb 2004 16:20:51 - @@ -314,13 +314,17 @@ int wait_time = 1; int csd; SOCKET nsd = INVALID_SOCKET; -struct sockaddr_in sa_client; int count_select_errors = 0; int rc; int clen; ap_listen_rec *lr; struct fd_set listenfds; SOCKET listenmaxfd = INVALID_SOCKET; +#if APR_HAVE_IPV6 +struct sockaddr_in6 sa_client; +#else +struct sockaddr_in sa_client; +#endif /* Setup the listeners * ToDo: Use apr_poll() @@ -395,7 +399,13 @@ static PCOMP_CONTEXT win9x_get_connection(PCOMP_CONTEXT context) { apr_os_sock_info_t sockinfo; -int len; +int len, salen; +#if APR_HAVE_IPV6 +salen = sizeof(struct sockaddr_in6); +#else +salen = sizeof(struct sockaddr_in); +#endif + if (context == NULL) { /* allocate the completion context and the transaction pool */ @@ -415,7 +425,7 @@ if (context-accept_socket == INVALID_SOCKET) { return NULL; } -len = sizeof(struct sockaddr); +len = salen; context-sa_server = apr_palloc(context-ptrans, len); if (getsockname(context-accept_socket, context-sa_server, len)== SOCKET_ERROR) { @@ -423,7 +433,7 @@ getsockname failed); continue; } -len = sizeof(struct sockaddr); +len = salen; context-sa_client = apr_palloc(context-ptrans, len); if ((getpeername(context-accept_socket, context-sa_client, len)) == SOCKET_ERROR) { @@ -434,7 +444,7 @@ sockinfo.os_sock = context-accept_socket; sockinfo.local = context-sa_server; sockinfo.remote = context-sa_client; -sockinfo.family = APR_INET; +sockinfo.family = context-sa_server-sa_family; sockinfo.type= SOCK_STREAM; apr_os_sock_make(context-sock, sockinfo, context-ptrans); @@ -465,9 +475,21 @@ DWORD BytesRead; SOCKET nlsd; int rv, err_count = 0; +#if APR_HAVE_IPV6 +SOCKADDR_STORAGE ss_listen; +int namelen = sizeof(ss_listen); +#endif apr_os_sock_get(nlsd, lr-sd); +#if APR_HAVE_IPV6 +if (getsockname(nlsd, (struct sockaddr *)ss_listen, namelen) == SOCKET_ERROR) { +ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_netos_error(), ap_server_conf, +winnt_accept: getsockname error on listening socket, is IPv6 available?); +return; + } +#endif + while (!shutdown_in_progress) { if (!context) { context = mpm_get_completion_context(); @@ -479,6 +501,25 @@ } /* Create and initialize the accept socket */ +#if APR_HAVE_IPV6 +if (context-accept_socket == INVALID_SOCKET) { +context-accept_socket = socket(ss_listen.ss_family, SOCK_STREAM, IPPROTO_TCP); +context-socket_family = ss_listen.ss_family; +} +else if (context-socket_family != ss_listen.ss_family) { +closesocket(context-accept_socket); +context-accept_socket = socket(ss_listen.ss_family, SOCK_STREAM, IPPROTO_TCP); +context-socket_family = ss_listen.ss_family; +} + +if (context-accept_socket == INVALID_SOCKET) { +ap_log_error(APLOG_MARK,APLOG_WARNING, apr_get_netos_error(), ap_server_conf, + winnt_accept: Failed to allocate an accept socket. + Temporary resource constraint? Try again.); +Sleep(100); +continue; +} +#else if (context-accept_socket == INVALID_SOCKET) { context-accept_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (context-accept_socket == INVALID_SOCKET) { @@ -490,7 +531,7 @@ continue; } } - +#endif /* AcceptEx on the completion context. The completion context will be * signaled when a connection is accepted. */ @@ -607,7 +648,7 @@ sockinfo.os_sock = context-accept_socket; sockinfo.local = context-sa_server; sockinfo.remote = context-sa_client; -sockinfo.family = APR_INET; +
RE: Error in rcs file in httpd-2.0 CVS repository
On Thu, 2004-02-26 at 11:17, Sander Striker wrote: From: Brian. W. Fitzpatrick [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 5:53 PM I'm in the process of testing out the cvs2svn.py converter, and the converter found an inconsistency in the httpd-2.0 repository. The file /httpd-2.0/docs/manual/misc/Attic/known_client_problems.html,v Contains APACHE_1_2_X:1.3; which is a tag at rev 1.3, while all other rcs declarations of that symbolic name are a branch. For example: APACHE_1_2_X:1.6.0.2 Note that the second to last number is a zero--this is indicative of a branch. Anyway, this should be fixed (in fact, it needs to be fixed in order to convert the repository to svn), and the solution is merely to change the offending line to APACHE_1_2_X:1.3.0.2; (Don't forget the semicolon--it's the last symbolic name on that file, so it's necessary.) Can someone with the appropriate admin-fu take care of this? If no objections I'll do this next week. Was this the only problem you encountered during the conversion?
RE: Error in rcs file in httpd-2.0 CVS repository
On Thu, 2004-02-26 at 11:17, Sander Striker wrote: From: Brian. W. Fitzpatrick [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 5:53 PM I'm in the process of testing out the cvs2svn.py converter, and the converter found an inconsistency in the httpd-2.0 repository. The file /httpd-2.0/docs/manual/misc/Attic/known_client_problems.html,v Contains APACHE_1_2_X:1.3; which is a tag at rev 1.3, while all other rcs declarations of that symbolic name are a branch. For example: APACHE_1_2_X:1.6.0.2 Note that the second to last number is a zero--this is indicative of a branch. Anyway, this should be fixed (in fact, it needs to be fixed in order to convert the repository to svn), and the solution is merely to change the offending line to APACHE_1_2_X:1.3.0.2; (Don't forget the semicolon--it's the last symbolic name on that file, so it's necessary.) Can someone with the appropriate admin-fu take care of this? If no objections I'll do this next week. Was this the only problem you encountered during the conversion? Just to let you know, this is the only problem that I can find. I successfully converted the entire httpd-2.0 repository. It took 5 hours and 58 minutes and has 14,381 revisions. :-) -Fitz
RE: Error in rcs file in httpd-2.0 CVS repository
On Thu, 2004-02-26 at 11:17, Sander Striker wrote: From: Brian. W. Fitzpatrick [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 5:53 PM I'm in the process of testing out the cvs2svn.py converter, and the converter found an inconsistency in the httpd-2.0 repository. Is that mean the Apache httpd project going to use Subversion instead of CVS soon? - Sung
Re: (97)Address family not supported by protocol causes disk ticking?
At 03:40 PM 2/25/2004, Alexis Huxley wrote: [Mon Feb 16 23:35:33 2004] [warn] (97)Address family not supported by protocol: get socket to connect to listener the ticking is an unexpected hard flush when APR_APPEND causes win32 to file lock for write. Bill
[PATCH] Windows IPv6
Here's a patch to enable IPv6 on Windows XP 2003. In addition we'll need to change the setting of APR_HAVE_IPV6 in apr.hw - seems like we'll need some awk magic to do that. Note that enabling IPv6 drags in the need for the XP or 2003 platform SDK but I don't see any way around it. I believe the platform SDK can be freely downloaded from MS for those who want to do an IPv6 build. Any comments before I commit to 2.1? Allan Index: server/mpm/winnt/child.c === RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/child.c,v retrieving revision 1.26 diff -u -d -b -r1.26 child.c --- server/mpm/winnt/child.c9 Feb 2004 20:40:51 -1.26 +++ server/mpm/winnt/child.c25 Feb 2004 16:20:51 - @@ -314,13 +314,17 @@ int wait_time = 1; int csd; SOCKET nsd = INVALID_SOCKET; -struct sockaddr_in sa_client; int count_select_errors = 0; int rc; int clen; ap_listen_rec *lr; struct fd_set listenfds; SOCKET listenmaxfd = INVALID_SOCKET; +#if APR_HAVE_IPV6 +struct sockaddr_in6 sa_client; +#else +struct sockaddr_in sa_client; +#endif /* Setup the listeners * ToDo: Use apr_poll() @@ -395,7 +399,13 @@ static PCOMP_CONTEXT win9x_get_connection(PCOMP_CONTEXT context) { apr_os_sock_info_t sockinfo; -int len; +int len, salen; +#if APR_HAVE_IPV6 +salen = sizeof(struct sockaddr_in6); +#else +salen = sizeof(struct sockaddr_in); +#endif + if (context == NULL) { /* allocate the completion context and the transaction pool */ @@ -415,7 +425,7 @@ if (context-accept_socket == INVALID_SOCKET) { return NULL; } -len = sizeof(struct sockaddr); +len = salen; context-sa_server = apr_palloc(context-ptrans, len); if (getsockname(context-accept_socket, context-sa_server, len)== SOCKET_ERROR) { @@ -423,7 +433,7 @@ getsockname failed); continue; } -len = sizeof(struct sockaddr); +len = salen; context-sa_client = apr_palloc(context-ptrans, len); if ((getpeername(context-accept_socket, context-sa_client, len)) == SOCKET_ERROR) { @@ -434,7 +444,7 @@ sockinfo.os_sock = context-accept_socket; sockinfo.local = context-sa_server; sockinfo.remote = context-sa_client; -sockinfo.family = APR_INET; +sockinfo.family = context-sa_server-sa_family; sockinfo.type= SOCK_STREAM; apr_os_sock_make(context-sock, sockinfo, context-ptrans); @@ -465,9 +475,21 @@ DWORD BytesRead; SOCKET nlsd; int rv, err_count = 0; +#if APR_HAVE_IPV6 +SOCKADDR_STORAGE ss_listen; +int namelen = sizeof(ss_listen); +#endif apr_os_sock_get(nlsd, lr-sd); +#if APR_HAVE_IPV6 +if (getsockname(nlsd, (struct sockaddr *)ss_listen, namelen) == SOCKET_ERROR) { +ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_netos_error(), ap_server_conf, +winnt_accept: getsockname error on listening socket, is IPv6 available?); +return; + } +#endif + while (!shutdown_in_progress) { if (!context) { context = mpm_get_completion_context(); @@ -479,6 +501,25 @@ } /* Create and initialize the accept socket */ +#if APR_HAVE_IPV6 +if (context-accept_socket == INVALID_SOCKET) { +context-accept_socket = socket(ss_listen.ss_family, SOCK_STREAM, IPPROTO_TCP); +context-socket_family = ss_listen.ss_family; +} +else if (context-socket_family != ss_listen.ss_family) { +closesocket(context-accept_socket); +context-accept_socket = socket(ss_listen.ss_family, SOCK_STREAM, IPPROTO_TCP); +context-socket_family = ss_listen.ss_family; +} + +if (context-accept_socket == INVALID_SOCKET) { +ap_log_error(APLOG_MARK,APLOG_WARNING, apr_get_netos_error(), ap_server_conf, + winnt_accept: Failed to allocate an accept socket. + Temporary resource constraint? Try again.); +Sleep(100); +continue; +} +#else if (context-accept_socket == INVALID_SOCKET) { context-accept_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (context-accept_socket == INVALID_SOCKET) { @@ -490,7 +531,7 @@ continue; } } - +#endif /* AcceptEx on the completion context. The completion context will be * signaled when a connection is accepted. */ @@ -607,7 +648,7 @@ sockinfo.os_sock = context-accept_socket; sockinfo.local = context-sa_server; sockinfo.remote = context-sa_client; -sockinfo.family = APR_INET; +sockinfo.family = context-sa_server-sa_family; sockinfo.type= SOCK_STREAM;
Re: cvs commit: httpd-2.0/modules/loggers mod_log_config.c
* [EMAIL PROTECTED] wrote: trawick 2004/02/26 12:00:55 Modified:modules/loggers mod_log_config.c Log: a kind fix for a compile error unfortunately broke an order dependency... the buffered logs array needs to be initialized prior to opening the logs oh? I must have overseen something. I've looked for such a need, the time I've did the change. nd
RE: [PATCH-Modified-2] SSL not sending close alert message
Sorry - the earlier mail was a result of my mis-understanding Joe's comment. Here's the correct patch. Thanks -Madhu Index: include/http_connection.h === RCS file: /home/cvs/httpd-2.0/include/http_connection.h,v retrieving revision 1.59 diff -u -r1.59 http_connection.h --- include/http_connection.h 9 Feb 2004 20:38:21 - 1.59 +++ include/http_connection.h 26 Feb 2004 17:54:32 - @@ -103,6 +103,34 @@ */ AP_DECLARE_HOOK(int,process_connection,(conn_rec *c)) +/* End Of Connection (EOC) bucket */ + +AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_eoc; + +/** + * Determine if a bucket is an End Of Connection (EOC) bucket + * @param e The bucket to inspect + * @return true or false + */ +#define AP_BUCKET_IS_EOC(e) (e-type == ap_bucket_type_eoc) + +/** + * Make the bucket passed in an End Of Connection (EOC) bucket + * @param b The bucket to make into an EOC bucket + * @return The new bucket, or NULL if allocation failed + * @deffunc apr_bucket *ap_bucket_eoc_make(apr_bucket *b) + */ +AP_DECLARE(apr_bucket *) ap_bucket_eoc_make(apr_bucket *b); + +/** + * Create a bucket referring to an End Of Connection (EOC). This indicates + * that the connection will be closed. + * @param list The freelist from which this bucket should be allocated + * @return The new bucket, or NULL if allocation failed + * @deffunc apr_bucket *ap_bucket_eoc_create(apr_bucket_alloc_t *list) + */ +AP_DECLARE(apr_bucket *) ap_bucket_eoc_create(apr_bucket_alloc_t *list); + #ifdef __cplusplus } #endif === RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_io.c,v retrieving revision 1.118 diff -u -r1.118 ssl_engine_io.c --- modules/ssl/ssl_engine_io.c 25 Feb 2004 10:54:29 - 1.118 +++ modules/ssl/ssl_engine_io.c 26 Feb 2004 17:54:33 - @@ -100,6 +100,7 @@ BIO*pbioWrite; ap_filter_t*pInputFilter; ap_filter_t*pOutputFilter; +intnobuffer; /* non-zero to prevent buffering */ } ssl_filter_ctx_t; typedef struct { @@ -193,7 +194,8 @@ */ BIO_clear_retry_flags(bio); -if (!outctx-length (inl + outctx-blen sizeof(outctx-buffer))) { +if (!outctx-length (inl + outctx-blen sizeof(outctx-buffer)) +!outctx-filter_ctx-nobuffer) { /* the first two SSL_writes (of 1024 and 261 bytes) * need to be in the same packet (vec[0].iov_base) */ @@ -1395,6 +1397,22 @@ */ apr_bucket_delete(bucket); } +} +else if (AP_BUCKET_IS_EOC(bucket)) { +/* The special EOC bucket means a shutdown is needed; + * - turn off buffering in bio_filter_out_write + * - issue the SSL_shutdown + */ +filter_ctx-nobuffer = 1; +status = ssl_filter_io_shutdown(filter_ctx, f-c, 0); +if (status != APR_SUCCESS) { +ap_log_error(APLOG_MARK, APLOG_INFO, status, NULL, + SSL filter error shutting down I/O); +} +if ((status = ap_pass_brigade(f-next, bb)) != APR_SUCCESS) { +return status; +} +break; } else { /* filter output */ Index: server/Makefile.in === RCS file: /home/cvs/httpd-2.0/server/Makefile.in,v retrieving revision 1.91 diff -u -r1.91 Makefile.in --- server/Makefile.in 2 Feb 2004 17:04:10 - 1.91 +++ server/Makefile.in 26 Feb 2004 17:54:33 - @@ -13,7 +13,8 @@ connection.c listen.c \ mpm_common.c util_charset.c util_debug.c util_xml.c \ util_filter.c exports.c buildmark.c \ - scoreboard.c error_bucket.c protocol.c core.c request.c provider.c + scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \ + eoc_bucket.c TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp Index: server/connection.c === RCS file: /home/cvs/httpd-2.0/server/connection.c,v retrieving revision 1.114 diff -u -r1.114 connection.c --- connection.c9 Feb 2004 20:40:49 - 1.114 +++ connection.c26 Feb 2004 19:55:49 - @@ -71,8 +71,15 @@ apr_bucket *b; bb = apr_brigade_create(c-pool, c-bucket_alloc); + +/* FLUSH bucket */ b = apr_bucket_flush_create(c-bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); + +/* End Of Connection bucket */ +b = apr_bucket_eoc_create(c-bucket_alloc); +APR_BRIGADE_INSERT_TAIL(bb, b); + ap_pass_brigade(c-output_filters, bb); } Index: server/core.c === RCS file: /home/cvs/httpd-2.0/server/core.c,v retrieving revision 1.261 diff -u -r1.261 core.c ---
RE: [PATCH-Modified-2] SSL not sending close alert message
--On Thursday, February 26, 2004 10:17 AM -0800 Mathihalli, Madhusudan [EMAIL PROTECTED] wrote: ap_flush_conn can just use a single brigade with two buckets, no extra variables needed there, Hmmn.. will that not introduce a mem leak ? I don't think so. Why do you think so? -- justin
Re: (97)Address family not supported by protocol causes disk ticking?
Alexis Huxley wrote: [Mon Feb 16 23:35:33 2004] [warn] (97)Address family not supported by protocol: get socket to connect to listener [Mon Feb 16 23:35:34 2004] [warn] (97)Address family not supported by protocol: get socket to connect to listener Ok, it did it again. Here's the 'strace -p' output: Script started on Wed Feb 25 22:17:44 2004 dione:/tmp# ps fax | grep httpd 2141 pts/7S 0:00 \_ grep httpd 1008 ?S 0:00 /usr/server/opt/apache2/bin/httpd -k start 1009 ?S 0:00 \_ /usr/server/opt/apache2/bin/httpd -k start dione:/tmp# strace -p 1008 Process 1008 attached - interrupt to quit select(0, NULL, NULL, NULL, {0, 62}) = 0 (Timeout) write(6, !, 1)= 1 socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 ENOSYS (Function not implemented) socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 ENOSYS (Function not implemented) socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 EAFNOSUPPORT (Address family not supported by protocol) gettimeofday({1077743877, 15040}, NULL) = 0 write(7, [Wed Feb 25 22:17:57 2004] [warn..., 114) = 114 waitpid(-1, 0xba00, WNOHANG|WUNTRACED) = 0 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout) write(6, !, 1)= 1 socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 ENOSYS (Function not implemented) . ... and so on. I hope that helps. Any ideas? Thanks. hmmm, looks like the httpd parent is trying to shut down a child process gracefully after a decrease in traffic. write(6, !, 1) means it's using the pipe of death. Since waitpid() is returning 0, it looks the child processes aren't responding to the pipe of death. Could it be that network traffic is totally dried up during these periods? or could the child processes be in the middle of some long running request? server-status with ExtendedStatus On would help answer those questions. I'm guessing the series of socket calls after that is where we pretend we are a browser and try to establish dummy connections in an attempt to wake up a potential victim child which could be blocked in accept(). dunno what's wrong with the socket() calls, why they say PF_INET6, or why they come in groups of three. From the ps, it looks like you are using the prefork mpm...is that correct? I'm guessing you hear the disk ticking once a second like clockwork when this happens. I'll post a bug on Saturday either way unless someone suggest otherwise. sure, might as well. Greg