You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <je...@ebuilt.com> on 2001/10/13 19:44:50 UTC

2.0.26 tag?

I think it's time for a tag.  The input filtering changes should be
settled down now and completed AFAIK.  (There are some minor things I'd
like to improve though.)  We've done lots of work since 2.0.25, so I 
think the time is right to get feedback from our user community.

I'm running current CVS snapshots on two production sites now, so
I believe the tree has a reasonable degree of stability.

And, yes, I volunteer to be RM.  =)  

Any major complaints or showstoppers that can be addressed in a short
timeframe (i.e. a week)?  -- justin


Re: 2.0.26 tag?

Posted by Jeff Trawick <tr...@attglobal.net>.
Justin Erenkrantz <je...@ebuilt.com> writes:

> Any major complaints or showstoppers that can be addressed in a short
> timeframe (i.e. a week)?  -- justin

I really think that the apr_proc_wait[_all_procs]() issue needs to be
resolved.  When Apache can't tell if/how a child went away, it isn't
able to log segfaults and maybe even the scoreboard isn't maintained
properly.

I just submitted a patch to (hopefully) fix this on the APR list.
Maybe somebody can think of a better way to transmit the information,
or at least think up better names for identifiers.

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: 2.0.26 tag?

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
I believe we must hold till httpd-test passing with flying colors.

There are still a few bits of breakage that may be related to my recent
dir_walk changes, I'm working through those but still appreciate any hints
or observations.

I have a number of changes in the build system I'm working on that should 
not (but could) break other platforms.  I'll postpone any commits in
that area till post-2.0.26 so folks can spend an entire revision cycle 
pointing out the errors of my ways ;)

My last change is code I've been messing with in mod_win32, which needs
to get committed before the next tag.  I expect to finish this weekend.

Bill

----- Original Message ----- 
From: "Justin Erenkrantz" <je...@ebuilt.com>
To: <de...@httpd.apache.org>
Sent: Saturday, October 13, 2001 12:44 PM
Subject: 2.0.26 tag?


> I think it's time for a tag.  The input filtering changes should be
> settled down now and completed AFAIK.  (There are some minor things I'd
> like to improve though.)  We've done lots of work since 2.0.25, so I 
> think the time is right to get feedback from our user community.
> 
> I'm running current CVS snapshots on two production sites now, so
> I believe the tree has a reasonable degree of stability.
> 
> And, yes, I volunteer to be RM.  =)  
> 
> Any major complaints or showstoppers that can be addressed in a short
> timeframe (i.e. a week)?  -- justin



[PATCH] Re: 2.0.26 tag?

Posted by Jeff Trawick <tr...@attglobal.net>.
"Bill Stoddard" <bi...@wstoddard.com> writes:

> Since you are not running as root, the listen on port 80 will fail as expected.  We should
> maintain the apache 1.3 behaviour in this case. That is, if the server fails to listen on
> any of the configured ports, the server should log the error then exit.

That's easy enough.

FYI...  We're picking up an additional log w.r.t. 1.3:

  [Tue Oct 16 09:44:36 2001] [alert] no listening sockets available, shutting down

Is anybody opposed to bailing out if any of the configured listening
sockets can't be set up?

Index: server/listen.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/listen.c,v
retrieving revision 1.62
diff -u -r1.62 listen.c
--- server/listen.c	2001/10/04 20:00:53	1.62
+++ server/listen.c	2001/10/16 13:41:42
@@ -287,6 +287,10 @@
 		++num_open;
 		lr->active = 1;
 	    }
+            else {
+                /* fatal error */
+                return -1;
+            }
 	}
     }
 
Index: server/mpm/prefork/prefork.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/mpm/prefork/prefork.c,v
retrieving revision 1.203
diff -u -r1.203 prefork.c
--- server/mpm/prefork/prefork.c	2001/10/11 16:28:23	1.203
+++ server/mpm/prefork/prefork.c	2001/10/16 13:41:43
@@ -663,14 +663,12 @@
 		}
 		first_lr=lr;
 		do {
-                    if (lr->active) {
-                        apr_os_sock_get(&sockdes, lr->sd);
-		        if (FD_ISSET(sockdes, &main_fds))
-			    goto got_listener;
-                        lr = lr->next;
-                        if (!lr)
-                            lr = ap_listeners;
-                    }
+                    apr_os_sock_get(&sockdes, lr->sd);
+                    if (FD_ISSET(sockdes, &main_fds))
+                        goto got_listener;
+                    lr = lr->next;
+                    if (!lr)
+                        lr = ap_listeners;
 		}
 		while (lr != first_lr);
 		/* FIXME: if we get here, something bad has happened, and we're
@@ -1090,12 +1088,10 @@
     listenmaxfd = -1;
     FD_ZERO(&listenfds);
     for (lr = ap_listeners; lr; lr = lr->next) {
-        if (lr->active) {
-            apr_os_sock_get(&sockdes, lr->sd);
-            FD_SET(sockdes, &listenfds);
-            if (sockdes > listenmaxfd) {
-                listenmaxfd = sockdes;
-            }
+        apr_os_sock_get(&sockdes, lr->sd);
+        FD_SET(sockdes, &listenfds);
+        if (sockdes > listenmaxfd) {
+            listenmaxfd = sockdes;
         }
     }
     return 0;

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: 2.0.26 tag?

Posted by Bill Stoddard <bi...@wstoddard.com>.
Since you are not running as root, the listen on port 80 will fail as expected.  We should
maintain the apache 1.3 behaviour in this case. That is, if the server fails to listen on
any of the configured ports, the server should log the error then exit.

Bill

----- Original Message -----
From: "Greg Ames" <gr...@remulak.net>
To: <de...@httpd.apache.org>
Sent: Monday, October 15, 2001 2:04 PM
Subject: Re: 2.0.26 tag?


> Justin Erenkrantz wrote:
>
> > Any major complaints or showstoppers that can be addressed in a short
> > timeframe (i.e. a week)?  -- justin
>
> I'm seeing a loop in child_main in prefork issuing selects() if I run
> the server as me (not root) with
>
> Listen 80
> Listen 8092
>
> in my config.  It works fine as root.
>
> I suspect this has something to do with the change that keeps
> ap_listen_rec's with active == 0 around, but haven't found the bug yet.
> We may want to just keep a clean version of the ap_listeners list on
> general principles, and hang the inactive guys somewhere else.
>
> Greg
>


[PATCH] Re: 2.0.26 tag?

Posted by Jeff Trawick <tr...@attglobal.net>.
Greg Ames <gr...@remulak.net> writes:

> Justin Erenkrantz wrote:
> 
> > Any major complaints or showstoppers that can be addressed in a short
> > timeframe (i.e. a week)?  -- justin
> 
> I'm seeing a loop in child_main in prefork issuing selects() if I run
> the server as me (not root) with 
> 
> Listen 80
> Listen 8092
> 
> in my config.  It works fine as root.  
> 
> I suspect this has something to do with the change that keeps
> ap_listen_rec's with active == 0 around, but haven't found the bug yet. 
> We may want to just keep a clean version of the ap_listeners list on
> general principles, and hang the inactive guys somewhere else.

Here is a patch to keep inactive ap_listen_recs out of the
ap_listeners list, but

1) I didn't implement a list of broken recs to keep the storage around
   (useful, but bigger problems to solve right now)

2) there is some bogosity going on w.r.t. file descriptor 2, most
   likely related to its use as stderr

   In testing this patch, I had "listen 80" and "listen 8080", started
   as non-root.  When I send the parent SIGHUP and the config is
   processed again, file descriptor 2 is not in use at the time
   socket() is called so I get file descriptor 2 for the socket
   associated with the ap_listen_rec for "listen 80."  By the time
   make_sock() is called, somebody has rightfully changed 2 to point
   to the error log.

   2 should be /dev/null or otherwise be open during config processing
   to prevent files opened during config processing from getting
   invalid descriptors.

Anyway...

Index: server/listen.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/listen.c,v
retrieving revision 1.62
diff -u -r1.62 listen.c
--- server/listen.c	2001/10/04 20:00:53	1.62
+++ server/listen.c	2001/10/15 19:04:40
@@ -270,7 +270,7 @@
 {
     apr_pool_t *pconf = process->pconf;
     ap_listen_rec *lr;
-    ap_listen_rec *next;
+    ap_listen_rec *next, *prev;
     int num_open;
 
     /* Don't allocate a default listener.  If we need to listen to a
@@ -278,7 +278,7 @@
      * config file.
      */
     num_open = 0;
-    for (lr = ap_listeners; lr; lr = lr->next) {
+    for (lr = ap_listeners, prev = NULL; lr; prev = lr, lr = lr->next) {
 	if (lr->active) {
 	    ++num_open;
 	}
@@ -287,6 +287,26 @@
 		++num_open;
 		lr->active = 1;
 	    }
+            else {
+                /* prune this ap_listen_rec out of the list; it is broken
+                 * now, since make_sock() failed and the socket is closed;
+                 * also, it sucks to have inactive sockets in the 
+                 * ap_listeners list since that causes problems for the
+                 * MPMs
+                 */
+                if (prev) {
+                    prev->next = lr->next;
+                }
+                else {
+                    AP_DEBUG_ASSERT(lr == ap_listeners);
+                    ap_listeners = ap_listeners->next;
+                }
+                /* XXX if you wanna avoid a leak across restarts of broken 
+                 * ap_listen_recs, add lr to a list we'll consult next time
+                 * we process the config; note that the socket in lr has
+                 * been closed
+                 */
+            }
 	}
     }
 
Index: server/mpm/prefork/prefork.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
retrieving revision 1.203
diff -u -r1.203 prefork.c
--- server/mpm/prefork/prefork.c	2001/10/11 16:28:23	1.203
+++ server/mpm/prefork/prefork.c	2001/10/15 19:04:52
@@ -663,14 +663,12 @@
 		}
 		first_lr=lr;
 		do {
-                    if (lr->active) {
-                        apr_os_sock_get(&sockdes, lr->sd);
-		        if (FD_ISSET(sockdes, &main_fds))
-			    goto got_listener;
-                        lr = lr->next;
-                        if (!lr)
-                            lr = ap_listeners;
-                    }
+                    apr_os_sock_get(&sockdes, lr->sd);
+                    if (FD_ISSET(sockdes, &main_fds))
+                        goto got_listener;
+                    lr = lr->next;
+                    if (!lr)
+                        lr = ap_listeners;
 		}
 		while (lr != first_lr);
 		/* FIXME: if we get here, something bad has happened, and we're
@@ -1090,12 +1088,10 @@
     listenmaxfd = -1;
     FD_ZERO(&listenfds);
     for (lr = ap_listeners; lr; lr = lr->next) {
-        if (lr->active) {
-            apr_os_sock_get(&sockdes, lr->sd);
-            FD_SET(sockdes, &listenfds);
-            if (sockdes > listenmaxfd) {
-                listenmaxfd = sockdes;
-            }
+        apr_os_sock_get(&sockdes, lr->sd);
+        FD_SET(sockdes, &listenfds);
+        if (sockdes > listenmaxfd) {
+            listenmaxfd = sockdes;
         }
     }
     return 0;


-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: 2.0.26 tag?

Posted by Greg Ames <gr...@remulak.net>.
Justin Erenkrantz wrote:

> Any major complaints or showstoppers that can be addressed in a short
> timeframe (i.e. a week)?  -- justin

I'm seeing a loop in child_main in prefork issuing selects() if I run
the server as me (not root) with 

Listen 80
Listen 8092

in my config.  It works fine as root.  

I suspect this has something to do with the change that keeps
ap_listen_rec's with active == 0 around, but haven't found the bug yet. 
We may want to just keep a clean version of the ap_listeners list on
general principles, and hang the inactive guys somewhere else.

Greg

Re: 2.0.26 tag?

Posted by Zvi Har'El <rl...@math.technion.ac.il>.
On Sun, 14 Oct 2001, Justin Erenkrantz wrote:

> On Sun, Oct 14, 2001 at 10:00:51AM +0200, Zvi Har'El wrote:
> > On Sat, 13 Oct 2001, Justin Erenkrantz wrote:
> >
> > > I think it's time for a tag.  The input filtering changes should be
> > > settled down now and completed AFAIK.  (There are some minor things I'd
> > > like to improve though.)  We've done lots of work since 2.0.25, so I
> > > think the time is right to get feedback from our user community.
> >
> > As I reported earlier, the reverse proxy doesn't produce the correct chunked
> > encoding:
>
> *Sigh*
>
> We were bypassing some tests in ap_set_keepalive since we left
> TE: chunked in the output headers.  Should be fixed now.
>
> Please let me know if it's not.  -- justin
>
It is really OK now -- both reverse proxy and ssl work! Thanks.

-- 
Dr. Zvi Har'El     mailto:rl@math.technion.ac.il     Department of Mathematics
tel:+972-54-227607                   Technion - Israel Institute of Technology
fax:+972-4-8324654 http://www.math.technion.ac.il/~rl/     Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)
                              Sunday, 28 Tishri 5762, 14 October 2001, 11:53PM


Re: 2.0.26 tag?

Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Sun, Oct 14, 2001 at 10:00:51AM +0200, Zvi Har'El wrote:
> On Sat, 13 Oct 2001, Justin Erenkrantz wrote:
> 
> > I think it's time for a tag.  The input filtering changes should be
> > settled down now and completed AFAIK.  (There are some minor things I'd
> > like to improve though.)  We've done lots of work since 2.0.25, so I
> > think the time is right to get feedback from our user community.
> 
> As I reported earlier, the reverse proxy doesn't produce the correct chunked
> encoding:

*Sigh*  

We were bypassing some tests in ap_set_keepalive since we left 
TE: chunked in the output headers.  Should be fixed now.  

Please let me know if it's not.  -- justin


Re: 2.0.26 tag?

Posted by Zvi Har'El <rl...@math.technion.ac.il>.
On Sat, 13 Oct 2001, Justin Erenkrantz wrote:

> I think it's time for a tag.  The input filtering changes should be
> settled down now and completed AFAIK.  (There are some minor things I'd
> like to improve though.)  We've done lots of work since 2.0.25, so I
> think the time is right to get feedback from our user community.

As I reported earlier, the reverse proxy doesn't produce the correct chunked
encoding:

~$ curl --verbose -i http://localhost:8080/mirror/
* Connected to localhost (127.0.0.1)
> GET /mirror/ HTTP/1.1
User-Agent: curl/7.9 (i386-redhat-linux-gnu) libcurl 7.9 (OpenSSL 0.9.6)
Host: localhost:8080
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

HTTP/1.1 200 OK
Date: Sun, 14 Oct 2001 07:55:30 GMT
Server: Apache/2.0.26-dev (Unix) mod_ssl/3.0a0 OpenSSL/0.9.6
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1
Via: 1.1 localhost:80 (Apache/2.0.26-dev)

curl: (26) Receeived problem in the chunky parser
* Closing live connection (#0)


Recall, localhost:8080/mirror/ just mirrors localhost:80, an apache 1.3.19
server. The problem was analysed and reported as a missing byte count before
the chunk. This is with the current (as of 5 minutes ago) snapshot.

>
> I'm running current CVS snapshots on two production sites now, so
> I believe the tree has a reasonable degree of stability.
>
> And, yes, I volunteer to be RM.  =)
>
> Any major complaints or showstoppers that can be addressed in a short
> timeframe (i.e. a week)?  -- justin
>

-- 
Dr. Zvi Har'El     mailto:rl@math.technion.ac.il     Department of Mathematics
tel:+972-54-227607                   Technion - Israel Institute of Technology
fax:+972-4-8324654 http://www.math.technion.ac.il/~rl/     Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)
                              Sunday, 27 Tishri 5762, 14 October 2001,  9:55AM