Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Nov 2006 16:28:03 +0100
From:      "Pawel Worach" <pawel.worach@gmail.com>
To:        "Andre Oppermann" <andre@freebsd.org>
Cc:        freebsd-current@freebsd.org, amistry@am-productions.biz
Subject:   Re: sendfile data corruption
Message-ID:  <d227e09e0611120728o3add250fg5d63b3e5a264a195@mail.gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/12/06, Andre Oppermann <andre@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d227e09e0611120728o3add250fg5d63b3e5a264a195>