<meta charset="utf-8"><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; "><div style="color: rgb(51, 51, 51); ">Hi,</div><div style="color: rgb(51, 51, 51); ">
<br></div><div style="color: rgb(51, 51, 51); ">we reproduced the problem and below is the content of fcn:</div><div style="color: rgb(51, 51, 51); "><br></div><div style="color: rgb(51, 51, 51); ">(gdb) p *fcn</div><div style="color: rgb(51, 51, 51); ">
$1 = {node = {key = 2417939894599905030, left = 0x2b822d64f780, right = 0x2b822ada9a00, parent = 0x2b822bac7080, color = 0 &#39;\000&#39;, </div><div style="color: rgb(51, 51, 51); ">    data = 0 &#39;\000&#39;}, queue = {prev = 0x2b822afd63a8, next = 0x2b822ad45040}, key = &quot;\177\215\220\215h!?T&quot;, count = 1, uses = 1, </div>
<div><font class="Apple-style-span" color="#333333">  valid_msec = 0, error = 0, exists = 1, updating = 0, </font><font class="Apple-style-span" color="#3333ff">deleting = 1</font><font class="Apple-style-span" color="#333333">, uniq = 7209021, expire = 1311055359, valid_sec = 0, </font></div>
<div style="color: rgb(51, 51, 51); ">  body_start = 905, fs_size = 2}</div><div style="color: rgb(51, 51, 51); ">(gdb) </div><div style="color: rgb(51, 51, 51); "><br></div><div style="color: rgb(51, 51, 51); ">So I guess we should apply the patch?</div>
<div style="color: rgb(51, 51, 51); "><br></div></span></font><br><div class="gmail_quote">On Wed, Jul 13, 2011 at 4:20 PM, 杨镭 <span dir="ltr">&lt;<a href="mailto:clanherb@gmail.com">clanherb@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<div><br></div><div>we didn&#39;t take core dump. If we can reproduce the problem, I&#39;ll bring you the p *fcn content.<div>
<div></div><div class="h5"><br><br><div class="gmail_quote">On Tue, Jul 12, 2011 at 10:08 PM, Maxim Dounin <span dir="ltr">&lt;<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<div><br>
On Tue, Jul 12, 2011 at 09:31:07PM +0800, 杨镭 wrote:<br>
<br>
&gt; After reload, all the worker processes, including newly forked ones, goes<br>
&gt; straight to 100% CPU:<br>
<br>
</div>[...]<br>
<div><br>
&gt; Also, we took backtrace for cache manger process:<br>
&gt;<br>
&gt;<br>
&gt; Attaching to process 17306<br>
&gt; ngx_http_file_cache_expire (data=&lt;value optimized out&gt;) at<br>
&gt; src/http/ngx_http_file_cache.c:1096<br>
&gt; 1096            if (fcn-&gt;count == 0) {<br>
&gt; (gdb) bt<br>
&gt; #0  ngx_http_file_cache_expire (data=&lt;value optimized out&gt;) at<br>
&gt; src/http/ngx_http_file_cache.c:1096<br>
<br>
</div>Could you please show<br>
<br>
p *fcn<br>
<br>
?<br>
<br>
I think I see the problem, but just to make sure.<br>
<br>
If you are able to reproduce the problem please try the following<br>
patch:<br>
<br>
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c<br>
--- a/src/http/ngx_http_file_cache.c<br>
+++ b/src/http/ngx_http_file_cache.c<br>
@@ -1099,7 +1099,8 @@ ngx_http_file_cache_expire(ngx_http_file<br>
         }<br>
<br>
         if (fcn-&gt;deleting) {<br>
-            continue;<br>
+            wait = 1;<br>
+            break;<br>
         }<br>
<br>
         p = ngx_hex_dump(key, (u_char *) &amp;fcn-&gt;node.key,<br>
<br>
<br>
Maxim Dounin<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br><br clear="all"><br></div></div>-- <br>lei yang<br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>lei yang<br>