[nginx] svn commit: r4797 - in branches/stable-1.2: . src/os/win32

mdounin at mdounin.ru mdounin at mdounin.ru
Mon Aug 6 16:24:23 UTC 2012


Author: mdounin
Date: 2012-08-06 16:24:22 +0000 (Mon, 06 Aug 2012)
New Revision: 4797
URL: http://trac.nginx.org/nginx/changeset/4797/nginx

Log:
Merge of r4758: win32: fixed cpu hog after process startup failure.

If ngx_spawn_process() failed while starting a process, the handle of a
handle of a processes was closed but left non-NULL in the ngx_processes[]
array.  The handle later was used in WaitForMultipleObjects() (if there
were multiple worker processes configured and at least one worker process
was started successfully), resulting in infinite loop.

Reported by Ricardo Villalobos Guevara:
http://mailman.nginx.org/pipermail/nginx-devel/2012-July/002494.html


Modified:
   branches/stable-1.2/
   branches/stable-1.2/src/os/win32/ngx_process.c

Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2	2012-08-06 16:19:35 UTC (rev 4796)
+++ branches/stable-1.2	2012-08-06 16:24:22 UTC (rev 4797)

Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4738,4740-4741,4754,4756-4757
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4738,4740-4741,4754,4756-4758
\ No newline at end of property
Modified: branches/stable-1.2/src/os/win32/ngx_process.c
===================================================================
--- branches/stable-1.2/src/os/win32/ngx_process.c	2012-08-06 16:19:35 UTC (rev 4796)
+++ branches/stable-1.2/src/os/win32/ngx_process.c	2012-08-06 16:24:22 UTC (rev 4797)
@@ -196,6 +196,7 @@
 
     if (ngx_processes[s].handle) {
         ngx_close_handle(ngx_processes[s].handle);
+        ngx_processes[s].handle = NULL;
     }
 
     return NGX_INVALID_PID;



More information about the nginx-devel mailing list