Welcome! Log In Create A New Profile

Advanced

Re: Possible cause and solution of 100% cpu and massive log file in Windows

Maxim Dounin
July 23, 2012 12:36PM
Hello!

On Wed, Jul 18, 2012 at 04:24:30PM -0400, Ricardo V G wrote:

> Recently one of my employer's products (Trend Micro) that includes
> nginx Windows binary had an issue similar to [1] where the error
> message "[alert] 2548#2552: WaitForMultipleObjects() failed (6: The
> handle is invalid)" is generated indefinitely hence creating a massive
> log file. This wasn't new. Previously a change was done to the
> configuration and it seemed that the issue was fixed. But it
> reappeared and I was asked to look into it. Here's what I think could
> be the problem along with the solution (patch) at the end of this
> email.
>
> When creating threads in a Windows system the following calls are made
> (using release 1.2.2):
>
> main() ->
> ngx_master_process_cycle() ->
> ngx_start_worker_processes() ->
> ngx_start_worker_processes() ->
> ngx_spawn_process()
>
> The issue appears in one documented case when
> ngx_start_worker_processes() fails to create a thread and the
> following error message is generated:
>
> [alert] 2548#2552: the event "ngx_master_2548" was not signaled for 5s
>
> When this message is generated, the execution jumps to the failed
> label using a goto in os/win32/ngx_process.c at line 150. From there
> on, the function attempts to close all opened handles and returns an
> error in the form of an invalid process/thread ID. It's important to
> note that the thread handle is closed if necessary but the global
> variable that holds it is not cleared (i.e. the global array
> ngx_processes[] defined in os/win32/ngx_process.c at line 17 keeps all
> handles).

[...]

Good catch, thanks. I've committed a slightly modified version
of your patch.

Could you please provide your full name for CHANGES?

Maxim Dounin

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Possible cause and solution of 100% cpu and massive log file in Windows

Ricardo V G 1626 July 18, 2012 04:26PM

Re: Possible cause and solution of 100% cpu and massive log file in Windows

Maxim Dounin 564 July 23, 2012 12:36PM

Re: Possible cause and solution of 100% cpu and massive log file in Windows

Ricardo V G 637 July 23, 2012 12:46PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 162
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready