From: Jeff Trawick Date: Thu, 21 Mar 2002 03:40:23 +0000 (+0000) Subject: don't log a failure of ap_queue_pop() at termination; it is X-Git-Tag: 2.0.34~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ffc63f688d7a6e59b245d6cff031c258834b027;p=thirdparty%2Fapache%2Fhttpd.git don't log a failure of ap_queue_pop() at termination; it is expected git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94068 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 90aab59971e..3a33e7bf600 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -797,6 +797,13 @@ static void *listener_thread(apr_thread_t *thd, void * dummy) return NULL; } +/* XXX For ungraceful termination/restart, we definitely don't want to + * wait for active connections to finish but we may want to wait + * for idle workers to get out of the queue code and release mutexes, + * since those mutexes are cleaned up pretty soon and some systems + * may not react favorably (i.e., segfault) if operations are attempted + * on cleaned-up mutexes. + */ static void * APR_THREAD_FUNC worker_thread(apr_thread_t *thd, void * dummy) { proc_info * ti = dummy; @@ -820,8 +827,14 @@ static void * APR_THREAD_FUNC worker_thread(apr_thread_t *thd, void * dummy) * from an explicit call to ap_queue_interrupt_all(). This allows * us to unblock threads stuck in ap_queue_pop() when a shutdown * is pending. + * + * If workers_may_exit is set and this is ungraceful termination/ + * restart, we are bound to get an error on some systems (e.g., + * AIX, which sanity-checks mutex operations) since the queue + * may have already been cleaned up. Don't log the "error" if + * workers_may_exit is set. */ - if (rv != APR_EINTR) { + if (rv != APR_EINTR && !workers_may_exit) { ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, "ap_queue_pop failed"); }