[nginx] Output chain: zero size buf alerts in ngx_chain_writer().
Maxim Dounin
mdounin at mdounin.ru
Mon Mar 23 18:10:53 UTC 2015
details: http://hg.nginx.org/nginx/rev/6ab301ddf469
branches:
changeset: 6045:6ab301ddf469
user: Maxim Dounin <mdounin at 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);
More information about the nginx-devel
mailing list