From owner-freebsd-current@FreeBSD.ORG Sun Nov 12 22:38:39 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 98F7316A47C for ; Sun, 12 Nov 2006 22:38:39 +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 0855143E15 for ; Sun, 12 Nov 2006 22:36:02 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 11605 invoked from network); 12 Nov 2006 22:35:33 -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 22:35:33 -0000 Date: Sun, 12 Nov 2006 23:35:18 +0100 From: Fabian Keil To: freebsd-current@freebsd.org Message-ID: <20061112233518.5f4752b5@localhost> In-Reply-To: <45578D8C.8020207@freebsd.org> References: <200611021653.kA2GrRWx008044@repoman.freebsd.org> <455530E0.5090000@gmail.com> <4555B45D.6020800@freebsd.org> <4555BA65.4020603@gmail.com> <4557330D.3010009@freebsd.org> <20061112170013.78949e96@localhost> <45578D8C.8020207@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_ATVtY2eHHel8gAeCL1mx/ax"; 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 22:38:39 -0000 --Sig_ATVtY2eHHel8gAeCL1mx/ax Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Andre Oppermann wrote: > Fabian Keil wrote: > > Andre Oppermann wrote: > >>OK, I found the bug. The sent byte count reporting was incorrect. > >>While doing the sendfile(2) rewrite I got lost in the mixup of the > >>FreeBSD 4.x bug for bug compatibility. > >> > >>Please try this patch: > >> > >> http://people.freebsd.org/~andre/sendfile_fix-20061112.diff > >> > >>It fixes apache 2.0.59 for me. > >=20 > >=20 > > For me too, but I'm still seeing problems with Gatling/0.8. > > PNG files always seem to be truncated after 4096 bytes, > > the same files are delivered with Apache without problems. >=20 > I'm sorry but I can't find out where gatling calls sendfile to inspect > the parameters it uses. I presume it's done through libowfat: [fk@tor /usr/jails/buildjail/usr/ports/devel/libowfat/work/libowfat-0.24]$ = grep -n sendfile\( *.c trybsdsf.c:18: r=3Dsendfile(0,1,37,42,&hdr,&sbytes,0); trysendfile.c:9: sbsize_t sendfile(int s, int fd, off_t offset, bsize_= t nbytes, trysendfile.c:18: sendfile(1 /* dest socket */,fd /* src file */, trysendfile.c:33: sendfile(1 /* dest */, 0 /* src */,&o,23 /* nbytes */); trysendfile.c:77: off_t r=3Dsendfile(1,fd,&o,23); Fabian --=20 http://www.fabiankeil.de/ --Sig_ATVtY2eHHel8gAeCL1mx/ax Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFV6GrBYqIVf93VJ0RAhoAAKCDIDEkBK1kEop/fKGRui4L+h2QpwCfcJDW Fy2wvnYmLlJsNBUbrHcnA8s= =F5S4 -----END PGP SIGNATURE----- --Sig_ATVtY2eHHel8gAeCL1mx/ax--