Welcome! Log In Create A New Profile

Advanced

Exception with ngx_event_timer_init() in win32

July 13, 2011 04:19AM
Hi,

In win32 native api file: ngx_process_cycle.c init_process will call ngx_event_timer_init(), but the function ngx_mutex_init() does not implement for win32 now, so ngx_event_timer_mutex will be set to 1.

And this function ngx_event_timer_init() will be called again in ngx_worker_thread(). The statement will access a invalid memory:

ngx_event_timer_mutex->log = log;

Setting deamon and master_process to off in nginx.conf, this exception will be reproduced.

So why ngx_modules[n]->init_process called twice in ngx_single_process_cycle(), but ngx_worker_process_cycle called once only?

for (n = 0; ngx_modules[n]; n++) {
if (ngx_modules[n]->init_process) {
if (ngx_modules[n]->init_process(cycle) == NGX_ERROR) {
/* fatal */
exit(2);
}
}
}
Subject Author Posted

Exception with ngx_event_timer_init() in win32

bigplum July 13, 2011 04:19AM

Re: Exception with ngx_event_timer_init() in win32

Maxim Dounin July 13, 2011 09:14AM

Re: Exception with ngx_event_timer_init() in win32

bigplum July 13, 2011 10:57PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 60
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready