You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by gr...@apache.org on 2001/08/08 00:28:51 UTC

cvs commit: httpd-2.0/server/mpm/threaded threaded.c

gregames    01/08/07 15:28:51

  Modified:    server   scoreboard.c
               server/mpm/threaded threaded.c
  Log:
  clean up the scoreboard properly after threaded processes die gracefully.
  
  find_child_by_pid() failed to do its job, because ap_max_daemons_used was
  too low.  There was some recent breakage in threaded that contributes to
  the problem.
  
  However, find_child_by_pid() should not be using the current number of
  daemons.  It could have been recently reduced, which makes it fail to
  find the exiting process.
  
  Revision  Changes    Path
  1.33      +1 -1      httpd-2.0/server/scoreboard.c
  
  Index: scoreboard.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/scoreboard.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- scoreboard.c	2001/07/31 20:46:06	1.32
  +++ scoreboard.c	2001/08/07 22:28:51	1.33
  @@ -266,7 +266,7 @@
       int i;
       int max_daemons_limit;
   
  -    ap_mpm_query(AP_MPMQ_MAX_DAEMON_USED, &max_daemons_limit);
  +    ap_mpm_query(AP_MPMQ_MAX_DAEMONS, &max_daemons_limit);
   
       for (i = 0; i < max_daemons_limit; ++i)
   	if (ap_scoreboard_image->parent[i].pid == pid->pid)
  
  
  
  1.56      +3 -1      httpd-2.0/server/mpm/threaded/threaded.c
  
  Index: threaded.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/threaded/threaded.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- threaded.c	2001/08/05 18:08:49	1.55
  +++ threaded.c	2001/08/07 22:28:51	1.56
  @@ -1047,9 +1047,11 @@
               }
   	    ++free_length;
   	}
  +        if (!all_dead_threads) {
  +            last_non_dead = i; 
  +        }
           /* XXX if (!ps->quiescing)     is probably more reliable  GLA */
   	if (!any_dying_threads) {
  -            last_non_dead = i;
               ++total_non_dead;
           }
       }