From: Jeff Trawick Date: Tue, 5 Mar 2002 21:18:07 +0000 (+0000) Subject: failures on the accept mutex are common at restart time, so be smart X-Git-Tag: 2.0.33~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04bde59aaf72704df99589abfba1b17eee71ab06;p=thirdparty%2Fapache%2Fhttpd.git failures on the accept mutex are common at restart time, so be smart about the log level and use APLOG_DEBUG if we're restarting git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93720 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 28fb275f189..1cb2d626999 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -622,7 +622,13 @@ static void *listener_thread(apr_thread_t *thd, void * dummy) if ((rv = SAFE_ACCEPT(apr_proc_mutex_lock(accept_mutex))) != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, + int level = APLOG_EMERG; + + if (ap_scoreboard_image->parent[process_slot].generation != + ap_scoreboard_image->global->running_generation) { + level = APLOG_DEBUG; /* common to get these at restart time */ + } + ap_log_error(APLOG_MARK, level, rv, ap_server_conf, "apr_proc_mutex_lock failed. Attempting to shutdown " "process gracefully."); signal_workers(); @@ -694,7 +700,13 @@ static void *listener_thread(apr_thread_t *thd, void * dummy) } if ((rv = SAFE_ACCEPT(apr_proc_mutex_unlock(accept_mutex))) != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, + int level = APLOG_EMERG; + + if (ap_scoreboard_image->parent[process_slot].generation != + ap_scoreboard_image->global->running_generation) { + level = APLOG_DEBUG; /* common to get these at restart time */ + } + ap_log_error(APLOG_MARK, level, rv, ap_server_conf, "apr_proc_mutex_unlock failed. Attempting to " "shutdown process gracefully."); signal_workers();