pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/www Patch Nginx eventport support to fix a situation w...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fb14323d29be
branches:  trunk
changeset: 358525:fb14323d29be
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Tue Feb 14 10:10:55 2017 +0000

description:
Patch Nginx eventport support to fix a situation where Nginx can stop servicing events when port_getn() returns a timeout.

diffstat:

 www/nginx-devel/distinfo                                                 |   3 +-
 www/nginx-devel/patches/patch-src_event_modules_ngx__eventport__module.c |  25 ++++++++++
 www/nginx/distinfo                                                       |   3 +-
 www/nginx/patches/patch-src_event_modules_ngx__eventport__module.c       |  25 ++++++++++
 4 files changed, 54 insertions(+), 2 deletions(-)

diffs (86 lines):

diff -r a63ce7c1d4e2 -r fb14323d29be www/nginx-devel/distinfo
--- a/www/nginx-devel/distinfo  Tue Feb 14 10:04:27 2017 +0000
+++ b/www/nginx-devel/distinfo  Tue Feb 14 10:10:55 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2016/10/04 10:12:42 fhajny Exp $
+$NetBSD: distinfo,v 1.23 2017/02/14 10:10:55 fhajny Exp $
 
 SHA1 (array-var-nginx-module-0.04.tar.gz) = 1fd3bdd05c2d1d7667ed6f7baa612ddf7f630df3
 RMD160 (array-var-nginx-module-0.04.tar.gz) = a751a2ce87dcfb88d072779097b4df9f42a415e4
@@ -46,3 +46,4 @@
 Size (set-misc-nginx-module-0.30.tar.gz) = 28584 bytes
 SHA1 (patch-auto_install) = 3b3a0f9f4c005b707664554fa57a58c9e3b7de60
 SHA1 (patch-conf_nginx.conf) = ee9fbc3838cc006f6e1cddddadf6603f4941d171
+SHA1 (patch-src_event_modules_ngx__eventport__module.c) = c8e919f48d68bd5bffc4ad11d9c79dc6da3a0de2
diff -r a63ce7c1d4e2 -r fb14323d29be www/nginx-devel/patches/patch-src_event_modules_ngx__eventport__module.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/nginx-devel/patches/patch-src_event_modules_ngx__eventport__module.c  Tue Feb 14 10:10:55 2017 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_event_modules_ngx__eventport__module.c,v 1.1 2017/02/14 10:10:55 fhajny Exp $
+
+Fix a situation where Nginx can stop servicing events when port_getn() returns a timeout.
+
+https://github.com/joyent/nginx/commit/bdd0c625236bc25799bd6f81dcf5d774928e8cb0
+
+--- src/event/modules/ngx_eventport_module.c.orig      2017-01-24 14:02:19.000000000 +0000
++++ src/event/modules/ngx_eventport_module.c
+@@ -468,6 +468,16 @@ ngx_eventport_process_events(ngx_cycle_t
+         ngx_time_update();
+     }
+ 
++    /*
++     * There's a long standing condition with event ports that port_getn() may
++     * return ETIME even when events are available. This would happen if we have
++     * specified a timeout to port_getn() without reaching the number of
++     * requested events.
++     */
++    if (n == -1 && err == ETIME && events > 0) {
++          n = 0;
++    }
++
+     if (n == -1) {
+         if (err == ETIME) {
+             if (timer != NGX_TIMER_INFINITE) {
diff -r a63ce7c1d4e2 -r fb14323d29be www/nginx/distinfo
--- a/www/nginx/distinfo        Tue Feb 14 10:04:27 2017 +0000
+++ b/www/nginx/distinfo        Tue Feb 14 10:10:55 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.53 2016/11/24 11:35:23 maya Exp $
+$NetBSD: distinfo,v 1.54 2017/02/14 10:10:55 fhajny Exp $
 
 SHA1 (array-var-nginx-module-0.04.tar.gz) = 1fd3bdd05c2d1d7667ed6f7baa612ddf7f630df3
 RMD160 (array-var-nginx-module-0.04.tar.gz) = a751a2ce87dcfb88d072779097b4df9f42a415e4
@@ -47,3 +47,4 @@
 SHA1 (patch-aa) = 47f0c19b47b115f00ea6e9432d5bb12058c3bc1c
 SHA1 (patch-ab) = 7d126a4372aa8575ef01a4bfd9aec9898861c763
 SHA1 (patch-auto_lib_pcre_conf) = 500f16808c07ae2fd4016dd662b6f1b0b1efbb91
+SHA1 (patch-src_event_modules_ngx__eventport__module.c) = c8e919f48d68bd5bffc4ad11d9c79dc6da3a0de2
diff -r a63ce7c1d4e2 -r fb14323d29be www/nginx/patches/patch-src_event_modules_ngx__eventport__module.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/nginx/patches/patch-src_event_modules_ngx__eventport__module.c        Tue Feb 14 10:10:55 2017 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_event_modules_ngx__eventport__module.c,v 1.1 2017/02/14 10:10:55 fhajny Exp $
+
+Fix a situation where Nginx can stop servicing events when port_getn() returns a timeout.
+
+https://github.com/joyent/nginx/commit/bdd0c625236bc25799bd6f81dcf5d774928e8cb0
+
+--- src/event/modules/ngx_eventport_module.c.orig      2017-01-24 14:02:19.000000000 +0000
++++ src/event/modules/ngx_eventport_module.c
+@@ -468,6 +468,16 @@ ngx_eventport_process_events(ngx_cycle_t
+         ngx_time_update();
+     }
+ 
++    /*
++     * There's a long standing condition with event ports that port_getn() may
++     * return ETIME even when events are available. This would happen if we have
++     * specified a timeout to port_getn() without reaching the number of
++     * requested events.
++     */
++    if (n == -1 && err == ETIME && events > 0) {
++          n = 0;
++    }
++
+     if (n == -1) {
+         if (err == ETIME) {
+             if (timer != NGX_TIMER_INFINITE) {



Home | Main Index | Thread Index | Old Index