Welcome! Log In Create A New Profile

Advanced

Re: reconfiguration can cause coredump when master_process off

July 12, 2010 10:28AM
On Mon, Jul 12, 2010 at 10:20:07PM +0800, Hungpo DU wrote:

> I am a new pie to everything here, so please just ignore anything what i've
> done improperly.
>
> Serveral days ago, when I was debugging my module, I crash the nginx process
> by change. I am playing with source code 0.8.36. then I tried the same thing
> under 0.8.44, crash happened again.
>
> nginx.conf:
>
> daemon off;
> master_process off;
>
> I started nginx in my terminal, and issued the configuration reloading
> command twice in another terminal. About 30 seconds later, the process just
> end up with "Segmentation fault".
>
> I digged the code, found what caused this problem was:
>
> in ngx_clean_old_cycles, the ngx_cycle_t::connections in the second old
> cycle in ngx_old_cycles was not initialized properly, which should be done
> in ngx_event_process_init, which was only called once in
> ngx_single_process_cycle. So, the following __cycle__s created after
> reconfiguring was not initialized by ngx_event_process_init.
>
> I don't know if I describe the "problem" right, or this behavior should be
> considered as a BUG.

"master_process off" mode is intended only for development and reloading
may not work reliably in this mode. If you to test reloading, you should
run "master_process on".


--
Igor Sysoev
http://sysoev.ru/en/

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

reconfiguration can cause coredump when master_process off

Hungpo DU 2575 July 12, 2010 10:22AM

Re: reconfiguration can cause coredump when master_process off

Igor Sysoev 1488 July 12, 2010 10:28AM



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

Online Users

Guests: 272
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