httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apache-1.3/src/main http_main.c
Date Fri, 09 May 2003 19:05:50 GMT
trawick     2003/05/09 12:05:50

  Modified:    src      CHANGES
               src/main http_main.c
  Log:
  Don't block synchronous signals (e.g., SIGSEGV) while waiting for
  and holding a pthread accept mutex.
  
  Reviewed by:	Jim Jagielski, Bill Stoddard
  
  Revision  Changes    Path
  1.1891    +4 -1      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1890
  retrieving revision 1.1891
  diff -u -r1.1890 -r1.1891
  --- CHANGES	5 May 2003 11:45:48 -0000	1.1890
  +++ CHANGES	9 May 2003 19:05:47 -0000	1.1891
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.28
  -  
  +
  +  *) Don't block synchronous signals (e.g., SIGSEGV) while waiting for
  +     and holding a pthread accept mutex.  [Jeff Trawick]
  +
     *) AIX: Change the default accept mechanism from pthread back to
        fcntl.  Idle child cleanup doesn't work when the child selected
        for termination by the parent is waiting on a pthread mutex, and 
  
  
  
  1.603     +44 -0     apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.602
  retrieving revision 1.603
  diff -u -r1.602 -r1.603
  --- http_main.c	25 Apr 2003 13:50:23 -0000	1.602
  +++ http_main.c	9 May 2003 19:05:49 -0000	1.603
  @@ -650,6 +650,49 @@
       accept_mutex = (void *)(caddr_t)-1;
   }
   
  +/* remove_sync_sigs() is from APR 0.9.4
  + *
  + * It is invalid to block synchronous signals, as such signals must
  + * be delivered on the thread that generated the original error
  + * (e.g., invalid storage reference).  Blocking them interferes
  + * with proper recovery.
  + */
  +static void remove_sync_sigs(sigset_t *sig_mask)
  +{
  +#ifdef SIGABRT
  +    sigdelset(sig_mask, SIGABRT);
  +#endif
  +#ifdef SIGBUS
  +    sigdelset(sig_mask, SIGBUS);
  +#endif
  +#ifdef SIGEMT
  +    sigdelset(sig_mask, SIGEMT);
  +#endif
  +#ifdef SIGFPE
  +    sigdelset(sig_mask, SIGFPE);
  +#endif
  +#ifdef SIGILL
  +    sigdelset(sig_mask, SIGILL);
  +#endif
  +#ifdef SIGIOT
  +    sigdelset(sig_mask, SIGIOT);
  +#endif
  +#ifdef SIGPIPE
  +    sigdelset(sig_mask, SIGPIPE);
  +#endif
  +#ifdef SIGSEGV
  +    sigdelset(sig_mask, SIGSEGV);
  +#endif
  +#ifdef SIGSYS
  +    sigdelset(sig_mask, SIGSYS);
  +#endif
  +#ifdef SIGTRAP
  +    sigdelset(sig_mask, SIGTRAP);
  +#endif
  +
  +/* APR logic to remove SIGUSR2 not copied */
  +}
  +
   static void accept_mutex_init_pthread(pool *p)
   {
       pthread_mutexattr_t mattr;
  @@ -689,6 +732,7 @@
       sigdelset(&accept_block_mask, SIGHUP);
       sigdelset(&accept_block_mask, SIGTERM);
       sigdelset(&accept_block_mask, SIGUSR1);
  +    remove_sync_sigs(&accept_block_mask);
       ap_register_cleanup(p, NULL, accept_mutex_cleanup_pthread, ap_null_cleanup);
   }
   
  
  
  

Mime
View raw message