ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: съедание проца



On Thu, Jan 03, 2008 at 10:47:35PM +0500, Nick S. Knutov wrote:

> Hello Igor,
> 
> Ок, обновился, с ./configure --with-debug
> /usr/local/nginx/nginx -v
> nginx version: nginx/0.5.34
> 
> http://supervds.ru/nginx-error-debug01.txt.gz
> 2.5 метра, в несжатом виде - около 500.

Похоже на ошибку в epoll:

2008/01/03 20:38:47 [debug] 25623#0: epoll: fd:11 ev:0001 d:B7550008
...
2008/01/03 20:38:47 [debug] 25623#0: close listening 0.0.0.0:80 #11 
...
2008/01/03 20:38:47 [debug] 25623#0: epoll: stale event B7550008

По идее, после закрытия сокета ядро не должно возвращать события.
Прилагаемый патч должен помочь.
На каких ядрах это стало появляться ?


-- 
Игорь Сысоев
http://sysoev.ru
Index: src/core/ngx_connection.c
===================================================================
--- src/core/ngx_connection.c   (revision 1138)
+++ src/core/ngx_connection.c   (working copy)
@@ -537,13 +537,14 @@
 
         c = ls[i].connection;
 
-        if (ngx_event_flags & NGX_USE_RTSIG_EVENT) {
-            if (c->read->active) {
+        if (c->read->active) {
+            if (ngx_event_flags & NGX_USE_RTSIG_EVENT) {
                 ngx_del_conn(c, NGX_CLOSE_EVENT);
-            }
 
-        } else {
-            if (c->read->active) {
+            } else if (ngx_event_flags & NGX_USE_EPOLL_EVENT) {
+                ngx_del_event(c->read, NGX_READ_EVENT, 0);
+
+            } else {
                 ngx_del_event(c->read, NGX_READ_EVENT, NGX_CLOSE_EVENT);
             }
         }


 




Copyright © Lexa Software, 1996-2009.