From owner-freebsd-current@FreeBSD.ORG Sun Nov 12 16:00:58 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 209A816A5F2 for ; Sun, 12 Nov 2006 16:00:58 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.18.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6640F43DB0 for ; Sun, 12 Nov 2006 16:00:31 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 25376 invoked from network); 12 Nov 2006 16:00:29 -0000 Received: from unknown (HELO localhost) (775067@[217.50.200.64]) (envelope-sender ) by smtprelay03.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 12 Nov 2006 16:00:29 -0000 Date: Sun, 12 Nov 2006 17:00:13 +0100 From: Fabian Keil To: freebsd-current@freebsd.org Message-ID: <20061112170013.78949e96@localhost> In-Reply-To: <4557330D.3010009@freebsd.org> References: <200611021653.kA2GrRWx008044@repoman.freebsd.org> <455530E0.5090000@gmail.com> <4555B45D.6020800@freebsd.org> <4555BA65.4020603@gmail.com> <4557330D.3010009@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_PmVDMkKbRdwp9VLzKDbOry8; 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 16:00:58 -0000 --Sig_PmVDMkKbRdwp9VLzKDbOry8 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Andre Oppermann wrote: > Pawel Worach wrote: > > Andre Oppermann wrote: > >=20 > >> > >> I'm looking into the problem. Please try a binary FTP transfer as > >> well and check if the checksums match. ftpd uses sendfile(2) as well > >> but w/o headers or trailers and does the send in one swoop. > >> > >=20 > > Oh, didn't think of that, ftpd is ok, transferring a 64MB file does > > not trash it. Meanwhile a couple of other things where tested, SMP > > disabled (removed from kernel config), added some printf's which when > > printing to a serial console moves the offset where the breakage > > begins to 0x01000000, sometimes. >=20 > 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. >=20 > Please try this patch: >=20 > http://people.freebsd.org/~andre/sendfile_fix-20061112.diff >=20 > It fixes apache 2.0.59 for me. For me too, but I'm still seeing problems with Gatling/0.8. [fk@tor ~]$ fetch http://127.0.0.1:8000/pfstat-queues.png pfstat-queues.png 78% of 5206 B 2706 kBps fetch: pfstat-queues.png appears to be truncated: 4096/5206 bytes [fk@tor ~]$ fetch http://127.0.0.1:8000/pfstat-queues.png pfstat-queues.png 78% of 5206 B 1484 kBps fetch: pfstat-queues.png appears to be truncated: 4096/5206 bytes [fk@tor ~]$ fetch http://127.0.0.1:8000/pfstat.png pfstat.png 83% of 4929 B 1881 kBps fetch: pfstat.png appears to be truncated: 4096/4929 bytes [fk@tor ~]$ fetch http://127.0.0.1:8000/pfstat.png pfstat.png 83% of 4929 B 1777 kBps fetch: pfstat.png appears to be truncated: 4096/4929 bytes PNG files always seem to be truncated after 4096 bytes, the same files are delivered with Apache without problems. This is on FreeBSD 7.0-CURRENT #20: Sun Nov 12 16:24:32 CET 2006 with your patch and without Joe's one. Fabian --=20 http://www.fabiankeil.de/ --Sig_PmVDMkKbRdwp9VLzKDbOry8 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFV0UUBYqIVf93VJ0RAnYSAJ4mYBpV/nk+oow8ib+HZcuI290mhwCfbwpO TKqwoe8QuozK/judJs2IjUM= =4rwT -----END PGP SIGNATURE----- --Sig_PmVDMkKbRdwp9VLzKDbOry8--