Welcome! Log In Create A New Profile

Advanced

[nginx] Output chain: zero size buf alerts in ngx_chain_writer().

Maxim Dounin
March 23, 2015 02:12PM
details: http://hg.nginx.org/nginx/rev/6ab301ddf469
branches:
changeset: 6045:6ab301ddf469
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon Mar 23 20:56:58 2015 +0300
description:
Output chain: zero size buf alerts in ngx_chain_writer().

Now we log a "zero size buf in chain writer" alert if we encounter a zero
sized buffer in ngx_chain_writer(), and skip the buffer.

diffstat:

src/core/ngx_output_chain.c | 33 ++++++++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 1 deletions(-)

diffs (53 lines):

diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -663,7 +663,23 @@ ngx_chain_writer(void *data, ngx_chain_t

#if 1
if (ngx_buf_size(in->buf) == 0 && !ngx_buf_special(in->buf)) {
+
+ ngx_log_error(NGX_LOG_ALERT, ctx->pool->log, 0,
+ "zero size buf in chain writer "
+ "t:%d r:%d f:%d %p %p-%p %p %O-%O",
+ in->buf->temporary,
+ in->buf->recycled,
+ in->buf->in_file,
+ in->buf->start,
+ in->buf->pos,
+ in->buf->last,
+ in->buf->file,
+ in->buf->file_pos,
+ in->buf->file_last);
+
ngx_debug_point();
+
+ continue;
}
#endif

@@ -691,9 +707,24 @@ ngx_chain_writer(void *data, ngx_chain_t

#if 1
if (ngx_buf_size(cl->buf) == 0 && !ngx_buf_special(cl->buf)) {
+
+ ngx_log_error(NGX_LOG_ALERT, ctx->pool->log, 0,
+ "zero size buf in chain writer "
+ "t:%d r:%d f:%d %p %p-%p %p %O-%O",
+ cl->buf->temporary,
+ cl->buf->recycled,
+ cl->buf->in_file,
+ cl->buf->start,
+ cl->buf->pos,
+ cl->buf->last,
+ cl->buf->file,
+ cl->buf->file_pos,
+ cl->buf->file_last);
+
ngx_debug_point();
+
+ continue;
}
-
#endif

size += ngx_buf_size(cl->buf);

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Output chain: zero size buf alerts in ngx_chain_writer().

Maxim Dounin 518 March 23, 2015 02:12PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 99
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready