<div>(gdb) fr 0</div><div>#0 ngx_http_upstream_handler (ev=0x7fc45735f8a8)</div><div> at src/http/ngx_http_upstream.c:915</div><div>915<span class="Apple-tab-span" style="white-space:pre"> </span> ctx->current_request = r;</div>
<div>(gdb) p ngx_cycle->log</div><div>$1 = (ngx_log_t *) 0x21f19a8</div><div>(gdb) p *r</div><div>$2 = {signature = 51686928, connection = 0x23b4160, ctx = 0x0, </div><div> main_conf = 0x0, srv_conf = 0x23e6dc8, loc_conf = 0x2216d58, </div>
<div> read_event_handler = 0x42d5dd <ngx_http_block_reading>, </div><div> write_event_handler = 0x42d2a6 <ngx_http_request_empty_handler>, </div><div> cache = 0x0, upstream = 0x0, upstream_states = 0x0, pool = 0x23e92d0, </div>
<div> header_in = 0x2309ea0, headers_in = {headers = {last = 0x22a27f0, part = {</div><div> elts = 0x23e9ae8, nelts = 5, next = 0x0}, size = 48, nalloc = 20, </div><div> pool = 0x23e92d0}, host = 0x23e9b78, connection = 0x0, </div>
<div> if_modified_since = 0x0, if_unmodified_since = 0x0, </div><div> user_agent = 0x23e9b48, referer = 0x0, content_length = 0x0, </div><div> content_type = 0x0, range = 0x0, if_range = 0x0, transfer_encoding = 0x0, </div>
<div> expect = 0x0, accept_encoding = 0x0, via = 0x0, authorization = 0x0, </div><div> keep_alive = 0x0, x_forwarded_for = 0x0, user = {len = 0, data = 0x0}, </div><div> passwd = {len = 0, data = 0x0}, cookies = {elts = 0x23e9ea8, nelts = 0, </div>
<div> size = 8, nalloc = 2, pool = 0x23e92d0}, server = {len = 14, </div><div> data = 0x23e9edb "static.loli.myconnectioner-ag\360\324,\002"}, </div><div> content_length_n = -1, keep_alive_n = -1, connection_type = 1, msie = 1, </div>
<div> msie6 = 1, opera = 0, gecko = 0, chrome = 0, safari = 0, konqueror = 0}, </div><div> headers_out = {headers = {last = 0x22a2920, part = {elts = 0x23e9320, </div><div> nelts = 4, next = 0x0}, size = 48, nalloc = 20, pool = 0x23e92d0}, </div>
<div> status = 200, status_line = {len = 0, data = 0x0}, server = 0x0, </div><div> date = 0x0, content_length = 0x0, content_encoding = 0x0, location = 0x0, </div><div> refresh = 0x0, last_modified = 0x0, content_range = 0x0, </div>
<div>---Type <return> to continue, or q <return> to quit---</div><div> accept_ranges = 0x23e93b0, www_authenticate = 0x0, expires = 0x23e9320, </div><div> etag = 0x0, override_charset = 0x0, content_type_len = 24, content_type = {</div>
<div> len = 24, data = 0x23e5bf0 "application/x-javascript"}, charset = {</div><div> len = 0, data = 0x0}, </div><div> content_type_lowcase = 0x23ea1e8 "application/x-javascripts\016>\002", </div>
<div> content_type_hash = 15285649345721276481, cache_control = {</div><div> elts = 0x23ea188, nelts = 1, size = 8, nalloc = 1, pool = 0x23e92d0}, </div><div> content_length_n = 19773, date_time = 0, last_modified_time = 1313998502}, </div>
<div> request_body = 0x0, lingering_time = 1315110106, start_sec = 1315110076, </div><div> start_msec = 683, method = 2, http_version = 1001, request_line = {len = 0, </div><div> data = 0x314ae20 "\360\f>\002"}, uri = {len = 15, data = 0x314ae24 ""}, </div>
<div> args = {len = 0, data = 0x0}, exten = {len = 2, data = 0x314ae31 ""}, </div><div> unparsed_uri = {len = 15, data = 0x314ae24 ""}, method_name = {len = 3, </div><div> data = 0x314ae20 "\360\f>\002"}, http_protocol = {len = 8, </div>
<div> data = 0x314ae34 ""}, out = 0x0, main = 0x22a2780, parent = 0x0, </div><div> postponed = 0x0, post_subrequest = 0x0, posted_requests = 0x0, </div><div> virtual_names = 0x2465c20, phase_handler = 11, content_handler = 0, </div>
<div> access_code = 0, variables = 0x23e9808, ncaptures = 4, captures = 0x23e9ff0, </div><div> captures_data = 0x314ae24 "", limit_rate = 0, header_size = 339, </div><div> request_length = 183, err_status = 0, http_connection = 0x23b4228, </div>
<div> log_handler = 0x42da14 <ngx_http_log_error_handler>, cleanup = 0x0, </div><div> subrequests = 51, count = 0, blocked = 0, aio = 0, http_state = 2, </div><div> complex_uri = 0, quoted_uri = 0, plus_in_uri = 0, space_in_uri = 0, </div>
<div>---Type <return> to continue, or q <return> to quit---</div><div> invalid_header = 0, add_uri_to_alias = 0, valid_location = 1, </div><div> valid_unparsed_uri = 1, uri_changed = 0, uri_changes = 11, </div>
<div> request_body_in_single_buf = 0, request_body_in_file_only = 0, </div><div> request_body_in_persistent_file = 0, request_body_in_clean_file = 0, </div><div> request_body_file_group_access = 0, request_body_file_log_level = 5, </div>
<div> subrequest_in_memory = 0, waited = 0, cached = 0, gzip_tested = 1, </div><div> gzip_ok = 0, gzip_vary = 1, proxy = 0, bypass_cache = 0, no_cache = 0, </div><div> limit_zone_set = 0, limit_req_set = 0, pipeline = 0, plain_http = 0, </div>
<div> chunked = 0, header_only = 0, keepalive = 0, lingering_close = 0, </div><div> discard_body = 0, internal = 0, error_page = 0, ignore_content_encoding = 0, </div><div> filter_finalize = 0, post_action = 0, request_complete = 1, </div>
<div> request_output = 1, header_sent = 1, expect_tested = 0, root_tested = 1, </div><div> done = 1, logged = 0, buffered = 0, main_filter_need_in_memory = 0, </div><div> filter_need_in_memory = 0, filter_need_temporary = 0, allow_ranges = 1, </div>
<div> stat_reading = 0, stat_writing = 1, state = 0, </div><div> header_hash = 2715320498552542, lowcase_index = 10, </div><div> lowcase_header = "connectionguage", '\000' <repeats 16 times>, </div>
<div> header_name_start = 0x314aed5 "\r\nible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MALN; InfoPath.1; Media Center PC 6.0; Tablet PC 2.0; .NET4.0C; .NET4.0E)", </div>
<div> header_name_end = 0x314aecc "", header_start = 0x314aece "close", </div><div> header_end = 0x314aed5 "\r\nible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MALN; Info---Type <return> to continue, or q <return> to quit---</div>
<div>Path.1; Media Center PC 6.0; Tablet PC 2.0; .NET4.0C; .NET4.0E)", </div><div> uri_start = 0x314ae24 "", uri_end = 0x314ae33 "", uri_ext = 0x314ae31 "", </div><div> args_start = 0x0, request_start = 0x314ae20 "\360\f>\002", </div>
<div> request_end = 0x314ae3c "", method_end = 0x314ae22 ">\002", </div><div> schema_start = 0x0, schema_end = 0x0, host_start = 0x0, host_end = 0x0, </div><div> port_start = 0x0, port_end = 0x0, http_minor = 1264, http_major = 0}</div>
<div>(gdb) p *r->connection</div><div>$3 = {data = 0x30, read = 0x111, write = 0x22a2770, fd = 36740720, </div><div> recv = 0x2309e80, send = 0, recv_chain = 0xb0, send_chain = 0x23b4170, </div><div> listening = 0x0, sent = 36740848, log = 0x0, pool = 0x23b41d0, </div>
<div> sockaddr = 0xf088e714b9a0002, socklen = 0, addr_text = {len = 4, </div><div> data = 0x21f1c18 "S"}, ssl = 0x3cc35a0, local_sockaddr = 0x42d957, </div><div> buffer = 0x23b4210, queue = {prev = 0x465bfc, next = 0x2e3234312e333131}, </div>
<div> number = 3256446919138946616, requests = 140481256921360, buffered = 0, </div><div> log_error = 0, single_connection = 0, unexpected_eof = 0, timedout = 0, </div><div> error = 0, destroyed = 0, idle = 0, reusable = 0, close = 0, sendfile = 0, </div>
<div> sndlowat = 0, tcp_nodelay = 0, tcp_nopush = 0}</div><br><div class="gmail_quote">2011/9/5 Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello!<br>
<div><div></div><div class="h5"><br>
On Mon, Sep 05, 2011 at 02:31:54AM +0800, MagicBear wrote:<br>
<br>
> (gdb) fr 0<br>
> #0 ngx_http_upstream_handler (ev=0x7fc45735f8a8)<br>
> at src/http/ngx_http_upstream.c:915<br>
> 915 ctx->current_request = r;<br>
> (gdb) p *ev<br>
> $1 = {data = 0x7fc4576aa750, write = 1, accept = 0, instance = 1, active =<br>
> 1,<br>
> disabled = 0, ready = 1, oneshot = 0, complete = 0, eof = 0, error = 0,<br>
> timedout = 1, timer_set = 0, delayed = 0, read_discarded = 0,<br>
> unexpected_eof = 0, deferred_accept = 0, pending_eof = 0, posted_ready =<br>
> 0,<br>
> available = 0, handler = 0x43bf9c <ngx_http_upstream_handler>,<br>
> index = 3503345872, log = 0x21f1770, timer = {key = 0, left = 0x0,<br>
> right = 0x0, parent = 0x0, color = 0 '\000', data = 0 '\000'},<br>
> closed = 0, channel = 0, resolver = 0, next = 0x0, prev = 0x0}<br>
> (gdb) p *((ngx_connection_t *) ev->data)<br>
> $2 = {data = 0x22a2780, read = 0x7fc4575008a8, write = 0x7fc45735f8a8,<br>
> fd = 66, recv = 0x41cc50 <ngx_unix_recv>, send = 0x41cf08<br>
> <ngx_unix_send>,<br>
> recv_chain = 0x41cd00 <ngx_readv_chain>,<br>
> send_chain = 0x421050 <ngx_linux_sendfile_chain>, listening = 0x0,<br>
> sent = 0, log = 0x21f1770, pool = 0x237ff70, sockaddr = 0x0, socklen = 0,<br>
> addr_text = {len = 0, data = 0x0}, ssl = 0x0, local_sockaddr = 0x0,<br>
> buffer = 0x0, queue = {prev = 0x0, next = 0x0}, number = 63713716,<br>
> requests = 0, buffered = 0, log_error = 1, single_connection = 0,<br>
> unexpected_eof = 0, timedout = 0, error = 0, destroyed = 0, idle = 0,<br>
> reusable = 0, close = 0, sendfile = 1, sndlowat = 0, tcp_nodelay = 0,<br>
> tcp_nopush = 0}<br>
<br>
</div></div>Could you please also show the following (in the same frame, i.e.<br>
after "fr 0"):<br>
<br>
p ngx_cycle->log<br>
p *r<br>
p *r->connection<br>
<font color="#888888"><br>
Maxim Dounin<br>
</font><div><div></div><div class="h5"><br>
><br>
><br>
> 2011/9/5 Maxim Dounin <<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>><br>
><br>
> > Hello!<br>
> ><br>
> > On Sun, Sep 04, 2011 at 01:33:59PM -0400, magicbear wrote:<br>
> ><br>
> > > Hello , when run for 5 days, today have 2 segment failure.<br>
> > ><br>
> > > 2011/09/04 12:00:47 [alert] 32147#0: worker process 8496 exited on<br>
> > > signal 11 (core dumped)<br>
> > > 2011/09/04 12:17:32 [alert] 8497#0: ignore long locked inactive cache<br>
> > > entry 57c7c6c612a651727b880a1c9a2c7d2d, count:1<br>
> > > 2011/09/04 12:21:31 [alert] 32147#0: worker process 19185 exited on<br>
> > > signal 11 (core dumped)<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > Core was generated by `nginx:'.<br>
> > > Program terminated with signal 11, Segmentation fault.<br>
> > > #0 ngx_http_upstream_handler (ev=0x7fc45735f8a8) at<br>
> > > src/http/ngx_http_upstream.c:915<br>
> > > 915 ctx->current_request = r;<br>
> > > (gdb) bt<br>
> > > #0 ngx_http_upstream_handler (ev=0x7fc45735f8a8) at<br>
> > > src/http/ngx_http_upstream.c:915<br>
> > > #1 0x0000000000419e95 in ngx_event_expire_timers () at<br>
> > > src/event/ngx_event_timer.c:149<br>
> > > #2 0x0000000000419ac7 in ngx_process_events_and_timers<br>
> > > (cycle=0x21f1990) at src/event/ngx_event.c:261<br>
> ><br>
> > Hm, this looks identical to one you've reported previously. Do<br>
> > you have patch from<br>
> ><br>
> > <a href="http://mailman.nginx.org/pipermail/nginx/2011-August/028809.html" target="_blank">http://mailman.nginx.org/pipermail/nginx/2011-August/028809.html</a><br>
> ><br>
> > applied?<br>
> ><br>
> > > #3 0x000000000041f76e in ngx_worker_process_cycle (cycle=0x21f1990,<br>
> > > data=<value optimized out>) at src/os/unix/ngx_process_cycle.c:800<br>
> > > #4 0x000000000041e16b in ngx_spawn_process (cycle=0x21f1990,<br>
> > > proc=0x41f69d <ngx_worker_process_cycle>, data=0x0, name=0x463f3d<br>
> > > "worker process", respawn=7) at src/os/unix/ngx_process.c:196<br>
> > > #5 0x000000000042008d in ngx_reap_children (cycle=0x21f1990) at<br>
> > > src/os/unix/ngx_process_cycle.c:617<br>
> > > #6 ngx_master_process_cycle (cycle=0x21f1990) at<br>
> > > src/os/unix/ngx_process_cycle.c:180<br>
> > > #7 0x0000000000406061 in main (argc=<value optimized out>, argv=<value<br>
> > > optimized out>) at src/core/nginx.c:405<br>
> > ><br>
> > ><br>
> > > (gdb) bt full<br>
> > > #0 ngx_http_upstream_handler (ev=0x7fc45735f8a8) at<br>
> > > src/http/ngx_http_upstream.c:915<br>
> > > c = 0x23b4160<br>
> > > r = 0x22a2780<br>
> > > ctx = <error reading variable ctx (Cannot access memory at<br>
> > > address 0x20)><br>
> > > u = 0x0<br>
> ><br>
> > Could you please show results of the following gdb commands:<br>
> ><br>
> > fr 0<br>
> > p *ev<br>
> > p *((ngx_connection_t *) ev->data)<br>
> ><br>
> ><br>
> > Maxim Dounin<br>
> ><br>
> > _______________________________________________<br>
> > nginx mailing list<br>
> > <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> ><br>
<br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br>