Welcome! Log In Create A New Profile

Advanced

memory free on nginx reload

Donatas Abraitis
October 24, 2014 03:04PM
Hello everyone,

I'm trying to change behavior of one of the modules like ModSecurity. It
doesn't free memory after reload, only after restart.

static void ngx_http_modsecurity_terminate(ngx_cycle_t *cycle);

ngx_http_modsecurity_terminate, /* exit process */
ngx_http_modsecurity_terminate, /* exit master */

static void ngx_http_modsecurity_terminate(ngx_cycle_t *cycle)
{
if (modsec_server) {
modsecTerminate();
modsec_server = NULL;
}
}

Backtrace is quite good, but I don't understand why it repeats two times
(it's after nginx's reload):

0x506060 : ngx_http_modsecurity_terminate+0x0/0x30
[/usr/local/openresty/nginx/sbin/nginx]
0x4590be : ngx_worker_process_exit+0x2e/0x210
[/usr/local/openresty/nginx/sbin/nginx]
0x45989a : ngx_cache_manager_process_cycle+0x13a/0x180
[/usr/local/openresty/nginx/sbin/nginx]
0x457da4 : ngx_spawn_process+0x154/0x4d0
[/usr/local/openresty/nginx/sbin/nginx]
0x4596fa : ngx_start_cache_manager_processes+0x17a/0x1e0
[/usr/local/openresty/nginx/sbin/nginx]
0x45a00e : ngx_master_process_cycle+0x2ae/0x990
[/usr/local/openresty/nginx/sbin/nginx]
0x4388cf : main+0x77f/0xa10 [/usr/local/openresty/nginx/sbin/nginx]
0x7f30f2f69ec5 : __libc_start_main+0xf5/0x1c0 [/lib/x86_64-linux-gnu/
libc-2.19.so]
0x43b380 : _start+0x29/0x39 [/usr/local/openresty/nginx/sbin/nginx]
0x506060 : ngx_http_modsecurity_terminate+0x0/0x30
[/usr/local/openresty/nginx/sbin/nginx]
0x4590be : ngx_worker_process_exit+0x2e/0x210
[/usr/local/openresty/nginx/sbin/nginx]
0x4593cb : ngx_worker_process_cycle+0x12b/0x190
[/usr/local/openresty/nginx/sbin/nginx]
0x457da4 : ngx_spawn_process+0x154/0x4d0
[/usr/local/openresty/nginx/sbin/nginx]
0x459514 : ngx_start_worker_processes+0x74/0xe0
[/usr/local/openresty/nginx/sbin/nginx]
0x45a001 : ngx_master_process_cycle+0x2a1/0x990
[/usr/local/openresty/nginx/sbin/nginx]
0x4388cf : main+0x77f/0xa10 [/usr/local/openresty/nginx/sbin/nginx]
0x7f30f2f69ec5 : __libc_start_main+0xf5/0x1c0 [/lib/x86_64-linux-gnu/
libc-2.19.so]
0x43b380 : _start+0x29/0x39 [/usr/local/openresty/nginx/sbin/nginx]

Any help would be appreciated! Or just any hints as well!

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

memory free on nginx reload

Donatas Abraitis 727 October 24, 2014 03:04PM



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

Online Users

Guests: 160
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready