Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@www.apache.org Received: (qmail 2425 invoked from network); 20 May 2005 02:56:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 May 2005 02:56:52 -0000 Received: (qmail 99001 invoked by uid 500); 20 May 2005 02:56:51 -0000 Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 98982 invoked by uid 500); 20 May 2005 02:56:51 -0000 Mailing-List: contact apreq-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list apreq-dev@httpd.apache.org Received: (qmail 98966 invoked by uid 99); 20 May 2005 02:56:50 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of gcaa-apreq-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 19 May 2005 19:56:48 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DYxfJ-0006jc-Oc for apreq-dev@httpd.apache.org; Fri, 20 May 2005 04:55:09 +0200 Received: from adsl-3-0-37.mia.bellsouth.net ([65.3.0.37]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 May 2005 04:55:09 +0200 Received: from joe+gmane by adsl-3-0-37.mia.bellsouth.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 May 2005 04:55:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: apreq-dev@httpd.apache.org To: apreq-dev@httpd.apache.org From: Joe Schaefer Subject: Re: Massive leak in Apache2::Upload? Date: Thu, 19 May 2005 22:56:01 -0400 Lines: 78 Message-ID: <87d5rmsj0e.fsf@gemini.sunstarsys.com> References: <1116417401.20528.18.camel@bobcat.mine.nu> <87sm0kvfzg.fsf@gemini.sunstarsys.com> <1116424049.21904.1.camel@bobcat.mine.nu> <87k6lwvckb.fsf@gemini.sunstarsys.com> <428B83AD.90801@gmx.de> <1116518253.22482.37.camel@bobcat.mine.nu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: adsl-3-0-37.mia.bellsouth.net Mail-Copies-To: never User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:1l8MAEGPKrLJ3CnMDeDjN3m0Es4= Sender: news X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Ville Skytt� writes: > $r->discard_request_body() fixes it here too. Ok, here's what I'd like you (or Markus) to do. 1) grab our svn trunk and apply the attached patch to it. 2) make clean; make 3) cd module; make test 4) ls -l /tmp When the tests finish, they should leave three temporary files in /tmp: % ls -l /tmp total 1493 -rw------- 1 joe joe 500024 May 19 22:32 apreqStetos -rw------- 1 joe joe 500039 May 19 22:32 apreqT5oOq1 -rw------- 1 joe joe 500039 May 19 22:32 apreqs16lOA We need to figure out which side the leak is happening on (writing to the spool file or reading from it). The presence/absense of these files on your box should help us make that determination, so let us know what you see. --=-=-= Content-Disposition: attachment Content-Description: leak test patch Index: module/t/c-modules/apreq_request_test/mod_apreq_request_test.c =================================================================== --- module/t/c-modules/apreq_request_test/mod_apreq_request_test.c (revision 171027) +++ module/t/c-modules/apreq_request_test/mod_apreq_request_test.c (working copy) @@ -54,10 +54,10 @@ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, "starting apreq_request_test"); - s = ap_discard_request_body(r); +// s = ap_discard_request_body(r); - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, s, - r, "discard request body"); +// ap_log_rerror(APLOG_MARK, APLOG_DEBUG, s, +// r, "discard request body"); ap_set_content_type(r, "text/plain"); ap_rputs("ARGS:\n",r); Index: library/util.c =================================================================== --- library/util.c (revision 171027) +++ library/util.c (working copy) @@ -971,8 +971,8 @@ data = apr_palloc(pool, sizeof *data); /* cleanups are LIFO, so this one will run just after the cleanup set by mktemp */ - apr_pool_cleanup_register(pool, data, - apreq_file_cleanup, apreq_file_cleanup); +// apr_pool_cleanup_register(pool, data, +// apreq_file_cleanup, apreq_file_cleanup); rc = apr_file_mktemp(fp, tmpl, /* NO APR_DELONCLOSE! see comment above */ APR_CREATE | APR_READ | APR_WRITE --=-=-= -- Joe Schaefer --=-=-=--