httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r484792 - in /httpd/httpd/trunk/modules/proxy: mod_proxy_balancer.c mod_proxy_ftp.c proxy_util.c
Date Fri, 08 Dec 2006 21:37:09 GMT
Author: jim
Date: Fri Dec  8 13:37:08 2006
New Revision: 484792

URL: http://svn.apache.org/viewvc?view=rev&rev=484792
Log:
Failure to unlock is very nasty, so log it to help
with troubleshooting.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
    httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?view=diff&rev=484792&r1=484791&r2=484792
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Fri Dec  8 13:37:08 2006
@@ -305,7 +305,10 @@
         return NULL;
 */
 
-    PROXY_THREAD_UNLOCK(balancer);
+    if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
+        "proxy: BALANCER: (%s). Unlock failed for find_best_worker()", balancer->name);
+    }
 
     if (candidate == NULL) {
         /* All the workers are in error state or disabled.
@@ -458,11 +461,19 @@
         ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
                      "proxy: BALANCER: (%s). All workers are in error state for route (%s)",
                      (*balancer)->name, route);
-        PROXY_THREAD_UNLOCK(*balancer);
+        if ((rv = PROXY_THREAD_UNLOCK(*balancer)) != APR_SUCCESS) {
+            ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
+                         "proxy: BALANCER: (%s). Unlock failed for pre_request",
+                         (*balancer)->name);
+        }
         return HTTP_SERVICE_UNAVAILABLE;
     }
 
-    PROXY_THREAD_UNLOCK(*balancer);
+    if ((rv = PROXY_THREAD_UNLOCK(*balancer)) != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
+                     "proxy: BALANCER: (%s). Unlock failed for pre_request",
+                     (*balancer)->name);
+    }
     if (!*worker) {
         runtime = find_best_worker(*balancer, r);
         if (!runtime) {
@@ -535,7 +546,11 @@
     /* TODO: placeholder for post_request actions
      */
 
-    PROXY_THREAD_UNLOCK(balancer);
+    if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
+            "proxy: BALANCER: (%s). Unlock failed for post_request",
+            balancer->name);
+    }
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                  "proxy_balancer_post_request for (%s)", balancer->name);
 

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c?view=diff&rev=484792&r1=484791&r2=484792
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c Fri Dec  8 13:37:08 2006
@@ -916,7 +916,10 @@
                                     address_pool);
     if (worker->is_address_reusable && !worker->cp->addr) {
         worker->cp->addr = connect_addr;
-        PROXY_THREAD_UNLOCK(worker);
+        if ((err = PROXY_THREAD_UNLOCK(worker)) != APR_SUCCESS) {
+            ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server,
+                         "proxy: FTP: unlock");
+        }
     }
     /*
      * get all the possible IP addresses for the destname and loop through

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?view=diff&rev=484792&r1=484791&r2=484792
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Fri Dec  8 13:37:08 2006
@@ -2049,7 +2049,10 @@
                                     conn->port, 0,
                                     worker->cp->pool);
         conn->addr = worker->cp->addr;
-        PROXY_THREAD_UNLOCK(worker);
+        if ((err = PROXY_THREAD_UNLOCK(worker)) != APR_SUCCESS) {
+            ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server,
+                         "proxy: unlock");
+        }
     }
     else {
         conn->addr = worker->cp->addr;



Mime
View raw message