sendfile data corruption
Fabian Keil
freebsd-listen at fabiankeil.de
Sun Nov 12 08:00:58 PST 2006
Andre Oppermann <andre at 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 me too, but I'm still seeing problems with Gatling/0.8.
[fk at 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 at 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 at 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 at 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
--
http://www.fabiankeil.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20061112/cd0aef25/signature.pgp
More information about the freebsd-current
mailing list