sendfile data corruption
Fabian Keil
freebsd-listen at fabiankeil.de
Sun Nov 12 14:38:39 PST 2006
Andre Oppermann <andre at freebsd.org> wrote:
> Fabian Keil wrote:
> > Andre Oppermann <andre at freebsd.org> 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.
> >
> >
> > 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.
>
> 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 at tor /usr/jails/buildjail/usr/ports/devel/libowfat/work/libowfat-0.24]$ grep -n sendfile\( *.c
trybsdsf.c:18: r=sendfile(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=sendfile(1,fd,&o,23);
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/1cc0c851/signature.pgp
More information about the freebsd-current
mailing list