root@ip-10-73-139-251:/home/cc/test# gdb /usr/local/openresty/nginx/sbin/nginx cores/core GNU gdb (GDB) 7.6.1-ubuntu Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/local/openresty/nginx/sbin/nginx...done. [New LWP 26149] warning: Can't read pathname for load map: Input/output error. warning: Could not load shared library symbols for ?z. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `nginx: worker process '. Program terminated with signal 11, Segmentation fault. #0 _int_malloc (av=0x7f57a71e4740 , bytes=) at malloc.c:3680 3680 malloc.c: No such file or directory. (gdb) bt #0 _int_malloc (av=0x7f57a71e4740 , bytes=) at malloc.c:3680 #1 0x00007f57a6ea64d0 in __GI___libc_malloc (bytes=136) at malloc.c:2859 #2 0x000000000042e229 in ngx_alloc (size=size@entry=136, log=0x17aa288) at src/os/unix/ngx_alloc.c:22 #3 0x00000000004262bf in ngx_resolver_alloc (r=r@entry=0x17be8a0, size=size@entry=136) at src/core/ngx_resolver.c:2081 #4 0x0000000000426496 in ngx_resolver_calloc (r=r@entry=0x17be8a0, size=size@entry=136) at src/core/ngx_resolver.c:2094 #5 0x0000000000426b08 in ngx_resolve_start (r=0x17be8a0, temp=temp@entry=0x7ffffb86f950) at src/core/ngx_resolver.c:295 #6 0x0000000000455aad in ngx_http_upstream_init_request (r=r@entry=0x17ae758) at src/http/ngx_http_upstream.c:624 #7 0x00000000004561d0 in ngx_http_upstream_init (r=0x17ae758) at src/http/ngx_http_upstream.c:466 #8 0x000000000044c061 in ngx_http_read_client_request_body (r=r@entry=0x17ae758, post_handler=0x456167 ) at src/http/ngx_http_request_body.c:54 #9 0x0000000000471da6 in ngx_http_proxy_handler (r=0x17ae758) at src/http/modules/ngx_http_proxy_module.c:704 #10 0x000000000043fce6 in ngx_http_core_content_phase (r=0x17ae758, ph=) at src/http/ngx_http_core_module.c:1419 #11 0x000000000043afc3 in ngx_http_core_run_phases (r=0x17ae758) at src/http/ngx_http_core_module.c:899 #12 0x000000000043b0d2 in ngx_http_handler (r=) at src/http/ngx_http_core_module.c:882 #13 0x0000000000443085 in ngx_http_run_posted_requests (c=c@entry=0x7f57a8828190) at src/http/ngx_http_request.c:2175 #14 0x0000000000444d23 in ngx_http_process_request (r=r@entry=0x17b4fd0) at src/http/ngx_http_request.c:1858 #15 0x0000000000445087 in ngx_http_process_request_headers (rev=rev@entry=0x17d0260) at src/http/ngx_http_request.c:1287 #16 0x0000000000445349 in ngx_http_process_request_line (rev=rev@entry=0x17d0260) at src/http/ngx_http_request.c:966 #17 0x000000000044567a in ngx_http_wait_request_handler (rev=0x17d0260) at src/http/ngx_http_request.c:487 #18 0x0000000000432e3b in ngx_epoll_process_events (cycle=, timer=, flags=) at src/event/modules/ngx_epoll_module.c:683 #19 0x000000000042ba60 in ngx_process_events_and_timers (cycle=cycle@entry=0x17aa270) at src/event/ngx_event.c:249 #20 0x0000000000431836 in ngx_worker_process_cycle (cycle=0x17aa270, data=) at src/os/unix/ngx_process_cycle.c:813 #21 0x00000000004301c6 in ngx_spawn_process (cycle=cycle@entry=0x17aa270, proc=proc@entry=0x43176a , data=data@entry=0x0, name=name@entry=0x4c41fb "worker process", respawn=respawn@entry=-3) at src/os/unix/ngx_process.c:198 #22 0x000000000043198f in ngx_start_worker_processes (cycle=cycle@entry=0x17aa270, n=1, type=type@entry=-3) at src/os/unix/ngx_process_cycle.c:364 #23 0x0000000000431fed in ngx_master_process_cycle (cycle=cycle@entry=0x17aa270) at src/os/unix/ngx_process_cycle.c:136 #24 0x000000000041720a in main (argc=, argv=) at src/core/nginx.c:412 (gdb) backtrace full #0 _int_malloc (av=0x7f57a71e4740 , bytes=) at malloc.c:3680 p = iters = nb = 144 idx = bin = victim = 0x17b60f0 size = 24838432 victim_index = remainder = 0x17b6180 remainder_size = 24838288 block = bit = map = fwd = 0x17b6180 bck = 0x7f57a71e4798 errstr = 0x0 __func__ = "_int_malloc" #1 0x00007f57a6ea64d0 in __GI___libc_malloc (bytes=136) at malloc.c:2859 ar_ptr = 0x7f57a71e4740 victim = 0x7f57a71e4740 __func__ = "__libc_malloc" #2 0x000000000042e229 in ngx_alloc (size=size@entry=136, log=0x17aa288) at src/os/unix/ngx_alloc.c:22 p = #3 0x00000000004262bf in ngx_resolver_alloc (r=r@entry=0x17be8a0, size=size@entry=136) at src/core/ngx_resolver.c:2081 p = 0x17b6180 "" #4 0x0000000000426496 in ngx_resolver_calloc (r=r@entry=0x17be8a0, size=size@entry=136) at src/core/ngx_resolver.c:2094 p = #5 0x0000000000426b08 in ngx_resolve_start (r=0x17be8a0, temp=temp@entry=0x7ffffb86f950) at src/core/ngx_resolver.c:295 addr = ctx = #6 0x0000000000455aad in ngx_http_upstream_init_request (r=r@entry=0x17ae758) at src/http/ngx_http_upstream.c:624 host = 0x17b0598 i = ctx = temp = {next = 0x0, resolver = 0x408bdf68, udp_connection = 0x408ccb10, ident = 7275936, state = 0, type = 1082905464, name = {len = 9, data = 0x17b0587 "nginx.org/hL"}, naddrs = 1082905464, addrs = 0x7f57a8654c75 <_dl_fixup+245>, addr = 1, handler = 0x0, data = 0x7ffffb86f9f0, timeout = 24831832, quick = 24934536, recursion = 4517762, event = 0x17c7888} cln = u = 0x17b0138 clcf = 0x17c5c98 uscf = uscfp = 0x17ac400 umcf = #7 0x00000000004561d0 in ngx_http_upstream_init (r=0x17ae758) at src/http/ngx_http_upstream.c:466 c = 0x7f57a8828190 #8 0x000000000044c061 in ngx_http_read_client_request_body (r=r@entry=0x17ae758, post_handler=0x456167 ) at src/http/ngx_http_request_body.c:54 preread = size = rc = b = out = {buf = 0x17ae758, next = 0x17ae758} cl = rb = #9 0x0000000000471da6 in ngx_http_proxy_handler (r=0x17ae758) at src/http/modules/ngx_http_proxy_module.c:704 rc = u = 0x17b0138 ctx = 0x17b04e0 plcf = 0x17c60c8 #10 0x000000000043fce6 in ngx_http_core_content_phase (r=0x17ae758, ph=) at src/http/ngx_http_core_module.c:1419 root = 24858680 rc = path = {len = 24820544, data = 0x43eea4 "H\211\306H\205\300u\024H\213E\020H\211\203\330\003"} #11 0x000000000043afc3 in ngx_http_core_run_phases (r=0x17ae758) at src/http/ngx_http_core_module.c:899 rc = ph = 0x17cd850 cmcf = #12 0x000000000043b0d2 in ngx_http_handler (r=) at src/http/ngx_http_core_module.c:882 cmcf = #13 0x0000000000443085 in ngx_http_run_posted_requests (c=c@entry=0x7f57a8828190) at src/http/ngx_http_request.c:2175 r = ctx = pr = #14 0x0000000000444d23 in ngx_http_process_request (r=r@entry=0x17b4fd0) at src/http/ngx_http_request.c:1858 c = 0x7f57a8828190 #15 0x0000000000445087 in ngx_http_process_request_headers (rev=rev@entry=0x17d0260) at src/http/ngx_http_request.c:1287 p = len = ---Type to continue, or q to quit--- n = rc = rv = h = c = 0x7f57a8828190 hh = r = 0x17b4fd0 cscf = 0x17c0f00 cmcf = 0x17abb00 #16 0x0000000000445349 in ngx_http_process_request_line (rev=rev@entry=0x17d0260) at src/http/ngx_http_request.c:966 n = rc = rv = host = {len = 140014466007440, data = 0x442d07 "H\211\203\360\003"} c = 0x7f57a8828190 r = 0x17b4fd0 #17 0x000000000044567a in ngx_http_wait_request_handler (rev=0x17d0260) at src/http/ngx_http_request.c:487 size = 1024 n = b = 0x17b4a80 c = 0x7f57a8828190 hc = cscf = #18 0x0000000000432e3b in ngx_epoll_process_events (cycle=, timer=, flags=) at src/event/modules/ngx_epoll_module.c:683 events = 1 revents = 1 instance = i = 0 level = err = rev = wev = queue = c = 0x7f57a8828190 #19 0x000000000042ba60 in ngx_process_events_and_timers (cycle=cycle@entry=0x17aa270) at src/event/ngx_event.c:249 flags = 1 timer = 60000 delta = 1382376560191 #20 0x0000000000431836 in ngx_worker_process_cycle (cycle=0x17aa270, data=) at src/os/unix/ngx_process_cycle.c:813 worker = i = c = #21 0x00000000004301c6 in ngx_spawn_process (cycle=cycle@entry=0x17aa270, proc=proc@entry=0x43176a , data=data@entry=0x0, name=name@entry=0x4c41fb "worker process", respawn=respawn@entry=-3) at src/os/unix/ngx_process.c:198 on = 1 pid = 0 s = 0 #22 0x000000000043198f in ngx_start_worker_processes (cycle=cycle@entry=0x17aa270, n=1, type=type@entry=-3) at src/os/unix/ngx_process_cycle.c:364 i = 0 ch = {command = 1, pid = 0, slot = 0, fd = 0} #23 0x0000000000431fed in ngx_master_process_cycle (cycle=cycle@entry=0x17aa270) at src/os/unix/ngx_process_cycle.c:136 title = 0x17cdadc "master process /usr/local/openresty/nginx/sbin/nginx -p /home/cc/test/ -c nginx.conf.debug" p = size = i = n = sigio = set = {__val = {0 }} itv = {it_interval = {tv_sec = 24959576, tv_usec = 0}, it_value = {tv_sec = 0, tv_usec = 0}} live = delay = ls = ccf = 0x17ab218 #24 0x000000000041720a in main (argc=, argv=) at src/core/nginx.c:412 i = log = 0x705ea0 cycle = 0x17aa270 init_cycle = {conf_ctx = 0x0, pool = 0x17a95b0, log = 0x705ea0 , new_log = {log_level = 0, file = 0x0, connection = 0, handler = 0x0, data = 0x0, action = 0x0}, files = 0x0, free_connections = 0x0, free_connection_n = 0, reusable_connections_queue = {prev = 0x0, next = 0x0}, listening = {elts = 0x0, nelts = 0, size = 0, nalloc = 0, pool = 0x0}, paths = {elts = 0x0, nelts = 0, size = 0, nalloc = 0, pool = 0x0}, open_files = {last = 0x0, part = {elts = 0x0, nelts = 0, next = 0x0}, size = 0, nalloc = 0, pool = 0x0}, shared_memory = {last = 0x0, part = {elts = 0x0, nelts = 0, next = 0x0}, size = 0, nalloc = 0, pool = 0x0}, connection_n = 0, files_n = 0, connections = 0x0, read_events = 0x0, write_events = 0x0, old_cycle = 0x0, conf_file = {len = 30, data = 0x17a9600 "\002"}, conf_param = {len = 0, data = 0x0}, conf_prefix = {len = 14, data = 0x17a9600 "\002"}, prefix = {len = 14, data = 0x7ffffb8718ac ""}, lock_file = {len = 0, data = 0x0}, hostname = {len = 0, data = 0x0}} ccf = (gdb)