From f4745c3d28190717e27ef98e42e43a554999bf98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agentzh=20=28=E7=AB=A0=E4=BA=A6=E6=98=A5=29?= Date: Wed, 30 Nov 2011 11:36:09 +0800 Subject: [PATCH] fixed a serious regression for linux aio in nginx-1.0.10-epoll_check_stale_wev.patch, thanks Maxim Dounin! released ngx_openresty 1.0.10.21. --- .../nginx-1.0.10-epoll_check_stale_wev.patch | 27 +++++++++---------- util/ver | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/patches/nginx-1.0.10-epoll_check_stale_wev.patch b/patches/nginx-1.0.10-epoll_check_stale_wev.patch index 5a7c52b..c6776be 100644 --- a/patches/nginx-1.0.10-epoll_check_stale_wev.patch +++ b/patches/nginx-1.0.10-epoll_check_stale_wev.patch @@ -1,21 +1,20 @@ --- nginx-1.0.10/src/event/modules/ngx_epoll_module.c 2011-09-30 22:12:53.000000000 +0800 -+++ nginx-1.0.10-patched/src/event/modules/ngx_epoll_module.c 2011-11-07 18:07:04.764111952 +0800 -@@ -681,6 +681,18 @@ - ++++ nginx-1.0.10-patched/src/event/modules/ngx_epoll_module.c 2011-11-30 11:08:46.775817019 +0800 +@@ -682,6 +682,17 @@ wev = c->write; -+ if (c->fd == -1 || wev->instance != instance) { -+ -+ /* -+ * the stale event from a file descriptor -+ * that was just closed in this iteration -+ */ + if ((revents & EPOLLOUT) && wev->active) { ++ if (c->fd == -1 || wev->instance != instance) { + -+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, -+ "epoll: stale event %p", c); -+ continue; -+ } ++ /* ++ * the stale event from a file descriptor ++ * that was just closed in this iteration ++ */ + - if ((revents & EPOLLOUT) && wev->active) { ++ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, ++ "epoll: stale event %p", c); ++ continue; ++ } if (flags & NGX_POST_THREAD_EVENTS) { + wev->posted_ready = 1; diff --git a/util/ver b/util/ver index 5178b53..1d7e66f 100755 --- a/util/ver +++ b/util/ver @@ -1,7 +1,7 @@ #!/bin/bash main_ver=1.0.10 -minor_ver=19 +minor_ver=21 version=$main_ver.$minor_ver echo $version