Modify

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#17317 closed defect (fixed)

nginx floods log

Reported by: raver@… Owned by: developers
Priority: normal Milestone:
Component: packages Version: Barrier Breaker 14.07
Keywords: nginx Cc:

Description

Hi,
Nginx is currently flooding logs.

Arch: ar71xx
Revison: barrier_breaker r41890

~# cat /var/log/nginx/error.log 
DEBUG: pos: 0x7bb960, last: 0x7bbb03, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb98b, last: 0x7bbb03, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb960, last: 0x7bbb09, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb991, last: 0x7bbb09, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb960, last: 0x7bbb03, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb98b, last: 0x7bbb03, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb960, last: 0x7bbb03, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb98b, last: 0x7bbb03, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb960, last: 0x7bbb09, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb991, last: 0x7bbb09, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb960, last: 0x7bbb03, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb98b, last: 0x7bbb03, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb960, last: 0x7bbb09, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb991, last: 0x7bbb09, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb960, last: 0x7bbb03, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb98b, last: 0x7bbb03, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb960, last: 0x7bbb10, start: 0x7bb960, end: 0x7bbd60
DEBUG: pos: 0x7bb998, last: 0x7bbb10, start: 0x7bb960, end: 0x7bbd60
....

Here's my log setup,

...
error_log   /var/log/nginx/error.log crit;
...
http {
    ...
    access_log   off;
    ...
}

and nginx compile options.

~# nginx -V
nginx version: nginx/1.4.7
built by gcc 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r41888) 
configure arguments: --crossbuild=Linux::mips --prefix=/usr --conf-path=/etc/nginx/nginx.conf --add-module=/home/raver/OpenWrt/barrier_breaker/build_dir/target-mips_24kc_uClibc-0.9.33.2/nginx-1.4.7/nginx-naxsi/naxsi_src --without-http-cache --add-module=/home/raver/OpenWrt/barrier_breaker/build_dir/target-mips_24kc_uClibc-0.9.33.2/nginx-1.4.7/nginx-syslog --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-cc=mips-openwrt-linux-uclibc-gcc --with-cc-opt='-I/home/raver/OpenWrt/barrier_breaker/staging_dir/target-mips_24kc_uClibc-0.9.33.2/usr/include -I/home/raver/OpenWrt/barrier_breaker/staging_dir/target-mips_24kc_uClibc-0.9.33.2/include -I/home/raver/OpenWrt/barrier_breaker/staging_dir/toolchain-mips_24kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/raver/OpenWrt/barrier_breaker/staging_dir/toolchain-mips_24kc_gcc-4.8-linaro_uClibc-0.9.33.2/include -march=24kc -mtune=24kc -Os -pipe -mno-branch-likely -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16' --with-ld-opt='-L/home/raver/OpenWrt/barrier_breaker/staging_dir/target-mips_24kc_uClibc-0.9.33.2/usr/lib -L/home/raver/OpenWrt/barrier_breaker/staging_dir/target-mips_24kc_uClibc-0.9.33.2/lib -L/home/raver/OpenWrt/barrier_breaker/staging_dir/toolchain-mips_24kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/raver/OpenWrt/barrier_breaker/staging_dir/toolchain-mips_24kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib'

I have another device running flawlessly an older nginx version (1.4.4) with the same setup.

Attachments (0)

Change History (6)

comment:1 Changed 4 years ago by raver@…

I found that it part of '400-nginx-1.4.x_proxy_protocol_patch_v2.patch' that's introducing this bug, probably some leftover code.
The following patch solves the problem.

diff --git a/net/nginx/patches/400-nginx-1.4.x_proxy_protocol_patch_v2.patch b/net/nginx/patches/400-nginx-1.4.x_proxy_protocol_patch_v2.patch
index 52c1ce7..ba63834 100644
--- a/net/nginx/patches/400-nginx-1.4.x_proxy_protocol_patch_v2.patch
+++ b/net/nginx/patches/400-nginx-1.4.x_proxy_protocol_patch_v2.patch
@@ -882,17 +882,6 @@ Index: nginx-1.4.7/src/http/ngx_http_request.c
  
  #if (NGX_HTTP_SSL)
  
-@@ -1291,6 +1368,10 @@ ngx_http_read_request_header(ngx_http_re
-     c = r->connection;
-     rev = c->read;
- 
-+fprintf(stderr, "DEBUG: pos: %p, last: %p, start: %p, end: %p\n",
-+              r->header_in->pos, r->header_in->last, r->header_in->start,
-+              r->header_in->end);
-+
-     n = r->header_in->last - r->header_in->pos;
- 
-     if (n > 0) {
 Index: nginx-1.4.7/src/http/ngx_http_upstream.c
 ===================================================================
 --- nginx-1.4.7.orig/src/http/ngx_http_upstream.c

comment:2 Changed 4 years ago by heil

Hi,

I will try to fix it asop.

comment:3 follow-up: Changed 4 years ago by heil

Hi,

Thanks for reporting and the patch. https://github.com/openwrt/packages/commit/92bd6b1f49f3e5ff81a4b99339553c9666dd9257 should fix the issue.

comment:4 Changed 4 years ago by heil

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 in reply to: ↑ 3 ; follow-up: Changed 4 years ago by raver@…

Replying to heil:

Hi,

Thanks for reporting and the patch. https://github.com/openwrt/packages/commit/92bd6b1f49f3e5ff81a4b99339553c9666dd9257 should fix the issue.

Hi,
Glad it was useful.

comment:6 in reply to: ↑ 5 Changed 3 years ago by wbr@…

This is still happening in BB r44952. Is the above fix applied to CC?
Thanks

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.