httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r428008 - /httpd/httpd/trunk/server/mpm/winnt/child.c
Date Wed, 02 Aug 2006 14:36:25 GMT
Author: mturk
Date: Wed Aug  2 07:36:24 2006
New Revision: 428008

URL: http://svn.apache.org/viewvc?rev=428008&view=rev
Log:
Fix the assertion if the WaitForMutipleObjects
returns WAIT_ABANDONED_NN instead presumed
WAIT_OBJECT_NN. This will correctly close the thread
handle without using invalid thread handle array index.

Spotted when large balancer timeout was set
and all the threads were busy waiting for the
connection:
[Wed Aug 02 14:29:58 2006] [crit] [Wed Aug 02 14:29:58 2006] file \\build-2.2.2\\server\\mpm\\winnt\\child.c,
line 1120, assertion "(rv >= 0) && (rv < threads_created)" failed

Modified:
    httpd/httpd/trunk/server/mpm/winnt/child.c

Modified: httpd/httpd/trunk/server/mpm/winnt/child.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/child.c?rev=428008&r1=428007&r2=428008&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/child.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/child.c Wed Aug  2 07:36:24 2006
@@ -1120,7 +1120,10 @@
     while (threads_created) {
         rv = wait_for_many_objects(threads_created, child_handles, (DWORD)(end_time - time(NULL)));
         if (rv != WAIT_TIMEOUT) {
-            rv = rv - WAIT_OBJECT_0;
+            if (rv >= WAIT_ABANDONED_0)
+                rv = rv - WAIT_ABANDONED_0;
+            else        
+                rv = rv - WAIT_OBJECT_0;
             ap_assert((rv >= 0) && (rv < threads_created));
             cleanup_thread(child_handles, &threads_created, rv);
             continue;



Mime
View raw message