From 31faac1d52a62ef6b9e754b66b7b9d4bccb5f499 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Thu, 2 Feb 2023 17:53:22 +0800 Subject: [PATCH 1/3] disable ngx_lua_assert --- .../patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch b/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch index 71b6d580d384..0f178341e37d 100644 --- a/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch +++ b/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch @@ -673,7 +673,7 @@ index f71a3e00..0d403716 100644 + + items = (ngx_http_lua_balancer_keepalive_item_t *) (&upool->free + 1); + -+ ngx_http_lua_assert((void *) items == ngx_align_ptr(items, NGX_ALIGNMENT)); ++ /*ngx_http_lua_assert((void *) items == ngx_align_ptr(items, NGX_ALIGNMENT));*/ + + for (i = 0; i < cpool_size; i++) { + ngx_queue_insert_head(&upool->free, &items[i].queue); From 9728b164e4d37707d4161f234830c0befa2d0301 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Fri, 3 Feb 2023 14:54:17 +0800 Subject: [PATCH 2/3] remove assert --- .../patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch b/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch index 0f178341e37d..046ae90fa4b6 100644 --- a/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch +++ b/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch @@ -673,8 +673,6 @@ index f71a3e00..0d403716 100644 + + items = (ngx_http_lua_balancer_keepalive_item_t *) (&upool->free + 1); + -+ /*ngx_http_lua_assert((void *) items == ngx_align_ptr(items, NGX_ALIGNMENT));*/ -+ + for (i = 0; i < cpool_size; i++) { + ngx_queue_insert_head(&upool->free, &items[i].queue); + items[i].cpool = upool; From 300a32f8eb85c2e04cf4b1a52c81520e7c5e2ed1 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Fri, 3 Feb 2023 15:04:15 +0800 Subject: [PATCH 3/3] fix patch --- .../patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch b/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch index 046ae90fa4b6..84304498b42e 100644 --- a/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch +++ b/build/openresty/patches/ngx_lua-0.10.21_02-dyn_upstream_keepalive.patch @@ -673,6 +673,8 @@ index f71a3e00..0d403716 100644 + + items = (ngx_http_lua_balancer_keepalive_item_t *) (&upool->free + 1); + ++ ++ + for (i = 0; i < cpool_size; i++) { + ngx_queue_insert_head(&upool->free, &items[i].queue); + items[i].cpool = upool;