<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.17097" name=GENERATOR>
<STYLE>@font-face {
        font-family: 宋体;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; FONT-FAMILY: Verdana; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="FONT-SIZE: 10pt; MARGIN: 10px; FONT-FAMILY: verdana">
<DIV><FONT face=Verdana color=#000080 size=2>i think you could see the key
word "[debug]", can't you ? that means it is NOT an error, just a normal
case.</FONT></DIV>
<DIV><FONT color=#000080>u can configure nginx to use the accept mutex
lock.</FONT></DIV>
<DIV><FONT color=#000080>these may be the case :</FONT></DIV>
<DIV><FONT color=#000080> worker proccess 1:</FONT></DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080>1. try to get accept mutex
lock, let's assume it success to get lock, it will add the listen fd
to epoll </FONT></DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080>2. epoll_wait with
max 500ms timer, then deal with events return from
epoll_wait.</FONT> </DIV>
<DIV> worker proccess 2:</DIV>
<DIV><FONT face=Verdana color=#000080 size=2>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080>1. try to get accept mutex
lock, let's assume it does NOT success to get lock, it will NOT
add the listen fd to epoll </FONT></DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080>2. epoll_wait with
max 500ms timer, then deal with events return from
epoll_wait.</FONT></DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV>accept mutex lock is useful in some system that still have thunder-herd
problems, and it is said that linux does NOT have this problem now.</DIV>
<DIV> </DIV></FONT></DIV>
<DIV><FONT face=Verdana color=#000080 size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#c0c0c0 size=2>2011-06-08 </FONT></DIV><FONT
face=Verdana color=#000080 size=2>
<HR style="WIDTH: 100px" align=left color=#b5c4df SIZE=1>
</FONT>
<DIV><FONT face=Verdana color=#c0c0c0 size=2><SPAN>tegrof</SPAN> </FONT></DIV>
<HR color=#b5c4df SIZE=1>
<DIV><FONT face=Verdana size=2><STRONG>发件人:</STRONG> Zhu Qun-Ying </FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>发送时间:</STRONG> 2011-06-08 01:48:31
</FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>收件人:</STRONG> nginx-devel </FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>抄送:</STRONG> </FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>主题:</STRONG> multiple worker processes
(problem or normal?) </FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>
<DIV>Hi,</DIV>
<DIV></DIV>
<DIV>When testing nginx 1.0.4, I found the error message from error.log:</DIV>
<DIV></DIV>
<DIV>2011/06/07 10:36:29 [debug] 10939#0: timer delta: 501</DIV>
<DIV>2011/06/07 10:36:29 [debug] 10939#0: posted events 00000000</DIV>
<DIV>2011/06/07 10:36:29 [debug] 10939#0: worker cycle</DIV>
<DIV>2011/06/07 10:36:29 [debug] 10939#0: accept mutex lock failed: 0</DIV>
<DIV>2011/06/07 10:36:29 [debug] 10939#0: epoll timer: 500</DIV>
<DIV>2011/06/07 10:36:29 [debug] 10939#0: timer delta: 500</DIV>
<DIV>2011/06/07 10:36:29 [debug] 10939#0: posted events 00000000</DIV>
<DIV>2011/06/07 10:36:29 [debug] 10939#0: worker cycle</DIV>
<DIV>2011/06/07 10:36:29 [debug] 10939#0: accept mutex lock failed: 0</DIV>
<DIV>2011/06/07 10:36:29 [debug] 10939#0: epoll timer: 500</DIV>
<DIV>2011/06/07 10:36:30 [debug] 10939#0: timer delta: 501</DIV>
<DIV>2011/06/07 10:36:30 [debug] 10939#0: posted events 00000000</DIV>
<DIV>2011/06/07 10:36:30 [debug] 10939#0: worker cycle</DIV>
<DIV>2011/06/07 10:36:30 [debug] 10939#0: accept mutex lock failed: 0</DIV>
<DIV>2011/06/07 10:36:30 [debug] 10939#0: epoll timer: 500</DIV>
<DIV>2011/06/07 10:36:30 [debug] 10939#0: timer delta: 501</DIV>
<DIV>2011/06/07 10:36:30 [debug] 10939#0: posted events 00000000</DIV>
<DIV>2011/06/07 10:36:30 [debug] 10939#0: worker cycle</DIV>
<DIV>2011/06/07 10:36:30 [debug] 10939#0: accept mutex lock failed: 0</DIV>
<DIV>2011/06/07 10:36:30 [debug] 10939#0: epoll timer: 500</DIV>
<DIV>2011/06/07 10:36:31 [debug] 10939#0: timer delta: 500</DIV>
<DIV></DIV>
<DIV>It keeps repeating itself every half a second trying to acquired the </DIV>
<DIV>accept lock.</DIV>
<DIV> Does it normal?</DIV>
<DIV></DIV>
<DIV>My system is Slackware 13.37, uname -a output:</DIV>
<DIV></DIV>
<DIV>Linux qy83 2.6.39.1 #1 SMP PREEMPT Fri Jun 3 14:00:11 PDT 2011 i686 </DIV>
<DIV>Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz GenuineIntel GNU/Linux</DIV>
<DIV></DIV>
<DIV>ps output:</DIV>
<DIV></DIV>
<DIV>10937 ? Ss 0:00 nginx: master process /usr/sbin/nginx -c </DIV>
<DIV>/etc/nginx/n</DIV>
<DIV>10938 ? S 0:00 nginx: worker process</DIV>
<DIV>10939 ? S 0:00 nginx: worker process</DIV>
<DIV></DIV>
<DIV>nginx -V output:</DIV>
<DIV>nginx: nginx version: nginx/1.0.4</DIV>
<DIV>nginx: TLS SNI support enabled</DIV>
<DIV>nginx: configure arguments: --prefix=/usr --sbin-path=/usr/sbin/nginx </DIV>
<DIV>--conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid </DIV>
<DIV>--lock-path=/var/lock/nginx --user=nobody --group=nogroup </DIV>
<DIV>--error-log-path=/var/log/nginx/error.log </DIV>
<DIV>--http-log-path=/var/log/nginx/access.log --with-rtsig_module </DIV>
<DIV>--with-select_module --with-poll_module --with-http_ssl_module </DIV>
<DIV>--with-http_realip_module --with-http_addition_module </DIV>
<DIV>--with-http_xslt_module --with-http_sub_module --with-http_dav_module </DIV>
<DIV>--with-http_flv_module --with-http_gzip_static_module </DIV>
<DIV>--with-http_random_index_module --with-http_secure_link_module </DIV>
<DIV>--with-http_stub_status_module --with-http_perl_module </DIV>
<DIV>--with-perl_modules_path=/usr/lib/perl5/vendor_perl/5.12.3 </DIV>
<DIV>--http-client-body-temp-path=/var/tmp/nginx_client_body_temp </DIV>
<DIV>--http-proxy-temp-path=/var/tmp/nginx_proxy_temp </DIV>
<DIV>--http-fastcgi-temp-path=/dev/shm --without-mail_pop3_module </DIV>
<DIV>--without-mail_imap_module --without-mail_smtp_module --with-debug</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>cat /proc/cpuinfo</DIV>
<DIV>processor : 0</DIV>
<DIV>vendor_id : GenuineIntel</DIV>
<DIV>cpu family : 6</DIV>
<DIV>model : 23</DIV>
<DIV>model name
: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz</DIV>
<DIV>stepping : 10</DIV>
<DIV>cpu MHz : 2000.000</DIV>
<DIV>cache size : 6144 KB</DIV>
<DIV>physical id : 0</DIV>
<DIV>siblings : 2</DIV>
<DIV>core id : 0</DIV>
<DIV>cpu cores : 2</DIV>
<DIV>apicid : 0</DIV>
<DIV>initial apicid : 0</DIV>
<DIV>fdiv_bug : no</DIV>
<DIV>hlt_bug : no</DIV>
<DIV>f00f_bug : no</DIV>
<DIV>coma_bug : no</DIV>
<DIV>fpu : yes</DIV>
<DIV>fpu_exception : yes</DIV>
<DIV>cpuid level : 13</DIV>
<DIV>wp : yes</DIV>
<DIV>flags
: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat </DIV>
<DIV>pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc </DIV>
<DIV>arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 </DIV>
<DIV>ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority</DIV>
<DIV>bogomips : 6000.17</DIV>
<DIV>clflush size : 64</DIV>
<DIV>cache_alignment : 64</DIV>
<DIV>address sizes
: 36 bits physical, 48 bits virtual</DIV>
<DIV>power management:</DIV>
<DIV></DIV>
<DIV>processor : 1</DIV>
<DIV>vendor_id : GenuineIntel</DIV>
<DIV>cpu family : 6</DIV>
<DIV>model : 23</DIV>
<DIV>model name
: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz</DIV>
<DIV>stepping : 10</DIV>
<DIV>cpu MHz : 2000.000</DIV>
<DIV>cache size : 6144 KB</DIV>
<DIV>physical id : 0</DIV>
<DIV>siblings : 2</DIV>
<DIV>core id : 1</DIV>
<DIV>cpu cores : 2</DIV>
<DIV>apicid : 1</DIV>
<DIV>initial apicid : 1</DIV>
<DIV>fdiv_bug : no</DIV>
<DIV>hlt_bug : no</DIV>
<DIV>f00f_bug : no</DIV>
<DIV>coma_bug : no</DIV>
<DIV>fpu : yes</DIV>
<DIV>fpu_exception : yes</DIV>
<DIV>cpuid level : 13</DIV>
<DIV>wp : yes</DIV>
<DIV>flags
: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat </DIV>
<DIV>pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc </DIV>
<DIV>arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 </DIV>
<DIV>ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority</DIV>
<DIV>bogomips : 5999.65</DIV>
<DIV>clflush size : 64</DIV>
<DIV>cache_alignment : 64</DIV>
<DIV>address sizes
: 36 bits physical, 48 bits virtual</DIV>
<DIV>power management:</DIV>
<DIV>_______________________________________________</DIV>
<DIV>nginx-devel mailing list</DIV>
<DIV>nginx-devel@nginx.org</DIV>
<DIV>http://nginx.org/mailman/listinfo/nginx-devel</DIV>
<DIV></DIV></FONT></DIV></BODY></HTML>