<div dir="ltr">Hello everyone,<div><br></div><div>I'm trying to change behavior of one of the modules like ModSecurity. It doesn't free memory after reload, only after restart. </div><div><br></div><div>static void ngx_http_modsecurity_terminate(ngx_cycle_t *cycle);</div><div><br></div><div><div> ngx_http_modsecurity_terminate, /* exit process */</div><div> ngx_http_modsecurity_terminate, /* exit master */</div><div><br></div><div><div>static void ngx_http_modsecurity_terminate(ngx_cycle_t *cycle)</div><div>{</div><div> if (modsec_server) {</div><div> modsecTerminate();</div><div> modsec_server = NULL;</div><div> }</div></div><div>}</div><div><br></div><div>Backtrace is quite good, but I don't understand why it repeats two times (it's after nginx's reload):</div><div><br></div><div><div> 0x506060 : ngx_http_modsecurity_terminate+0x0/0x30 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x4590be : ngx_worker_process_exit+0x2e/0x210 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x45989a : ngx_cache_manager_process_cycle+0x13a/0x180 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x457da4 : ngx_spawn_process+0x154/0x4d0 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x4596fa : ngx_start_cache_manager_processes+0x17a/0x1e0 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x45a00e : ngx_master_process_cycle+0x2ae/0x990 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x4388cf : main+0x77f/0xa10 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x7f30f2f69ec5 : __libc_start_main+0xf5/0x1c0 [/lib/x86_64-linux-gnu/<a href="http://libc-2.19.so">libc-2.19.so</a>]</div><div> 0x43b380 : _start+0x29/0x39 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x506060 : ngx_http_modsecurity_terminate+0x0/0x30 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x4590be : ngx_worker_process_exit+0x2e/0x210 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x4593cb : ngx_worker_process_cycle+0x12b/0x190 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x457da4 : ngx_spawn_process+0x154/0x4d0 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x459514 : ngx_start_worker_processes+0x74/0xe0 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x45a001 : ngx_master_process_cycle+0x2a1/0x990 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x4388cf : main+0x77f/0xa10 [/usr/local/openresty/nginx/sbin/nginx]</div><div> 0x7f30f2f69ec5 : __libc_start_main+0xf5/0x1c0 [/lib/x86_64-linux-gnu/<a href="http://libc-2.19.so">libc-2.19.so</a>]</div><div> 0x43b380 : _start+0x29/0x39 [/usr/local/openresty/nginx/sbin/nginx]</div></div><div><br></div><div>Any help would be appreciated! Or just any hints as well!</div><div><br></div>-- <br>Donatas<br>
</div></div>