Segmentation fault in drizzle-nginx-module 0.1.0

Wendal Chen wendal1985 at gmail.com
Fri Sep 16 14:34:59 UTC 2011


Env:
CentOS 5.6
nginx 0.8.54
rds-json-nginx-module-0.11
mysql 5.0
drizzle7-2011.08.25

nginx.conf

        location =/mysql_status {
            drizzle_status;
        }

        #Common SQL Query point
        location =/mysql_query {
          #internal;
            set_by_lua $sql "return ngx.unescape_uri(ngx.var.arg_sql)";
            drizzle_query $sql;
            drizzle_pass mysqls;
            drizzle_module_header off;
            rds_json on;
        }

===========================================================================================================

request path : localhost/mysql_query?sql=SELECT%201

print out by gdb:

Program terminated with signal 11, Segmentation fault.
#0  0x080c2551 in ngx_http_upstream_dbd_connect (r=0x8badcd0, u=0x8bae2d4)
at ../drizzle-nginx-module/src/ngx_http_drizzle_util.c:604
604         r->connection->log->action = "connecting to upstream";
(gdb) bt
#0  0x080c2551 in ngx_http_upstream_dbd_connect (r=0x8badcd0, u=0x8bae2d4)
at ../drizzle-nginx-module/src/ngx_http_drizzle_util.c:604
#1  0x080c2539 in ngx_http_upstream_dbd_init_request (r=0x8badcd0) at
../drizzle-nginx-module/src/ngx_http_drizzle_util.c:593
#2  0x080c2066 in ngx_http_upstream_dbd_init (r=0x8badcd0) at
../drizzle-nginx-module/src/ngx_http_drizzle_util.c:390
#3  0x080be58e in ngx_http_drizzle_handler (r=0x8badcd0) at
../drizzle-nginx-module/src/ngx_http_drizzle_handler.c:164
#4  0x0807d610 in ngx_http_core_content_phase (r=0x8badcd0, ph=0x8bbb6d8) at
src/http/ngx_http_core_module.c:1350
#5  0x0807c8a9 in ngx_http_core_run_phases (r=0x8badcd0) at
src/http/ngx_http_core_module.c:852
#6  0x0807c844 in ngx_http_handler (r=0x8badcd0) at
src/http/ngx_http_core_module.c:835
#7  0x08086a03 in ngx_http_run_posted_requests (c=0xb6a900b8) at
src/http/ngx_http_request.c:1828
#8  0x080866b1 in ngx_http_process_request (r=0x8ba6368) at
src/http/ngx_http_request.c:1643
#9  0x080855b9 in ngx_http_process_request_headers (rev=0xb657b070) at
src/http/ngx_http_request.c:1084
#10 0x08084f4e in ngx_http_process_request_line (rev=0xb657b070) at
src/http/ngx_http_request.c:889
#11 0x0808493b in ngx_http_init_request (rev=0xb657b070) at
src/http/ngx_http_request.c:514
#12 0x0806f59f in ngx_event_process_posted (cycle=0x8ba6e98,
posted=0x80df6cc) at src/event/ngx_event_posted.c:39
#13 0x0806ddf3 in ngx_process_events_and_timers (cycle=0x8ba6e98) at
src/event/ngx_event.c:272
#14 0x08076c50 in ngx_worker_process_cycle (cycle=0x8ba6e98, data=0x0) at
src/os/unix/ngx_process_cycle.c:795
#15 0x080746a2 in ngx_spawn_process (cycle=0x8ba6e98, proc=0x8076b3a
<ngx_worker_process_cycle>, data=0x0, name=0x80cdc44 "worker process",
respawn=-3)
    at src/os/unix/ngx_process.c:196
#16 0x080761b9 in ngx_start_worker_processes (cycle=0x8ba6e98, n=2, type=-3)
at src/os/unix/ngx_process_cycle.c:355
#17 0x08075ac2 in ngx_master_process_cycle (cycle=0x8ba6e98) at
src/os/unix/ngx_process_cycle.c:136
#18 0x08053faf in main (argc=1, argv=0xbfe971b4) at src/core/nginx.c:401

============================================================================================================

request path : /mysql_status

===========================================================================================================
#0  0x080bef9b in ngx_http_drizzle_status_handler (r=0x8ba6368) at
../drizzle-nginx-module/src/ngx_http_drizzle_handler.c:604
604             ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
(gdb) bt
#0  0x080bef9b in ngx_http_drizzle_status_handler (r=0x8ba6368) at
../drizzle-nginx-module/src/ngx_http_drizzle_handler.c:604
#1  0x0807d610 in ngx_http_core_content_phase (r=0x8ba6368, ph=0x8bbb6d8) at
src/http/ngx_http_core_module.c:1350
#2  0x0807c8a9 in ngx_http_core_run_phases (r=0x8ba6368) at
src/http/ngx_http_core_module.c:852
#3  0x0807c844 in ngx_http_handler (r=0x8ba6368) at
src/http/ngx_http_core_module.c:835
#4  0x080866a6 in ngx_http_process_request (r=0x8ba6368) at
src/http/ngx_http_request.c:1641
#5  0x080855b9 in ngx_http_process_request_headers (rev=0xb657b070) at
src/http/ngx_http_request.c:1084
#6  0x08084f4e in ngx_http_process_request_line (rev=0xb657b070) at
src/http/ngx_http_request.c:889
#7  0x0808493b in ngx_http_init_request (rev=0xb657b070) at
src/http/ngx_http_request.c:514
#8  0x0806f59f in ngx_event_process_posted (cycle=0x8ba6e98,
posted=0x80df6cc) at src/event/ngx_event_posted.c:39
#9  0x0806ddf3 in ngx_process_events_and_timers (cycle=0x8ba6e98) at
src/event/ngx_event.c:272
#10 0x08076c50 in ngx_worker_process_cycle (cycle=0x8ba6e98, data=0x0) at
src/os/unix/ngx_process_cycle.c:795
#11 0x080746a2 in ngx_spawn_process (cycle=0x8ba6e98, proc=0x8076b3a
<ngx_worker_process_cycle>, data=0x0, name=0x80cdc44 "worker process",
respawn=-3)
    at src/os/unix/ngx_process.c:196
#12 0x080761b9 in ngx_start_worker_processes (cycle=0x8ba6e98, n=2, type=-3)
at src/os/unix/ngx_process_cycle.c:355
#13 0x08075ac2 in ngx_master_process_cycle (cycle=0x8ba6e98) at
src/os/unix/ngx_process_cycle.c:136
#14 0x08053faf in main (argc=1, argv=0xbfe971b4) at src/core/nginx.c:401

===========================================================================================================
Thank any help !!!

-- 
Wendal Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20110916/17012b9b/attachment.html>


More information about the nginx mailing list