-
Notifications
You must be signed in to change notification settings - Fork 68
Description
senginx 1.6.2
Using resolver causes crash.
Config lines:
...
resolver 127.0.0.1 valid=48h;
resolver_timeout 5s;
# searchengines hostnames detected by reversed DNS lookup
whitelist_ua $ua_searchengines
{
"google" ".*\.google\.com";
"googlebot" ".*\.googlebot\.com";
}
...
coredump info:
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
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:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/local/senginx/sbin/senginx...done.
[New LWP 13063]
warning: Can't read pathname for load map: Input/output error.
[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 ngx_palloc (pool=0x0, size=size@entry=88) at src/core/ngx_palloc.c:125
125 if (size <= pool->max) {
(gdb) bt
#0 ngx_palloc (pool=0x0, size=size@entry=88) at src/core/ngx_palloc.c:125
#1 0x000000000040a0d7 in ngx_pcalloc (pool=, size=size@entry=88) at src/core/ngx_palloc.c:304
#2 0x0000000000470044 in ngx_http_rewrite_handler (r=0xdb8af0) at src/http/modules/ngx_http_rewrite_module.c:187
#3 0x0000000000437f2f in ngx_http_core_rewrite_phase (r=0xdb8af0, ph=0xdcfc70) at src/http/ngx_http_core_module.c:967
#4 0x0000000000433da3 in ngx_http_core_run_phases (r=r@entry=0xdb8af0) at src/http/ngx_http_core_module.c:913
#5 0x00000000004b5dc1 in ngx_http_wl_resolve_addr_handler (ctx=0xda00d0) at /usr/local/src/senginx-1.6.2/neusoft/ngx_http_whitelist/ngx_http_whitelist.c:464
#6 0x000000000041c2ec in ngx_resolver_process_ptr (nan=, code=0, ident=, n=26, buf=0x7fff788bad20 "cā\200", r=0xc73580)
at src/core/ngx_resolver.c:2243
#7 ngx_resolver_process_response (n=26, buf=0x7fff788bad20 "cā\200", r=0xc73580) at src/core/ngx_resolver.c:1377
#8 ngx_resolver_read_response (rev=0xdd5870) at src/core/ngx_resolver.c:1240
#9 0x0000000000429933 in ngx_epoll_process_events (cycle=0xc551b0, timer=, flags=) at src/event/modules/ngx_epoll_module.c:691
#10 0x000000000042046a in ngx_process_events_and_timers (cycle=cycle@entry=0xc551b0) at src/event/ngx_event.c:248
#11 0x00000000004279dd in ngx_worker_process_cycle (cycle=cycle@entry=0xc551b0, data=data@entry=0x1) at src/os/unix/ngx_process_cycle.c:851
#12 0x0000000000425f4b in ngx_spawn_process (cycle=cycle@entry=0xc551b0, proc=proc@entry=0x4278ee <ngx_worker_process_cycle>, data=data@entry=0x1,
name=name@entry=0x4c706b "worker process", respawn=respawn@entry=-3) at src/os/unix/ngx_process.c:198
#13 0x0000000000426ca5 in ngx_start_worker_processes (cycle=cycle@entry=0xc551b0, n=4, type=type@entry=-3) at src/os/unix/ngx_process_cycle.c:398
#14 0x0000000000428806 in ngx_master_process_cycle (cycle=cycle@entry=0xc551b0) at src/os/unix/ngx_process_cycle.c:160
#15 0x0000000000408a3f in main (argc=, argv=) at src/core/nginx.c:407
(gdb) backtrace full
#0 ngx_palloc (pool=0x0, size=size@entry=88) at src/core/ngx_palloc.c:125
m = <optimized out>
p = <optimized out>
#1 0x000000000040a0d7 in ngx_pcalloc (pool=, size=size@entry=88) at src/core/ngx_palloc.c:304
p = <optimized out>
#2 0x0000000000470044 in ngx_http_rewrite_handler (r=0xdb8af0) at src/http/modules/ngx_http_rewrite_module.c:187
index = <optimized out>
code = <optimized out>
e = <optimized out>
cscf = <optimized out>
cmcf = <optimized out>
rlcf = 0xc7fa18
#3 0x0000000000437f2f in ngx_http_core_rewrite_phase (r=0xdb8af0, ph=0xdcfc70) at src/http/ngx_http_core_module.c:967
rc = <optimized out>
#4 0x0000000000433da3 in ngx_http_core_run_phases (r=r@entry=0xdb8af0) at src/http/ngx_http_core_module.c:913
rc = <optimized out>
ph = 0xdcfbe0
cmcf = <optimized out>
#5 0x00000000004b5dc1 in ngx_http_wl_resolve_addr_handler (ctx=0xda00d0) at /usr/local/src/senginx-1.6.2/neusoft/ngx_http_whitelist/ngx_http_whitelist.c:464
r = 0xdb8af0
node = <optimized out>
hash = 3742699198
#6 0x000000000041c2ec in ngx_resolver_process_ptr (nan=, code=0, ident=, n=26, buf=0x7fff788bad20 "cā\200", r=0xc73580)
at src/core/ngx_resolver.c:2243
err = <optimized out>
addr = 2822830402
an = 0x7fff788bad4e
next = 0x0
tree = 0xc73610
text = "66.249.64.168\177\000\000\000\000\000\000\000\000\000\000|\255\213x\377\177\000\000\020\066\307\000\000\000\000\000\200\066\307\000\000\000\000\000Д\305\000\000\000\000\000\000\000\000\000\005\377\316\301!\000\000\000\000\000\000\000\020\035\332\000\000\000\000\000\065.255.206.193\177\000\000\000\000\000\000\000\000\000\000g\236@\000\000\000\000", <incomplete sequence \360>
ttl = 83550
octet = <optimized out>
name = {len = 33, data = 0xc5c560 "crawl-66-249-64-168.googlebot.com"}
i = 56
mask = <optimized out>
qident = <optimized out>
ctx = <optimized out>
len = <optimized out>
class = <optimized out>
expire_queue = 0xc73680
rn = 0xdafe80
#7 ngx_resolver_process_response (n=26, buf=0x7fff788bad20 "cā\200", r=0xc73580) at src/core/ngx_resolver.c:1377
q = <optimized out>
err = <optimized out>
times = <optimized out>
nqs = <optimized out>
qtype = <optimized out>
qs = <optimized out>
i = <optimized out>
ident = <optimized out>
qident = <optimized out>
flags = 0
code = 0
response = 0x7fff788bad20
nan = 140735215808010
qclass = 13055504
rn = <optimized out>
#8 ngx_resolver_read_response (rev=0xdd5870) at src/core/ngx_resolver.c:1240
n = 26
c = 0x7f4fd9bd6880
buf = "cā\200\000\001\000\001\000\004\000\004\003\061\066\070\002\066\064\003\062\064\071\002\066\066\ain-addr\004arpa\000\000\f\000\001\300\f\000\f\000\001\000\001F^\000#\023crawl-66-249-64-168\tgooglebot\003com\000\300\020\000\002\000\001\000\001D\367\000\r\003ns3\006google\300V\300\020\000\002\000\001\000\001D\367\000\006\003ns1\300k\300\020\000\002\000\001\000\001D\367\000\006\003ns4\300k\300\020\000\002\000\001\000\001D\367\000\006\003ns2\300k\300\200\000\001\000\001\000\005\071w\000\004\330\357 \n\300\244\000\001\000\001\000\005\071w\000\004\330\357\"\n\300g\000\001\000\001\000\005\071w\000\004\330\357$\n\300\222\000\001\000\001\000\005\071w"...
#9 0x0000000000429933 in ngx_epoll_process_events (cycle=0xc551b0, timer=, flags=) at src/event/modules/ngx_epoll_module.c:691
events = 1
revents = 1
instance = <optimized out>
i = <optimized out>
level = <optimized out>
err = <optimized out>
rev = 0xdd5870
wev = <optimized out>
queue = <optimized out>
c = 0x7f4fd9bd6880
#10 0x000000000042046a in ngx_process_events_and_timers (cycle=cycle@entry=0xc551b0) at src/event/ngx_event.c:248
flags = 1
timer = 57
delta = 1465305138955
#11 0x00000000004279dd in ngx_worker_process_cycle (cycle=cycle@entry=0xc551b0, data=data@entry=0x1) at src/os/unix/ngx_process_cycle.c:851
worker = 1
i = <optimized out>
c = <optimized out>
#12 0x0000000000425f4b in ngx_spawn_process (cycle=cycle@entry=0xc551b0, proc=proc@entry=0x4278ee <ngx_worker_process_cycle>, data=data@entry=0x1,
---Type to continue, or q to quit---
name=name@entry=0x4c706b "worker process", respawn=respawn@entry=-3) at src/os/unix/ngx_process.c:198
on = 1
pid = 0
s = 1
#13 0x0000000000426ca5 in ngx_start_worker_processes (cycle=cycle@entry=0xc551b0, n=4, type=type@entry=-3) at src/os/unix/ngx_process_cycle.c:398
i = <optimized out>
ch = {command = 1, pid = 13062, slot = 0, fd = 3}
#14 0x0000000000428806 in ngx_master_process_cycle (cycle=cycle@entry=0xc551b0) at src/os/unix/ngx_process_cycle.c:160
title = 0xdd23ec "master process /usr/local/senginx/sbin/senginx -c /usr/local/senginx/conf/nginx.conf"
p = <optimized out>
size = <optimized out>
i = <optimized out>
n = <optimized out>
sigio = <optimized out>
set = {__val = {0 <repeats 16 times>}}
itv = {it_interval = {tv_sec = 12936662, tv_usec = 0}, it_value = {tv_sec = 0, tv_usec = 0}}
live = <optimized out>
delay = <optimized out>
ls = <optimized out>
ccf = 0xc562f0
#15 0x0000000000408a3f in main (argc=, argv=) at src/core/nginx.c:407
i = <optimized out>
log = 0x730440
cycle = 0xc551b0
init_cycle = {conf_ctx = 0x0, pool = 0xc54c20, log = 0x730440, new_log = {log_level = 0, file = 0x0, connection = 0, handler = 0, data = 0x0, writer = 0,
wdata = 0x0, action = 0x0, next = 0x0}, log_use_stderr = 0, 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 = 34, data = 0x7fff788bcf49 ""}, conf_param = {len = 0, data = 0x0}, conf_prefix = {len = 24,
data = 0x7fff788bcf49 ""}, prefix = {len = 19, data = 0x4c2493 "/usr/local/senginx/"}, lock_file = {len = 0, data = 0x0}, hostname = {len = 0,
data = 0x0}, session_callback = 0, ip_blacklist_callback = 0, session_enabled = 0 '\000', ip_blacklist_enabled = 0 '\000'}
ccf = <optimized out>
(gdb)