httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/worker worker.c
Date Wed, 20 Mar 2002 03:38:07 GMT
trawick     02/03/19 19:38:07

  Modified:    server/mpm/worker worker.c
  Log:
  get the start thread to exit when we have reached termination but
  it is still trying to create worker threads
  
  previously, after a non-graceful restart followed by a terminate
  you could see a bunch of log messages showing the parent repeatedly
  sending SIGTERM and finally SIGKILL to one or more children...
  with this change, the sequence of messages should stop very soon
  
  add a comment to start_threads() describing a current problem
  
  Revision  Changes    Path
  1.92      +12 -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.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- worker.c	19 Mar 2002 22:09:26 -0000	1.91
  +++ worker.c	20 Mar 2002 03:38:07 -0000	1.92
  @@ -792,6 +792,15 @@
       return 0;
   }
   
  +/* XXX unfortunate issue:
  + *     with apachectl restart (not graceful), previous generation dies
  + *     abruptly with no chance to clean up scoreboard entries; when new
  + *     generation is started, processes can loop forever in start_threads()
  + *     waiting for scoreboard entries for threads of prior generation to
  + *     get cleaned up...  but it will never happen and the new generation
  + *     child looping here, waiting for scoreboard to get cleaned up, is
  + *     wasted
  + */
   static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy)
   {
       thread_starter *ts = dummy;
  @@ -914,6 +923,9 @@
   {
       apr_status_t rv, thread_rv;
   
  +    workers_may_exit = 1; /* start thread may not want to exit until this
  +                           * is set
  +                           */
       rv = apr_thread_join(&thread_rv, start_thread_id);
       if (rv != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
  
  
  

Mime
View raw message