Welcome! Log In Create A New Profile

Advanced

crash in ngx_add_timer

April 18, 2017 08:14PM
Hi,
I am new to NGinx modules and I trying to write an nginx module. I am
having an issue
where my module crashes when adding multiple timers. The first timer adds
fine.
However, when I go to add the second timer, it crashes. I've simplified the
code to a very
basic module (which is attached to this email). The backtrace is provided
as well.
Do I need to do some sort of initialization before I add multiple timers.
Any advice/help
is appreciated. Thanks.

Dk.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x000000000040d68b in ngx_rbtree_insert (tree=0x69dda0
<ngx_event_timer_rbtree>,
node=node@entry=0x69db08 <ev2+40>) at src/core/ngx_rbtree.c:44
#2 0x000000000046ceb2 in ngx_event_add_timer (timer=6, ev=0x69dae0 <ev2>)
at src/event/ngx_event_timer.h:84
#3 ngx_test_init (cf=<optimized out>)
at
/home/ubuntu/git/mitigator/nginx/build/../modules/nginx_mitigator_module/platform/nginx-test-module.c:81
#4 0x0000000000424e83 in ngx_http_block (cf=0x7fffffffe0a0, cmd=<optimized
out>,
conf=<optimized out>) at src/http/ngx_http.c:315
#5 0x000000000041446b in ngx_conf_handler (last=1, cf=0x7fffffffe0a0)
at src/core/ngx_conf_file.c:427
#6 ngx_conf_parse (cf=cf@entry=0x7fffffffe0a0, filename=filename@entry
=0x6ad570)
at src/core/ngx_conf_file.c:283
#7 0x0000000000411e1a in ngx_init_cycle (old_cycle=old_cycle@entry
=0x7fffffffe260)
at src/core/ngx_cycle.c:268
#8 0x0000000000404208 in main (argc=<optimized out>, argv=<optimized out>)
at src/core/nginx.c:268
(gdb)
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

crash in ngx_add_timer

dnj0496 917 April 18, 2017 08:14PM

Re: crash in ngx_add_timer

dnj0496 889 April 18, 2017 08:24PM

Re: crash in ngx_add_timer

胡聪 (hucc) 420 April 18, 2017 09:54PM

Re: crash in ngx_add_timer

dnj0496 632 April 18, 2017 10:04PM

Re: crash in ngx_add_timer

734819342 438 April 18, 2017 10:24PM

Re: crash in ngx_add_timer

胡聪 (hucc) 510 April 18, 2017 10:32PM

Re: crash in ngx_add_timer

dnj0496 688 April 19, 2017 03:18PM



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

Online Users

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