Re: sendfile data corruption

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Sun, 12 Nov 2006 23:35:18 +0100
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/

Received on Sun Nov 12 2006 - 21:38:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:02 UTC