httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/worker worker.c
Date Sat, 08 Dec 2001 01:38:05 GMT
jerenkrantz    01/12/07 17:38:05

  Modified:    .        STATUS CHANGES
               server   listen.c
               server/mpm/worker worker.c
  Log:
  Fix segfault when restarting worker MPM.  We can not examine the POD as
  a normal listener.
  
  There was an additional bug than what Ian submitted to fix listen.c
  (i.e. check sa for null): make_pipe_of_death does not zero out
  lr->bind_addr (since it uses apr_palloc).  So, on Solaris, the first
  time through, bind_addr was probably 0, but the second time, not (pools!).
  (This caused Aaron's analysis that the patch worked the first time,
  but not the second time.)
  
  Submitted by:	Ian Holsman
  Reviewed by:	Justin Erenkrantz, Aaron Bannert
  
  Revision  Changes    Path
  1.353     +1 -7      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.352
  retrieving revision 1.353
  diff -u -r1.352 -r1.353
  --- STATUS	2001/12/07 18:10:25	1.352
  +++ STATUS	2001/12/08 01:38:04	1.353
  @@ -1,5 +1,5 @@
   APACHE 2.0 STATUS:						-*-text-*-
  -Last modified at [$Date: 2001/12/07 18:10:25 $]
  +Last modified at [$Date: 2001/12/08 01:38:04 $]
   
   Release:
   
  @@ -91,12 +91,6 @@
         ap_hook_error_log (or other missing functions -- if there are
         any) to segfault on AIX and can probably cause load or other
         errors on some other platforms.
  -
  -    * Sending httpd a SIGHUP with worker MPM causes a segfault 
  -      when we started as root and switch to a different user.
  -        Aaron Says: I've only been able to reproduce this on
  -                    Solaris, works fine for Linux. Also, it appears
  -                    to be happening in the parent.
   
   RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
   
  
  
  
  1.472     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.471
  retrieving revision 1.472
  diff -u -r1.471 -r1.472
  --- CHANGES	2001/12/07 19:06:58	1.471
  +++ CHANGES	2001/12/08 01:38:04	1.472
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.30-dev
   
  +  *) Fix segfault when worker MPM receives SIGHUP.
  +     [Ian Holsman, Aaron Bannert, Justin Erenkrantz]
  +
     *) Fix bug that could potentially prevent the perchild MPM from
        working with more than one vhost/uid.  [Aaron Bannert]
   
  
  
  
  1.66      +12 -9     httpd-2.0/server/listen.c
  
  Index: listen.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/listen.c,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- listen.c	2001/12/08 01:22:00	1.65
  +++ listen.c	2001/12/08 01:38:05	1.66
  @@ -237,15 +237,18 @@
       /* see if we've got an old listener for this address:port */
       for (walk = &old_listeners; *walk; walk = &(*walk)->next) {
           sa = (*walk)->bind_addr;
  -        apr_sockaddr_port_get(&oldport, sa);
  -        apr_sockaddr_ip_get(&oldaddr, sa);
  -        if (!strcmp(oldaddr, addr) && port == oldport) {
  -            /* re-use existing record */
  -            new = *walk;
  -            *walk = new->next;
  -            new->next = ap_listeners;
  -            ap_listeners = new;
  -            return;
  +        /* Some listeners are not real so they will not have a bind_addr. */
  +        if (sa) {
  +            apr_sockaddr_port_get(&oldport, sa);
  +            apr_sockaddr_ip_get(&oldaddr, sa);
  +            if (!strcmp(oldaddr, addr) && port == oldport) {
  +                /* re-use existing record */
  +                new = *walk;
  +                *walk = new->next;
  +                new->next = ap_listeners;
  +                ap_listeners = new;
  +                return;
  +            }
           }
       }
   
  
  
  
  1.44      +2 -0      httpd-2.0/server/mpm/worker/worker.c
  
  Index: worker.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/worker/worker.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- worker.c	2001/11/22 05:13:29	1.43
  +++ worker.c	2001/12/08 01:38:05	1.44
  @@ -1269,6 +1269,8 @@
       lr->sd = sd;
       lr->active = 1;
       lr->accept_func = check_pipe_of_death;
  +    /* We are not bound to a real address.  So, indicate that. */
  +    lr->bind_addr = 0;
       lr->next = ap_listeners;
       ap_listeners = lr;
       (*num_listeners)++;
  
  
  

Mime
View raw message