Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@www.apache.org Received: (qmail 27208 invoked from network); 11 Mar 2007 07:12:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Mar 2007 07:12:31 -0000 Received: (qmail 68247 invoked by uid 500); 11 Mar 2007 07:12:39 -0000 Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 68124 invoked by uid 500); 11 Mar 2007 07:12:39 -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 67980 invoked by uid 99); 11 Mar 2007 07:12:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Mar 2007 23:12:38 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of vinay.ys@gmail.com designates 64.233.182.188 as permitted sender) Received: from [64.233.182.188] (HELO nf-out-0910.google.com) (64.233.182.188) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Mar 2007 23:12:26 -0800 Received: by nf-out-0910.google.com with SMTP id n28so1560789nfc for ; Sat, 10 Mar 2007 23:12:05 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=FJMeNpZofCrPcrUmx9FMlXcdRJ9JItK2U2JMFYKEWfmqLDDxD7kcY9z57zEOKytFr8vg0MR0wNIdGC0+EYZyqEq/Tw80NVjTt3ToSw9TXZbESOLo/+9pAtilZ7oXLVMhur7A99suhAv46vmj/u4SZ4t8jx//MVPt0poCqnnD9cw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=V9F7QbU9fx7jtvQKfc7Ocrs49W4L4upRNZ4zuGre4+CnSO+CwcRbL55FdVxyL3c9xQ7upS3XYvi5kWbDFv3VJjsQvrVwCmE47ZX5C8xNIkMStM1d4r9gjss8E+OUxESJKhoqFeWokxz9VbPpkylQvPTbv66GmXWpAlIxgNy+cWg= Received: by 10.82.134.12 with SMTP id h12mr5899020bud.1173597125476; Sat, 10 Mar 2007 23:12:05 -0800 (PST) Received: by 10.82.176.5 with HTTP; Sat, 10 Mar 2007 23:12:05 -0800 (PST) Message-ID: <86047d060703102312v45048b1by6b1c9805dda60c7f@mail.gmail.com> Date: Sun, 11 Mar 2007 12:42:05 +0530 From: "Vinay Y S" To: "Randy Kobes" , apreq-dev@httpd.apache.org Subject: Re: apreqXXXXXX temp files remain after processing uploads greater than 256kb. Further large upload fails Cc: "Steve Hay" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_19357_1705414.1173597125420" References: <86047d060703081005g6ab5dd7ay36a7483adf2b0b89@mail.gmail.com> <87649a4e6t.fsf@gemini.sunstarsys.com> <87zm6m2y5s.fsf@gemini.sunstarsys.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_19357_1705414.1173597125420 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 3/11/07, Randy Kobes wrote: > On Fri, 9 Mar 2007, Joe Schaefer wrote: > > > Randy, do you know why we use the APR_FILE_NOCLEANUP flag? Maybe > > we should just remove that and see if it fixes the problem Vinay > > is seeing. > > Hi Steve, and all, > If you remember from > http://marc.theaimsgroup.com/?t=115337629400001&r=1&w=2 > there was a problem with stray temp files in apreq > remaining after uploads; we came up with a fix that > worked most of the time, but Vinay has come up with > something that appears better, and more understandable. > The attached diff against library/util.c (in the svn > sources) works for me in getting multiple invocations > of the glue/perl/t/apreq/upload.t to pass; if you have > time, could you try it out to see how it fares on > your system? Thanks. Actually, either my earlier patch which adds a apr_file_close in apreq_file_cleanup or just removing the APR_FILE_NOCLEANUP from the flags(patch attached) is enough. Both together isn't required. (but it's safe as the cleanup handler installed by apr would get uninstalled when you do apr_file_close). I favor doing just one of them, preferably, removing the APR_FILE_NOCLEANUP flag. This makes the WIN32 code identical to other platforms(where it's already working fine, so no change for them). Patch for the same against the svn source is given below. Please try this on win32 systems. Thanks, Vinay Y S Index: library/util.c =================================================================== --- library/util.c (revision 516861) +++ library/util.c (working copy) @@ -823,14 +823,6 @@ /* NO APR_DELONCLOSE! see comment above */ flag = APR_CREATE | APR_READ | APR_WRITE | APR_EXCL | APR_BINARY; - /* Win32 needs the following to remove temp files. - * XXX: figure out why the APR_SHARELOCK flag works; - * a grep through the httpd sources seems to indicate - * it's only used in sdbm files?? - */ -#ifdef WIN32 - flag |= APR_FILE_NOCLEANUP | APR_SHARELOCK; -#endif rc = apr_file_mktemp(fp, tmpl, flag, pool); if (rc == APR_SUCCESS) { ------=_Part_19357_1705414.1173597125420 Content-Type: text/plain; name=util-1.diff; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_ez55auen Content-Disposition: attachment; filename="util-1.diff" SW5kZXg6IGxpYnJhcnkvdXRpbC5jDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQotLS0gbGlicmFyeS91dGlsLmMJKHJl dmlzaW9uIDUxNjg2MSkNCisrKyBsaWJyYXJ5L3V0aWwuYwkod29ya2luZyBjb3B5KQ0KQEAgLTgy MywxNCArODIzLDYgQEANCiAKICAgICAvKiBOTyBBUFJfREVMT05DTE9TRSEgc2VlIGNvbW1lbnQg YWJvdmUgKi8KICAgICBmbGFnID0gQVBSX0NSRUFURSB8IEFQUl9SRUFEIHwgQVBSX1dSSVRFIHwg QVBSX0VYQ0wgfCBBUFJfQklOQVJZOwotICAgIC8qIFdpbjMyIG5lZWRzIHRoZSBmb2xsb3dpbmcg dG8gcmVtb3ZlIHRlbXAgZmlsZXMuCi0gICAgICogWFhYOiBmaWd1cmUgb3V0IHdoeSB0aGUgQVBS X1NIQVJFTE9DSyBmbGFnIHdvcmtzOwotICAgICAqIGEgZ3JlcCB0aHJvdWdoIHRoZSBodHRwZCBz b3VyY2VzIHNlZW1zIHRvIGluZGljYXRlCi0gICAgICogaXQncyBvbmx5IHVzZWQgaW4gc2RibSBm aWxlcz8/Ci0gICAgKi8KLSNpZmRlZiBXSU4zMgotICAgIGZsYWcgfD0gQVBSX0ZJTEVfTk9DTEVB TlVQIHwgQVBSX1NIQVJFTE9DSzsKLSNlbmRpZgogICAgIHJjID0gYXByX2ZpbGVfbWt0ZW1wKGZw LCB0bXBsLCBmbGFnLCBwb29sKTsKIAogICAgIGlmIChyYyA9PSBBUFJfU1VDQ0VTUykgewo= ------=_Part_19357_1705414.1173597125420--