From owner-freebsd-current@FreeBSD.ORG Sun Nov 12 14:47:28 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E54216A47B for ; Sun, 12 Nov 2006 14:47:28 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.18.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1E5243DB8 for ; Sun, 12 Nov 2006 14:46:57 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 3500 invoked from network); 12 Nov 2006 14:46:54 -0000 Received: from unknown (HELO localhost) (775067@[217.50.200.64]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 12 Nov 2006 14:46:54 -0000 Date: Sun, 12 Nov 2006 15:46:38 +0100 From: Fabian Keil To: freebsd-current@freebsd.org Message-ID: <20061112154638.495ca09b@localhost> In-Reply-To: <4556F086.7050201@freebsd.org> References: <200611021653.kA2GrRWx008044@repoman.freebsd.org> <4555BA65.4020603@gmail.com> <45560FB8.1040607@freebsd.org> <200611112302.23508.amistry@am-productions.biz> <4556F086.7050201@freebsd.org> X-Mailer: Sylpheed-Claws 2.5.2 (GTK+ 2.10.6; i386-portbld-freebsd6.2) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2008-08-18.asc Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_1lYa0smxfG.p.C6FXCWvVwM; protocol="application/pgp-signature"; micalg=PGP-SHA1 Subject: Re: sendfile data corruption X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 14:47:28 -0000 --Sig_1lYa0smxfG.p.C6FXCWvVwM Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Andre Oppermann wrote: > Anish Mistry wrote: > > On Saturday 11 November 2006 13:00, Andre Oppermann wrote: > >> Pawel Worach wrote: > >> I tried to reproduce the problem with lighttpd w/o success. > >> > >> My guess is that something gets wrong when using non-blocking > >> sockets and the http headers. Could you obtain the truss of the > >> sendfile(2) calls so I get the input parameters to it? A visual > >> inspection of a corruptly transferred text file would be helpful > >> too. This should give more hints what happens, like duplicated or > >> missing pages, etc. > > For me I'm seeing 3 different behaviors. > > 1) The file is just truncated after a few KB. > > 2) A section of the file is just missing. eg. A small section of the= =20 > > file in the middle is just gone. > > 3) The data is sent before the headers. eg. a portion of the html is=20 > > sent, and then you see >=20 > What webserver are you running? I was seeing similar problems with Apache/2.0.5[89] and Gatling 0.8. PNG files got corrupted and HTML files contained the last lines twice in some HTTP clients (not tested with Gatling). scp continued to work. After applying Joe's patch the PNG file corruption seems to be gone, but I'm still seeing the HTML corruption with Apache. I'm currently using FreeBSD 7.0-CURRENT #19: Sat Nov 11 13:53:29 CET 2006 I'm seeing the HTML problem at http://tor.fabiankeil.de/ with lynx without proxy or any client chained with Privoxy, but curl without proxy fetches the document intact and doesn't display an error message either. I'm not seeing the problem with Privoxy's integrated documentation web server which doesn't use sendfile. I didn't try this before applying Joe's patch though. Fabian --=20 http://www.fabiankeil.de/ --Sig_1lYa0smxfG.p.C6FXCWvVwM Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFVzPVBYqIVf93VJ0RAilXAJ9cn5FPZo6gEDbt8x/JCK+45O5CdACfdGZs NOCGNfajJysmtzTICmZAK8o= =4i2W -----END PGP SIGNATURE----- --Sig_1lYa0smxfG.p.C6FXCWvVwM--