comparison src/core/ngx_output_chain.c @ 6045:6ab301ddf469

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 23 Mar 2015 20:56:58 +0300
parents 1fdba317ee6d
children 66176dfea01e
comparison
equal deleted inserted replaced
6044:b8926ba4d087 6045:6ab301ddf469
661 661
662 for (size = 0; in; in = in->next) { 662 for (size = 0; in; in = in->next) {
663 663
664 #if 1 664 #if 1
665 if (ngx_buf_size(in->buf) == 0 && !ngx_buf_special(in->buf)) { 665 if (ngx_buf_size(in->buf) == 0 && !ngx_buf_special(in->buf)) {
666
667 ngx_log_error(NGX_LOG_ALERT, ctx->pool->log, 0,
668 "zero size buf in chain writer "
669 "t:%d r:%d f:%d %p %p-%p %p %O-%O",
670 in->buf->temporary,
671 in->buf->recycled,
672 in->buf->in_file,
673 in->buf->start,
674 in->buf->pos,
675 in->buf->last,
676 in->buf->file,
677 in->buf->file_pos,
678 in->buf->file_last);
679
666 ngx_debug_point(); 680 ngx_debug_point();
681
682 continue;
667 } 683 }
668 #endif 684 #endif
669 685
670 size += ngx_buf_size(in->buf); 686 size += ngx_buf_size(in->buf);
671 687
689 705
690 for (cl = ctx->out; cl; cl = cl->next) { 706 for (cl = ctx->out; cl; cl = cl->next) {
691 707
692 #if 1 708 #if 1
693 if (ngx_buf_size(cl->buf) == 0 && !ngx_buf_special(cl->buf)) { 709 if (ngx_buf_size(cl->buf) == 0 && !ngx_buf_special(cl->buf)) {
710
711 ngx_log_error(NGX_LOG_ALERT, ctx->pool->log, 0,
712 "zero size buf in chain writer "
713 "t:%d r:%d f:%d %p %p-%p %p %O-%O",
714 cl->buf->temporary,
715 cl->buf->recycled,
716 cl->buf->in_file,
717 cl->buf->start,
718 cl->buf->pos,
719 cl->buf->last,
720 cl->buf->file,
721 cl->buf->file_pos,
722 cl->buf->file_last);
723
694 ngx_debug_point(); 724 ngx_debug_point();
695 } 725
696 726 continue;
727 }
697 #endif 728 #endif
698 729
699 size += ngx_buf_size(cl->buf); 730 size += ngx_buf_size(cl->buf);
700 } 731 }
701 732