From 68b95b3c24a47b4c0f308539422f3902e313bb10 Mon Sep 17 00:00:00 2001 From: b1v1r Date: Wed, 4 Nov 2009 06:58:50 +0000 Subject: [PATCH] Cleanup mlogc logging and add note recommending against gnutls for SSL/TLS. --- CHANGES | 6 ++++++ apache2/build/find_curl.m4 | 13 +++++++++++++ apache2/configure | 17 +++++++++++++++++ apache2/mlogc-src/mlogc.c | 10 +++++----- 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 6fe50264..e18474ba 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,12 @@ 03 Nov 2009 - 2.5.11 -------------------- + * Added warning during configure if libcurl is found linked against + gnutls for SSL. The openssl lib is recommended as gnutls has + proven to cause issues with mutexes and may crash. + + * Cleanup some mlogc (over)logging. + * Do not log output filter errors in the error log. * Moved output filter to run before other stock filters (mod_deflate, diff --git a/apache2/build/find_curl.m4 b/apache2/build/find_curl.m4 index 119b196c..1e1dcb13 100644 --- a/apache2/build/find_curl.m4 +++ b/apache2/build/find_curl.m4 @@ -70,12 +70,25 @@ if test -n "${curl_path}"; then AC_MSG_NOTICE([NOTE: curl library may be too old: $CURL_VERSION]) fi + dnl # Check/warn if GnuTLS is used + AC_MSG_CHECKING([if libcurl is linked with gnutls]) + curl_uses_gnutls=`echo ${CURL_LIBS} | grep gnutls | wc -l` + if test "$curl_uses_gnutls" -ne 0; then + AC_MSG_RESULT([yes]) + AC_MSG_NOTICE([NOTE: curl linked with gnutls may be buggy, openssl recommended]) + CURL_USES_GNUTLS=yes + else + AC_MSG_RESULT([no]) + CURL_USES_GNUTLS=no + fi + else AC_MSG_RESULT([no]) fi AC_SUBST(CURL_LIBS) AC_SUBST(CURL_CFLAGS) +AC_SUBST(CURL_USES_GNUTLS) if test -z "${CURL_LIBS}"; then AC_MSG_NOTICE([*** curl library not found.]) diff --git a/apache2/configure b/apache2/configure index b4375d77..a8f4f54b 100755 --- a/apache2/configure +++ b/apache2/configure @@ -636,6 +636,7 @@ ac_includes_default="\ #endif" ac_subst_vars='LTLIBOBJS +CURL_USES_GNUTLS CURL_CFLAGS CURL_LIBS LUA_CFLAGS @@ -5982,6 +5983,21 @@ $as_echo "no" >&6; } $as_echo "$as_me: NOTE: curl library may be too old: $CURL_VERSION" >&6;} fi + { $as_echo "$as_me:$LINENO: checking if libcurl is linked with gnutls" >&5 +$as_echo_n "checking if libcurl is linked with gnutls... " >&6; } + curl_uses_gnutls=`echo ${CURL_LIBS} | grep gnutls | wc -l` + if test "$curl_uses_gnutls" -ne 0; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: NOTE: curl linked with gnutls may be buggy, openssl recommended" >&5 +$as_echo "$as_me: NOTE: curl linked with gnutls may be buggy, openssl recommended" >&6;} + CURL_USES_GNUTLS=yes + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CURL_USES_GNUTLS=no + fi + else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } @@ -5990,6 +6006,7 @@ fi + if test -z "${CURL_LIBS}"; then { $as_echo "$as_me:$LINENO: *** curl library not found." >&5 $as_echo "$as_me: *** curl library not found." >&6;} diff --git a/apache2/mlogc-src/mlogc.c b/apache2/mlogc-src/mlogc.c index d78b2d99..c935a62b 100644 --- a/apache2/mlogc-src/mlogc.c +++ b/apache2/mlogc-src/mlogc.c @@ -389,7 +389,7 @@ static void add_entry(const char *data, int start_worker) error_log(LOG_DEBUG, NULL, "Queue locking thread mutex."); if (APR_STATUS_IS_EBUSY(apr_thread_mutex_trylock(mutex))) { - error_log(LOG_WARNING, NULL, "Queue waiting on thread mutex."); + error_log(LOG_DEBUG, NULL, "Queue waiting on thread mutex."); apr_thread_mutex_lock(mutex); } @@ -478,7 +478,7 @@ static void transaction_log_init(void) /* Put a lock in place to ensure exclusivity. */ error_log(LOG_DEBUG, NULL, "Transaction initialization locking global mutex."); if (APR_STATUS_IS_EBUSY(apr_global_mutex_trylock(gmutex))) { - error_log(LOG_WARNING, NULL, "Transaction initialization waiting on global mutex."); + error_log(LOG_DEBUG, NULL, "Transaction initialization waiting on global mutex."); apr_global_mutex_lock(gmutex); } @@ -582,7 +582,7 @@ static void transaction_checkpoint(void) /* Put a lock in place to ensure exclusivity. */ error_log(LOG_DEBUG, NULL, "Checkpoint locking global mutex."); if (APR_STATUS_IS_EBUSY(apr_global_mutex_trylock(gmutex))) { - error_log(LOG_WARNING, NULL, "Checkpoint waiting on global mutex."); + error_log(LOG_DEBUG, NULL, "Checkpoint waiting on global mutex."); apr_global_mutex_lock(gmutex); } @@ -1532,7 +1532,7 @@ static void * APR_THREAD_FUNC thread_worker(apr_thread_t *thread, void *data) error_log(LOG_DEBUG, thread, "Worker shutdown locking thread mutex."); if (APR_STATUS_IS_EBUSY(apr_thread_mutex_trylock(mutex))) { - error_log(LOG_WARNING, thread, "Worker shutdown waiting on thread mutex."); + error_log(LOG_DEBUG, thread, "Worker shutdown waiting on thread mutex."); apr_thread_mutex_lock(mutex); } @@ -1583,7 +1583,7 @@ static void create_new_worker(int lock) if (lock) { error_log(LOG_DEBUG, NULL, "Worker creation locking thread mutex."); if (APR_STATUS_IS_EBUSY(apr_thread_mutex_trylock(mutex))) { - error_log(LOG_WARNING, NULL, "Worker creation waiting on thread mutex."); + error_log(LOG_DEBUG, NULL, "Worker creation waiting on thread mutex."); apr_thread_mutex_lock(mutex); } }