From owner-freebsd-current@FreeBSD.ORG Sun Nov 12 15:28:14 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 9F44316A4EA for ; Sun, 12 Nov 2006 15:28:14 +0000 (UTC) (envelope-from pawel.worach@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 471CA43D6E for ; Sun, 12 Nov 2006 15:28:04 +0000 (GMT) (envelope-from pawel.worach@gmail.com) Received: by nf-out-0910.google.com with SMTP id l23so186598nfc for ; Sun, 12 Nov 2006 07:28:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ib4HYrBL19GCndhcpGVRaokTtzPkr+KTJwqQfH1ArP7wzRmhrOv30BlpAevGAwoyDJwJjKFj+yO8lpGpdJdC+M3RstjwLuvLsPRiU1ShpPobXD4H1wv8nI74LOOjFdZa1N1wyKjeYTo2nllCHQCx8jx3ttN5wYHSTfqLDwaNYss= Received: by 10.82.98.13 with SMTP id v13mr513378bub.1163345283512; Sun, 12 Nov 2006 07:28:03 -0800 (PST) Received: by 10.82.164.13 with HTTP; Sun, 12 Nov 2006 07:28:03 -0800 (PST) Message-ID: Date: Sun, 12 Nov 2006 16:28:03 +0100 From: "Pawel Worach" To: "Andre Oppermann" In-Reply-To: <4557330D.3010009@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200611021653.kA2GrRWx008044@repoman.freebsd.org> <455530E0.5090000@gmail.com> <4555B45D.6020800@freebsd.org> <4555BA65.4020603@gmail.com> <4557330D.3010009@freebsd.org> Cc: freebsd-current@freebsd.org, amistry@am-productions.biz 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 15:28:14 -0000 On 11/12/06, Andre Oppermann wrote: > Pawel Worach wrote: > > Andre Oppermann wrote: > > > >> > >> 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. > >> > > > > 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. > > 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. For some reason lighttpd didn't suffer > from this problem, even w/o the fix. Unfortunately that's what I tested > the rewrite against. > This fixes it for me, thanks! -- Pawel