Terminating requests

tommy watson tommywatson+nginx-devel at gmail.com
Sat Feb 14 01:44:37 UTC 2015


Hello,
  I'm trying to continue or cancel an ngx_http_request_t after a slight
delay but am failing miserably, I keep getting crashes and am not sure what
I'm doing wrong.
The code is here https://github.com/tommywatson/nginx-hello-world-module
(borrowed from https://www.ruby-forum.com/topic/5564332) basically it
pauses and fires and event to continue or finalize the request. Firing
nikto at it brings the dump below.
 Any help/insight appreciated.

Cheers.

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000406af2 in ngx_pnalloc (pool=0x0, size=181) at
src/core/ngx_palloc.c:155
155    if (size <= pool->max) {
(gdb) where
#0  0x0000000000406af2 in ngx_pnalloc (pool=0x0, size=181) at
src/core/ngx_palloc.c:155
#1  0x0000000000452692 in ngx_http_log_handler (r=0x6676b50) at
src/http/modules/ngx_http_log_module.c:349
#2  0x000000000044c385 in ngx_http_log_request (r=0x6676b50) at
src/http/ngx_http_request.c:3510
#3  0x000000000044c1f2 in ngx_http_free_request (r=0x6676b50, rc=0) at
src/http/ngx_http_request.c:3457
#4  0x000000000044b297 in ngx_http_set_keepalive (r=0x6676b50) at
src/http/ngx_http_request.c:2895
#5  0x000000000044a994 in ngx_http_finalize_connection (r=0x6676b50) at
src/http/ngx_http_request.c:2532
#6  0x000000000044a10b in ngx_http_finalize_request (r=0x6676b50, rc=-4) at
src/http/ngx_http_request.c:2262
#7  0x000000000043cb18 in ngx_http_core_content_phase (r=0x6676b50,
ph=0x60b7798) at src/http/ngx_http_core_module.c:1407
#8  0x000000000043b911 in ngx_http_core_run_phases (r=0x6676b50) at
src/http/ngx_http_core_module.c:888
#9  0x00000000004af101 in hack_event (e=0x6677bc8) at
../nginx-hello-world-module/ngx_http_hello_world_module.c:85
#10 0x000000000042afac in ngx_event_expire_timers () at
src/event/ngx_event_timer.c:94
#11 0x00000000004290a7 in ngx_process_events_and_timers (cycle=0x608f310)
at src/event/ngx_event.c:262
#12 0x000000000043493f in ngx_worker_process_cycle (cycle=0x608f310,
data=0x0) at src/os/unix/ngx_process_cycle.c:824
#13 0x000000000043176d in ngx_spawn_process (cycle=0x608f310, proc=0x43476b
<ngx_worker_process_cycle>, data=0x0, name=0x4b3180 "worker process",
respawn=-3) at src/os/unix/ngx_process.c:198
#14 0x0000000000433a71 in ngx_start_worker_processes (cycle=0x608f310, n=1,
type=-3) at src/os/unix/ngx_process_cycle.c:368
#15 0x00000000004331cd in ngx_master_process_cycle (cycle=0x608f310) at
src/os/unix/ngx_process_cycle.c:140
#16 0x00000000004037c6 in main (argc=1, argv=0xffefffbe8) at
src/core/nginx.c:407
(gdb) quit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150213/07e75b31/attachment.html>


More information about the nginx-devel mailing list