From dev-return-50144-apmail-httpd-dev-archive=httpd.apache.org@httpd.apache.org Wed Nov 02 14:39:42 2005 Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 24408 invoked from network); 2 Nov 2005 14:39:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Nov 2005 14:39:41 -0000 Received: (qmail 59063 invoked by uid 500); 2 Nov 2005 14:39:36 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 59030 invoked by uid 500); 2 Nov 2005 14:39:36 -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 59019 invoked by uid 99); 2 Nov 2005 14:39:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2005 06:39:35 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [82.195.144.76] (HELO loughan.stdlib.net) (82.195.144.76) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2005 06:39:30 -0800 Received: from colmmacc by loughan.stdlib.net with local (Exim 4.50) id 1EXJlg-0007Cr-U1 for dev@httpd.apache.org; Wed, 02 Nov 2005 14:39:12 +0000 Date: Wed, 2 Nov 2005 14:39:12 +0000 From: Colm MacCarthaigh To: dev@httpd.apache.org Subject: Re: [vote] 2.1.9 as beta Message-ID: <20051102143912.GA27610@stdlib.net> Reply-To: colm@stdlib.net References: <4364478A.2090607@force-elite.com> <20051102102554.GA22492@stdlib.net> <20051102103350.GA25279@redhat.com> <20051102104402.GA23139@stdlib.net> <20051102112117.GA26334@redhat.com> <20051102113126.GA24160@stdlib.net> <20051102113817.GA26768@redhat.com> <20051102114915.GA24616@stdlib.net> <20051102131341.GA25292@stdlib.net> <20051102133456.GA28852@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20051102133456.GA28852@redhat.com> User-Agent: Mutt/1.5.9i X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Wed, Nov 02, 2005 at 01:34:56PM +0000, Joe Orton wrote: > Seems to work OK for me with RHEL4/IA64 (2.6.9-22.0.1.EL) with my normal > sendfile test app over loopback. > > open("6G.sparse", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0664, st_size=6442450945, ...}) = 0 > sendfile(1, 3, [0], 6442450945) = 6442450945 Thanks, I'll try a new kernel/glibc at some point. In the meantime, I think doing; Index: core_filters.c =================================================================== --- core_filters.c (revision 330237) +++ core_filters.c (working copy) @@ -561,9 +561,16 @@ (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 0); } if (rv != APR_SUCCESS) { - return rv; + /* There are cases in which a buggy sendfile can fail, but + * an ordinary write may succeed. Let the bucket pass through + * to the non-sendfile write. If it's really a problem with + * the socket, we'll find out quickly. */ + did_sendfile = 0; + } + else { + break; } - break; } } #endif /* APR_HAS_SENDFILE */ is reasonable. Basically is sendfile() returns an error, rather than give up trying to write the file, move on to using ordinary write/writev which may or may not work. If it's a real problem (ie a dead socket or something), we'll find out anyway, and if it works we get one less annoyance for our users. -- Colm MacCárthaigh Public Key: colm+pgp@stdlib.net