Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 48546 invoked from network); 4 Oct 2009 08:54:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Oct 2009 08:54:43 -0000 Received: (qmail 81589 invoked by uid 500); 4 Oct 2009 08:54:42 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 81520 invoked by uid 500); 4 Oct 2009 08:54:42 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 81407 invoked by uid 99); 4 Oct 2009 08:54:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Oct 2009 08:54:42 +0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [88.198.11.6] (HELO eru.sfritsch.de) (88.198.11.6) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Oct 2009 08:54:32 +0000 Received: from k.lan ([10.1.1.6] helo=k.localnet) by eru.sfritsch.de with esmtp (Exim 4.63) (envelope-from ) id 1MuMr6-0005nf-Hc for dev@httpd.apache.org; Sun, 04 Oct 2009 10:54:12 +0200 From: Stefan Fritsch To: dev@httpd.apache.org Subject: Re: svn commit: r821477 - in /httpd/httpd/trunk: CHANGES modules/http/byterange_filter.c modules/http/http_filters.c server/core_filters.c Date: Sun, 4 Oct 2009 10:54:11 +0200 User-Agent: KMail/1.12.1 (Linux/2.6.30-1-686; KDE/4.3.1; i686; ; ) References: <20091004080850.C97EB2388864@eris.apache.org> <4239a4320910040114t15576a5cpc856430efbbc9a10@mail.gmail.com> In-Reply-To: <4239a4320910040114t15576a5cpc856430efbbc9a10@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200910041054.11509.sf@sfritsch.de> X-Virus-Checked: Checked by ClamAV on apache.org On Sunday 04 October 2009, Paul Querna wrote: > > URL: http://svn.apache.org/viewvc?rev=821477&view=rev > > Log: > > Make sure to not destroy bucket brigades that have been created > > by earlier filters. Otherwise the pool cleanups would be removed > > causing potential memory leaks later on. > > I am not sure these changes make sense. The 'traditional' API view > says that brigades passed down the output fitler chain should be > destroyed, not cleared -- please see the thread started with this > message: > 9ccfb16df2220fc31c836bb7cd640554@ricilake.net%3E> > This is at odds with the documentation at http://httpd.apache.org/docs/trunk/developer/output-filters.html , in particular with rules 6 and 9 at the end. If output filters reuse brigades, the core must not destroy them. I just noticed that include/util_filter.h still says "The caller relinquishes ownership of the brigade" for ap_pass_brigade(). Either output-filters.html or util_filter.h must be changed. In my opinion, it is much better to not destroy the brigades and reuse them instead of creating a new brigade on every filter invocation. Otherwise there is huge memory usage for streaming content. The thread you have pointed out also has a suggested patch for the docs in util_filter.h: http://mail-archives.apache.org/mod_mbox/httpd- dev/200504.mbox/<20050426102834.GE16976@redhat.com> It is not clear from the thread why it wasn't applied.