[STATUS] (perl-framework) Wed Feb 20 23:45:52 EST 2002

2002-02-21 Thread Rodent of Unusual Size
httpd-test/perl-framework STATUS:   -*-text-*-
Last modified at [$Date: 2002/02/06 18:57:59 $]

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.

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:


[STATUS] (flood) Wed Feb 20 23:45:48 EST 2002

2002-02-21 Thread Rodent of Unusual Size
flood STATUS:   -*-text-*-
Last modified at [$Date: 2002/01/17 01:09:45 $]

Release:

milestone-04:  In development
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:

* DNS lookup failures in any urllist cause segfault.
   Justin says: Wow.  Why?
   Aaron says: Is this still happening? It's been awhile.

* Misformed URLs cause a segfault. When we fix this we should
  make sure to print out a helpful message when this occurs.
  (This is not something that can be detected with a validating
  XML parser, unfortunately.)

* 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.

Other features that need writing:

* 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.

* 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.

* Migrate all locks to APRs new lock api.

* 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, simple_reports and easy_reports both print
  out the current requesting URI line.

Documentation that needs writing:

* Documentation?  What documentation? RTFS?
Status: Justin volunteers.  He'll probably use Anakia 

mod_unique_id failure mode

2002-02-21 Thread Manoj Kasichainula

apache.org DNS was down today; it's back up now. But when DNS was back
up, we found that the web server was down, and saw this in the error
log:

[Thu Feb 21 00:00:03 2002] [alert] (22007)No address associated with hostname: 
mod_unique_id: unable to find IPv4 address of daedalus.apache.org
Configuration Failed

Should mod_unique_id's failure have prevented the server from parsing
the configuration and restarting? I can see an argument both ways for
this. I guess it depends on whether you think it's more important to
keep the server running, or to be sure that all the features are
working if the server does (re)start.




Re: mod_proxy Cache-Control: no-cache=directive support Apache 1.3

2002-02-21 Thread Joseph Wayne Norton


Igor -

After I read your posting, I downloaded but haven't tried to install
the mod_accel.  From you description, it looks like a very, powerful
module with pretty much the features that I have been looking for.
Can mod_accel work with the mod_rewrite module (in a fashion similar?

In conjunction with mod_rewrite as url filter, I would like to be able
to use mod_accel as a proxy for only the http request portion of a
client request and allow for the http response portion to be served
directly from the backend to the client.  This would be useful in
situations where the response does not (or should not) have to be
cached by the mod_accel cache.  However, I think this type of
tcp-handoff cannot be performed soley by an application process such
as apache.  Have you a similiar requirement or experience?

At Tue, 19 Feb 2002 14:49:44 +0300 (MSK),
Igor Sysoev wrote:

 mod_proxy is very ancient module and it's hard to maintain it.
 

Is it possible to integrate apache 2.0's mod_cache with mod_accel
and/or add mod_accel's features to mod_proxy?

thanks,

- Joe N.




Re: mod_proxy Cache-Control: no-cache=directive support Apache1.3

2002-02-21 Thread Igor Sysoev

On Thu, 21 Feb 2002, Joseph Wayne Norton wrote:

 After I read your posting, I downloaded but haven't tried to install
 the mod_accel.  From you description, it looks like a very, powerful
 module with pretty much the features that I have been looking for.
 Can mod_accel work with the mod_rewrite module (in a fashion similar?

mod_accel can work with mod_rewrite as mod_proxy does ([P] flag)
but mod_proxy would loose this functionality if mod_accel installed.
In all other cases mod_proxy can work with mod_accel in one Apache.

 In conjunction with mod_rewrite as url filter, I would like to be able
 to use mod_accel as a proxy for only the http request portion of a
 client request and allow for the http response portion to be served
 directly from the backend to the client.  This would be useful in
 situations where the response does not (or should not) have to be
 cached by the mod_accel cache.  However, I think this type of
 tcp-handoff cannot be performed soley by an application process such
 as apache.  Have you a similiar requirement or experience?

No.

But mod_accel can simply proxies request without caching.
You can set 'AccelNoCache on' on per-server, per-Location and per-Files
basis. You can send 'X-Accel-Expires: 0' header from backend.
You can use usual 'Cache-Control: no-cache or Expires headers.

With mod_accel your mod_rewite using can be eliminated with
AccelNoPass directive:

AccelPass  /http://backend/
AccelNoPass/images  /download  ~*\.jpg$

 Is it possible to integrate apache 2.0's mod_cache with mod_accel
 and/or add mod_accel's features to mod_proxy?

I have plans to make mod_accel Apache 2.0 compatible but not right now.
I wait Apache 2.0 stabilzation.
As to mod_proxy, I've wrote replacement for mod_proxy because
it's to difficult to hack it. It was much simpler to write module from
scratch.

Igor Sysoev




Re: mod_proxy Cache-Control: no-cache=directive support Apache1.3

2002-02-21 Thread Igor Sysoev

On Thu, 21 Feb 2002, Igor Sysoev wrote:

 On Thu, 21 Feb 2002, Joseph Wayne Norton wrote:
 
  After I read your posting, I downloaded but haven't tried to install
  the mod_accel.  From you description, it looks like a very, powerful
  module with pretty much the features that I have been looking for.
  Can mod_accel work with the mod_rewrite module (in a fashion similar?
 
 mod_accel can work with mod_rewrite as mod_proxy does ([P] flag)
 but mod_proxy would loose this functionality if mod_accel installed.
 In all other cases mod_proxy can work with mod_accel in one Apache.
 
  In conjunction with mod_rewrite as url filter, I would like to be able
  to use mod_accel as a proxy for only the http request portion of a
  client request and allow for the http response portion to be served
  directly from the backend to the client.  This would be useful in
  situations where the response does not (or should not) have to be
  cached by the mod_accel cache.  However, I think this type of
  tcp-handoff cannot be performed soley by an application process such
  as apache.  Have you a similiar requirement or experience?
 
 No.
 
 But mod_accel can simply proxies request without caching.
 You can set 'AccelNoCache on' on per-server, per-Location and per-Files
 basis. You can send 'X-Accel-Expires: 0' header from backend.
 You can use usual 'Cache-Control: no-cache or Expires headers.

Even more. mod_accel by default did not cache response if it
has not positive Expires or Cache-Control headers.
But you can cache these responses using AccelDefaultExpires or
AccelLastModifiedFactor directives.

Igor Sysoev




Warnings on CVS for Darwin...

2002-02-21 Thread Pier Fumagalli

It works, though! :)

/bin/sh /Users/pier/Desktop/httpd-2.0/srclib/apr/libtool --silent
--mode=link cc  -g -O2-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK
-traditional-cpp -DAP_HAVE_DESIGNATED_INITIALIZER   -I.
-I/Users/pier/Desktop/httpd-2.0/os/unix
-I/Users/pier/Desktop/httpd-2.0/server/mpm/worker
-I/Users/pier/Desktop/httpd-2.0/modules/http
-I/Users/pier/Desktop/httpd-2.0/modules/proxy
-I/Users/pier/Desktop/httpd-2.0/include
-I/Users/pier/Desktop/httpd-2.0/srclib/apr/include
-I/Users/pier/Desktop/httpd-2.0/srclib/apr-util/include
-I/Users/pier/Desktop/httpd-2.0/modules/dav/main
-I/Users/pier/Desktop/httpd-2.0/srclib/apr-util/include
-I/Users/pier/Desktop/httpd-2.0/srclib/apr-util/xml/expat/lib
-export-dynamic-o httpd  modules.lo   modules/aaa/mod_access.la
modules/aaa/mod_auth.la modules/filters/mod_include.la
modules/loggers/mod_log_config.la modules/metadata/mod_env.la
modules/metadata/mod_setenvif.la modules/http/mod_http.la
modules/http/mod_mime.la modules/generators/mod_status.la
modules/generators/mod_autoindex.la modules/generators/mod_asis.la
modules/generators/mod_cgid.la modules/mappers/mod_negotiation.la
modules/mappers/mod_dir.la modules/mappers/mod_imap.la
modules/mappers/mod_actions.la modules/mappers/mod_userdir.la
modules/mappers/mod_alias.la modules/mappers/mod_so.la
server/mpm/worker/libworker.la server/libmain.la os/unix/libos.la
/Users/pier/Desktop/httpd-2.0/srclib/pcre/libpcre.la
/Users/pier/Desktop/httpd-2.0/srclib/apr-util/libaprutil.la
/Users/pier/Desktop/httpd-2.0/srclib/apr/libapr.la -lm
/Users/pier/Desktop/httpd-2.0/srclib/apr-util/xml/expat/lib/libexpat.la
/usr/bin/ld: warning multiple definitions of symbol _regcomp
/Users/pier/Desktop/httpd-2.0/srclib/pcre/.libs/libpcre.al(pcreposix.lo)
definition of _regcomp in section (__TEXT,__text)
/usr/lib/libm.dylib(regcomp.o) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/Users/pier/Desktop/httpd-2.0/srclib/pcre/.libs/libpcre.al(pcreposix.lo)
definition of _regexec in section (__TEXT,__text)
/usr/lib/libm.dylib(regexec.o) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/Users/pier/Desktop/httpd-2.0/srclib/pcre/.libs/libpcre.al(pcreposix.lo)
definition of _regfree in section (__TEXT,__text)
/usr/lib/libm.dylib(regfree.o) definition of _regfree
/usr/bin/ld: warning unused multiple definitions of symbol _regerror
/Users/pier/Desktop/httpd-2.0/srclib/pcre/.libs/libpcre.al(pcreposix.lo)
definition of _regerror in section (__TEXT,__text)
/usr/lib/libm.dylib(regerror.o) unused definition of _regerror




gcc 3 and Apache 1.3

2002-02-21 Thread Brian Akins

I was playing around with gcc 3.0.3 this morning, and from some initial 
tests, I got some interesting results.  Just running some benchmarks, it 
appears that Apache uses less memory and I have more CPU idle time.

Has anyone else played with this combination?

-- 
Brian Akins
Systems Engineer III
CNN Internet Technologies



Re: gcc 3 and Apache 1.3

2002-02-21 Thread Jim Jagielski

Under what MPM?

Brian Akins wrote:
 
 I was playing around with gcc 3.0.3 this morning, and from some initial 
 tests, I got some interesting results.  Just running some benchmarks, it 
 appears that Apache uses less memory and I have more CPU idle time.
 
 Has anyone else played with this combination?
 
 -- 
 Brian Akins
 Systems Engineer III
 CNN Internet Technologies
 


-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  A society that will trade a little liberty for a little order
 will lose both and deserve neither - T.Jefferson



Re: gcc 3 and Apache 1.3

2002-02-21 Thread Jim Jagielski

Ignore... Didn't notice the '1.3' in the subj line :)

Jim Jagielski wrote:
 
 Under what MPM?
 
 Brian Akins wrote:
  
  I was playing around with gcc 3.0.3 this morning, and from some initial 
  tests, I got some interesting results.  Just running some benchmarks, it 
  appears that Apache uses less memory and I have more CPU idle time.
  
  Has anyone else played with this combination?
  
  -- 
  Brian Akins
  Systems Engineer III
  CNN Internet Technologies
  
 
 
 -- 
 ===
Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
   A society that will trade a little liberty for a little order
  will lose both and deserve neither - T.Jefferson
 


-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  A society that will trade a little liberty for a little order
 will lose both and deserve neither - T.Jefferson



Re: Warnings on CVS for Darwin...

2002-02-21 Thread Jim Jagielski

Cool... I'm guessing you have a locally modified version of ltconfig?

Pier Fumagalli wrote:
 
 It works, though! :)
 
 /bin/sh /Users/pier/Desktop/httpd-2.0/srclib/apr/libtool --silent
 --mode=link cc  -g -O2-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK
 -traditional-cpp -DAP_HAVE_DESIGNATED_INITIALIZER   -I.
 -I/Users/pier/Desktop/httpd-2.0/os/unix
 -I/Users/pier/Desktop/httpd-2.0/server/mpm/worker
 -I/Users/pier/Desktop/httpd-2.0/modules/http
 -I/Users/pier/Desktop/httpd-2.0/modules/proxy
 -I/Users/pier/Desktop/httpd-2.0/include
 -I/Users/pier/Desktop/httpd-2.0/srclib/apr/include
 -I/Users/pier/Desktop/httpd-2.0/srclib/apr-util/include
 -I/Users/pier/Desktop/httpd-2.0/modules/dav/main
 -I/Users/pier/Desktop/httpd-2.0/srclib/apr-util/include
 -I/Users/pier/Desktop/httpd-2.0/srclib/apr-util/xml/expat/lib
 -export-dynamic-o httpd  modules.lo   modules/aaa/mod_access.la
 modules/aaa/mod_auth.la modules/filters/mod_include.la
 modules/loggers/mod_log_config.la modules/metadata/mod_env.la
 modules/metadata/mod_setenvif.la modules/http/mod_http.la
 modules/http/mod_mime.la modules/generators/mod_status.la
 modules/generators/mod_autoindex.la modules/generators/mod_asis.la
 modules/generators/mod_cgid.la modules/mappers/mod_negotiation.la
 modules/mappers/mod_dir.la modules/mappers/mod_imap.la
 modules/mappers/mod_actions.la modules/mappers/mod_userdir.la
 modules/mappers/mod_alias.la modules/mappers/mod_so.la
 server/mpm/worker/libworker.la server/libmain.la os/unix/libos.la
 /Users/pier/Desktop/httpd-2.0/srclib/pcre/libpcre.la
 /Users/pier/Desktop/httpd-2.0/srclib/apr-util/libaprutil.la
 /Users/pier/Desktop/httpd-2.0/srclib/apr/libapr.la -lm
 /Users/pier/Desktop/httpd-2.0/srclib/apr-util/xml/expat/lib/libexpat.la
 /usr/bin/ld: warning multiple definitions of symbol _regcomp
 /Users/pier/Desktop/httpd-2.0/srclib/pcre/.libs/libpcre.al(pcreposix.lo)
 definition of _regcomp in section (__TEXT,__text)
 /usr/lib/libm.dylib(regcomp.o) definition of _regcomp
 /usr/bin/ld: warning multiple definitions of symbol _regexec
 /Users/pier/Desktop/httpd-2.0/srclib/pcre/.libs/libpcre.al(pcreposix.lo)
 definition of _regexec in section (__TEXT,__text)
 /usr/lib/libm.dylib(regexec.o) definition of _regexec
 /usr/bin/ld: warning multiple definitions of symbol _regfree
 /Users/pier/Desktop/httpd-2.0/srclib/pcre/.libs/libpcre.al(pcreposix.lo)
 definition of _regfree in section (__TEXT,__text)
 /usr/lib/libm.dylib(regfree.o) definition of _regfree
 /usr/bin/ld: warning unused multiple definitions of symbol _regerror
 /Users/pier/Desktop/httpd-2.0/srclib/pcre/.libs/libpcre.al(pcreposix.lo)
 definition of _regerror in section (__TEXT,__text)
 /usr/lib/libm.dylib(regerror.o) unused definition of _regerror
 


-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  A society that will trade a little liberty for a little order
 will lose both and deserve neither - T.Jefferson



Re: Warnings on CVS for Darwin...

2002-02-21 Thread Pier Fumagalli

Jim Jagielski [EMAIL PROTECTED] wrote:

 Cool... I'm guessing you have a locally modified version of ltconfig?

Hmmm... Yeah? NO! :) No, srclib/pcre/ltconfig is _NOT_ modified, it's
straight out of CVS as of now...

Pier




Re: mod_unique_id failure mode

2002-02-21 Thread Aaron Bannert

On Thu, Feb 21, 2002 at 01:03:00AM -0800, Manoj Kasichainula wrote:
 apache.org DNS was down today; it's back up now. But when DNS was back
 up, we found that the web server was down, and saw this in the error
 log:
 
 [Thu Feb 21 00:00:03 2002] [alert] (22007)No address associated with hostname: 
mod_unique_id: unable to find IPv4 address of daedalus.apache.org
 Configuration Failed
 
 Should mod_unique_id's failure have prevented the server from parsing
 the configuration and restarting? I can see an argument both ways for
 this. I guess it depends on whether you think it's more important to
 keep the server running, or to be sure that all the features are
 working if the server does (re)start.

This is just because it was restarted at midnight, right? I would think
that it's ok to fail at configuration time due to DNS failures, but
I also think that DNS failures should _never_ halt a working server
(if there is a choice).

-aaron



opaque_lock and opaque_cntr in mod_auth_digest

2002-02-21 Thread Aaron Bannert

This is probably due to my relative inexperience with mod_auth_digest,
but while I was converting the opaque_lock to the new global lock
type, I noticed that it is only protecting one variable in one place,
and it looks like this:

if (!opaque_cntr) {
return NULL;
}

apr_global_mutex_lock(opaque_lock);
op = (*opaque_cntr)++;
apr_global_mutex_lock(opaque_lock);

As far as I can see this variable is never checked for anything other than
zero/non-zero status other than in the above snippet. (It is initialized
to = 1UL.) If this is the case, I don't see what this variable is used
for, nor the need for the overhead of a second global mutex.

-aaron




Re: cvs commit: httpd-2.0/server core.c

2002-02-21 Thread Cliff Woolley

On 21 Feb 2002 [EMAIL PROTECTED] wrote:

e = apr_bucket_file_create(fd, 0, AP_MAX_SENDFILE, r-pool);
while (fsize  AP_MAX_SENDFILE) {
   -APR_BRIGADE_INSERT_TAIL(bb, e);
   -apr_bucket_copy(e, e);
   +apr_bucket *ce;
   +apr_bucket_copy(e, ce);
   +APR_BRIGADE_INSERT_TAIL(bb, ce);
e-start += AP_MAX_SENDFILE;
fsize -= AP_MAX_SENDFILE;
}

At first I thought this was giving a duplicate copy of the first bucket,
but then I realized that by moving the INSERT call down, you've avoided
that problem.  However, aren't we leaking e?

--Cliff

--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA






Re: Running Apache in the foreground

2002-02-21 Thread Aaron Bannert

On Thu, Dec 27, 2001 at 05:44:22PM -0800, Jos Backus wrote:
 I'm willing to code a patch which allows Apache to run in the foreground in
 its own session. Currently it kills the pgrp it is in even though it didn't
 create it (bad practice imo - only destroy what you create). That is, if there
 is any interest. A previous bugreport in this area was ignored so I may be
 wasting my time. I'll interpret no response as ``no interest, go away''.

Thanks for the original patch! I just committed the last chunk from
the patch I posted last week, so we should be good to go.

-aaron



Re: cvs commit: httpd-2.0/server core.c

2002-02-21 Thread William A. Rowe, Jr.

From: Cliff Woolley [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 12:28 PM


 On 21 Feb 2002 [EMAIL PROTECTED] wrote:
 
 e = apr_bucket_file_create(fd, 0, AP_MAX_SENDFILE, r-pool);
 while (fsize  AP_MAX_SENDFILE) {
-APR_BRIGADE_INSERT_TAIL(bb, e);
-apr_bucket_copy(e, e);
+apr_bucket *ce;
+apr_bucket_copy(e, ce);
+APR_BRIGADE_INSERT_TAIL(bb, ce);
 e-start += AP_MAX_SENDFILE;
 fsize -= AP_MAX_SENDFILE;
 }
 
 At first I thought this was giving a duplicate copy of the first bucket,
 but then I realized that by moving the INSERT call down, you've avoided
 that problem.  However, aren't we leaking e?

No, because e is then is then inserted at the tail after the while {} loop.




Re: Running Apache in the foreground

2002-02-21 Thread Jos Backus

On Thu, Feb 21, 2002 at 10:57:49AM -0800, Aaron Bannert wrote:
 Thanks for the original patch! I just committed the last chunk from
 the patch I posted last week, so we should be good to go.

Heh, I caught the commit in ViewCVS when it was only 66 seconds old :)

Thanks to you, Justin, Michael Handler and all the other people involved in
adding this valuable functionality to an already great webserver! I'm looking
forward to the 2.0 release.

-- 
Jos Backus _/  _/_/_/Santa Clara, CA
  _/  _/   _/
 _/  _/_/_/ 
_/  _/  _/_/
[EMAIL PROTECTED] _/_/   _/_/_/use Std::Disclaimer;



Re: cvs commit: httpd-2.0/server core.c

2002-02-21 Thread Cliff Woolley

On Thu, 21 Feb 2002, Cliff Woolley wrote:

 At first I thought this was giving a duplicate copy of the first bucket,
 but then I realized that by moving the INSERT call down, you've avoided
 that problem.  However, aren't we leaking e?

Oh, I see it.  Nevermind.  Sometimes I wish diff -u would give just a
couple more lines of context.  :(

--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA





Re: Running Apache in the foreground

2002-02-21 Thread Michael Handler

Excellent news, thank you all for your hard work on this!

Now that we have this feature in 2.0, can we also backport it into
the 1.3.* tree, for completeness sake? I've attached a patch for 1.3.23,
which is an updating of my patch for 1.3.22. The patch is also available
at:

http://www.sub-rosa.com/handler/pub/apache-1.3.23-foreground-patch

--michael

Aaron Bannert [EMAIL PROTECTED] writes:

 On Thu, Dec 27, 2001 at 05:44:22PM -0800, Jos Backus wrote:
  I'm willing to code a patch which allows Apache to run in the foreground in
  its own session. Currently it kills the pgrp it is in even though it didn't
  create it (bad practice imo - only destroy what you create). That is, if there
  is any interest. A previous bugreport in this area was ignored so I may be
  wasting my time. I'll interpret no response as ``no interest, go away''.
 
 Thanks for the original patch! I just committed the last chunk from
 the patch I posted last week, so we should be good to go.
 
 -aaron

-- 
[EMAIL PROTECTED] (michael handler)   washington, dc


--- http_main.c.distThu Feb 21 16:57:02 2002
+++ http_main.c Thu Feb 21 17:02:28 2002
@@ -341,6 +341,8 @@
 
 static int one_process = 0;
 
+static int do_detach = 1;
+
 /* set if timeouts are to be handled by the children and not by the parent.
  * i.e. child_timeouts = !standalone || one_process.
  */
@@ -1346,7 +1348,7 @@
 #ifdef WIN32
 fprintf(stderr, Usage: %s [-D name] [-d directory] [-f file] [-n service]\n, 
bin);
 fprintf(stderr,%s [-C \directive\] [-c \directive\] [-k signal]\n, 
pad);
-fprintf(stderr,%s [-v] [-V] [-h] [-l] [-L] [-S] [-t] [-T]\n, pad);
+fprintf(stderr,%s [-v] [-V] [-h] [-l] [-L] [-S] [-t] [-T] [-F]\n, pad);
 #else /* !WIN32 */
 #ifdef SHARED_CORE
 fprintf(stderr, Usage: %s [-R directory] [-D name] [-d directory] [-f file]\n, 
bin);
@@ -1354,7 +1356,7 @@
 fprintf(stderr, Usage: %s [-D name] [-d directory] [-f file]\n, bin);
 #endif
 fprintf(stderr,%s [-C \directive\] [-c \directive\]\n, pad);
-fprintf(stderr,%s [-v] [-V] [-h] [-l] [-L] [-S] [-t] [-T]\n, pad);
+fprintf(stderr,%s [-v] [-V] [-h] [-l] [-L] [-S] [-t] [-T] [-F]\n, pad);
 fprintf(stderr, Options:\n);
 #ifdef SHARED_CORE
 fprintf(stderr,   -R directory : specify an alternate location for shared 
object files\n);
@@ -1376,6 +1378,7 @@
 #endif
 fprintf(stderr,   -t   : run syntax check for config files (with 
docroot check)\n);
 fprintf(stderr,   -T   : run syntax check for config files (without 
docroot check)\n);
+fprintf(stderr,   -F   : run main process in foreground, for process 
+supervisors\n);
 #ifdef WIN32
 fprintf(stderr,   -n name  : name the Apache service for -k options 
below;\n);
 fprintf(stderr,   -k stop|shutdown : tell running Apache to shutdown\n);
@@ -3365,14 +3368,16 @@
 !defined(BONE)
 /* Don't detach for MPE because child processes can't survive the death of
the parent. */
-if ((x = fork())  0)
-   exit(0);
-else if (x == -1) {
-   perror(fork);
-   fprintf(stderr, %s: unable to fork new process\n, ap_server_argv0);
-   exit(1);
+if (do_detach) {
+if ((x = fork())  0)
+exit(0);
+else if (x == -1) {
+perror(fork);
+   fprintf(stderr, %s: unable to fork new process\n, ap_server_argv0);
+   exit(1);
+}
+RAISE_SIGSTOP(DETACH);
 }
-RAISE_SIGSTOP(DETACH);
 #endif
 #ifndef NO_SETSID
 if ((pgrp = setsid()) == -1) {
@@ -5292,7 +5297,7 @@
 ap_setup_prelinked_modules();
 
 while ((c = getopt(argc, argv,
-   D:C:c:xXd:f:vVlLR:StTh
+   D:C:c:xXd:Ff:vVlLR:StTh
 #ifdef DEBUG_SIGSTOP
Z:
 #endif
@@ -5314,6 +5319,9 @@
case 'd':
ap_cpystrn(ap_server_root, optarg, sizeof(ap_server_root));
break;
+   case 'F':
+   do_detach = 0;
+   break;
case 'f':
ap_cpystrn(ap_server_confname, optarg, sizeof(ap_server_confname));
break;
@@ -7190,9 +7198,9 @@
 reparsed = 1;
 }
 
-while ((c = getopt(argc, argv, D:C:c:Xd:f:vVlLz:Z:wiuStThk:n:W:)) != -1) {
+while ((c = getopt(argc, argv, D:C:c:Xd:Ff:vVlLz:Z:wiuStThk:n:W:)) != -1) {
 #else /* !WIN32 */
-while ((c = getopt(argc, argv, D:C:c:Xd:f:vVlLsStTh)) != -1) {
+while ((c = getopt(argc, argv, D:C:c:Xd:Ff:vVlLsStTh)) != -1) {
 #endif
 char **new;
switch (c) {
@@ -7301,6 +7309,9 @@
  ap_server_root[strlen(ap_server_root) - 1] == '/')
 ap_server_root[strlen(ap_server_root) - 1] = '\0';
break;
+   case 'F':
+   do_detach = 0;
+   break;
case 'f':
 ap_cpystrn(ap_server_confname,

Re: has anybody seen worker segfaults?

2002-02-21 Thread Jeff Trawick

Jeff Trawick [EMAIL PROTECTED] writes:

 For some time some (but after 2.0.32), some tests I run have been
 segfaulting around the time of a graceful restart.  Has anybody else
 seen something like this?
 
 [Tue Feb 19 10:31:43 2002] [notice] child pid 5367 exit signal Segmentation fault 
(11)
 [Tue Feb 19 10:31:43 2002] [notice] SIGUSR1 received.  Doing graceful restart
 [Tue Feb 19 10:31:46 2002] [info] mod_unique_id: using ip addr 24.163.40.92
 [Tue Feb 19 10:31:47 2002] [notice] Apache/2.0.33-dev (Unix) DAV/2 configured -- 
resuming normal operations
 [Tue Feb 19 10:31:47 2002] [info] Server built: Feb 19 2002 10:23:24
 [Tue Feb 19 10:31:47 2002] [notice] child pid 5483 exit signal Segmentation fault 
(11)
 [Tue Feb 19 10:31:47 2002] [notice] SIGUSR1 received.  Doing graceful restart
 [Tue Feb 19 10:31:50 2002] [info] mod_unique_id: using ip addr 24.163.40.92
 [Tue Feb 19 10:31:51 2002] [notice] Apache/2.0.33-dev (Unix) DAV/2 configured -- 
resuming normal operations
 [Tue Feb 19 10:31:51 2002] [info] Server built: Feb 19 2002 10:23:24
 [Tue Feb 19 10:31:51 2002] [notice] child pid 5579 exit signal Segmentation fault 
(11)
 [Tue Feb 19 10:31:51 2002] [notice] SIGUSR1 received.  Doing graceful restart

I just tried to hit this on my Solaris x86 box with no luck.  I did
200,000 simple requests with a SIGUSR1 sent to the parent ever 2
seconds.  No segfaults or failed pthread calls, but at the end of the
200,000 requests I had 177 stranded connections (client still waiting
on a response on 177 connections).  I also had 177 connections to the
httpd port in FIN_WAIT_2.  Weird...

-- 
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
   http://www.geocities.com/SiliconValley/Park/9289/
 Born in Roswell... married an alien...



Re: has anybody seen worker segfaults?

2002-02-21 Thread Aaron Bannert

On Thu, Feb 21, 2002 at 06:02:26PM -0500, Jeff Trawick wrote:
 I just tried to hit this on my Solaris x86 box with no luck.  I did
 200,000 simple requests with a SIGUSR1 sent to the parent ever 2
 seconds.  No segfaults or failed pthread calls, but at the end of the
 200,000 requests I had 177 stranded connections (client still waiting
 on a response on 177 connections).  I also had 177 connections to the
 httpd port in FIN_WAIT_2.  Weird...

It is my understanding that FIN_WAIT_2 happens on the client side after
the client does an active close but before the server does a close. If
the server process died I'd expect the OS to send a FIN back to the
client, so perhaps you have child processes that never died off from the
previous generation?  On that theory, you would have 177 connections in
CLOSE_WAIT on the server.

-aaron



[PATCH] TPF-Specific section of http_main.c

2002-02-21 Thread David McCreedy

This patch changes a TPF-specific section of http_main.c to use the
correct subpool when initially opening the error log.
This makes TPF's ap_open_logs call the same as other platforms and
prevents a possible SIGPIPE in standalone_main on TPF.

Please let me know if you have any questions or concerns.

Thank you,

David McCreedy
[EMAIL PROTECTED]



diff -ru3 before/main/http_main.c after/main/http_main.c
--- before/main/http_main.c Thu Feb 21 13:51:19 2002
+++ after/main/http_main.c  Thu Feb 21 13:51:02 2002
@@ -5405,7 +5405,7 @@
 memcpy(tpf_server_name, input_parms.parent.servname,
INETD_SERVNAME_LENGTH);
 tpf_server_name[INETD_SERVNAME_LENGTH + 1] = '\0';
-ap_open_logs(server_conf, pconf);
+ap_open_logs(server_conf, plog);
 ap_tpf_zinet_checks(ap_standalone, tpf_server_name, server_conf);
 }
 if (ap_standalone) {



[patch] better mod_ssl restart handling

2002-02-21 Thread Doug MacEachern

mod_ssl is hardwired only to initialize certain things on the first module 
init during startup. the only reason i can see is because the builtin 
SSLPassPhraseDialog can only read the passphrase from the tty before 
detach.  but if SSLPassPhraseDialog is exec: or the server key is not 
passphrase encrypted, there is no reason not to do a full startup/teardown 
of these things each time on restart.

currently it is not possible to add LoadModule mod_ssl.so to an already
running server (core dumps), nor is it possible to change the server 
cert/key on restart (continues to use the cert/key read at initial 
startup).

patch below makes both possible by removing the init counter and doing a 
full startup/teardown on restarts.  adds a special case when 
SSLPassPhraseDialog is builtin and server has detached, to reuse the 
existing private key for a vhost if the key source file/mtime have not 
changed.

Index: modules/ssl/mod_ssl.h
===
RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.h,v
retrieving revision 1.55
diff -u -r1.55 mod_ssl.h
--- modules/ssl/mod_ssl.h   18 Jan 2002 23:26:46 -  1.55
+++ modules/ssl/mod_ssl.h   22 Feb 2002 03:58:00 -
@@ -462,6 +462,8 @@
 typedef struct {
 long int   nData;
 unsigned char *cpData;
+char  *source_file;
+apr_time_t source_mtime;
 } ssl_asn1_t;
 
 /*
@@ -501,7 +503,6 @@
 pid_t   pid;
 apr_pool_t *pPool;
 BOOLbFixed;
-int nInitCount;
 int nSessionCacheMode;
 char   *szSessionCacheDataFile;
 int nSessionCacheDataSize;
Index: modules/ssl/ssl_engine_config.c
===
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_config.c,v
retrieving revision 1.20
diff -u -r1.20 ssl_engine_config.c
--- modules/ssl/ssl_engine_config.c 29 Nov 2001 06:15:01 -  1.20
+++ modules/ssl/ssl_engine_config.c 22 Feb 2002 03:58:00 -
@@ -90,7 +90,6 @@
 /*
  * initialize per-module configuration
  */
-mc-nInitCount = 0;
 mc-nSessionCacheMode  = SSL_SCMODE_UNSET;
 mc-szSessionCacheDataFile = NULL;
 mc-nSessionCacheDataSize  = 0;
Index: modules/ssl/ssl_engine_init.c
===
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v
retrieving revision 1.25
diff -u -r1.25 ssl_engine_init.c
--- modules/ssl/ssl_engine_init.c   16 Feb 2002 18:35:21 -  1.25
+++ modules/ssl/ssl_engine_init.c   22 Feb 2002 03:58:01 -
@@ -89,8 +89,6 @@
 ssl_config_global_create(s); /* just to avoid problems */
 ssl_config_global_fix(mc);
 
-mc-nInitCount++;
-
 /*
  *  try to fix the configuration and open the dedicated SSL
  *  logfile as early as possible
@@ -121,78 +119,22 @@
 /*
  * Identification
  */
-if (mc-nInitCount == 1) {
-ssl_log(s, SSL_LOG_INFO, Server: %s, Interface: %s, Library: %s,
-AP_SERVER_BASEVERSION,
-ssl_var_lookup(p, s, NULL, NULL, SSL_VERSION_INTERFACE),
-ssl_var_lookup(p, s, NULL, NULL, SSL_VERSION_LIBRARY));
-}
-
-/*
- * Initialization round information
- */
-if (mc-nInitCount == 1)
-ssl_log(s, SSL_LOG_INFO, Init: 1st startup round (still not detached));
-else if (mc-nInitCount == 2)
-ssl_log(s, SSL_LOG_INFO, Init: 2nd startup round (already detached));
-else
-ssl_log(s, SSL_LOG_INFO, Init: %d%s restart round (already detached),
-mc-nInitCount-2, (mc-nInitCount-2) == 1 ? st : nd);
+ssl_log(s, SSL_LOG_INFO, Server: %s, Interface: %s, Library: %s,
+AP_SERVER_BASEVERSION,
+ssl_var_lookup(p, s, NULL, NULL, SSL_VERSION_INTERFACE),
+ssl_var_lookup(p, s, NULL, NULL, SSL_VERSION_LIBRARY));
 
-/*
- *  The initialization phase inside the Apache API is totally bogus.
- *  We actually have three non-trivial problems:
- *
- *  1. Under Unix the API does a 2-round initialization of modules while
- * under Win32 it doesn't. This means we have to make sure that at
- * least the pass phrase dialog doesn't occur twice.  We overcome this
- * problem by using a counter (mc-nInitCount) which has to
- * survive the init rounds.
- *
- *  2. Between the first and the second round Apache detaches from
- * the terminal under Unix. This means that our pass phrase dialog
- * _has_ to be done in the first round and _cannot_ be done in the
- * second round.
- *
- *  3. When Dynamic Shared Object (DSO) mechanism is used under Unix the
- * module segment (code  data) gets unloaded and re-loaded between
- * the first and the second round. This means no global data survives
- *