Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Nov 2006 23:35:18 +0100
From:      Fabian Keil <freebsd-listen@fabiankeil.de>
To:        freebsd-current@freebsd.org
Subject:   Re: sendfile data corruption
Message-ID:  <20061112233518.5f4752b5@localhost>
In-Reply-To: <45578D8C.8020207@freebsd.org>
References:  <200611021653.kA2GrRWx008044@repoman.freebsd.org> <455530E0.5090000@gmail.com> <4555B45D.6020800@freebsd.org> <4555BA65.4020603@gmail.com> <4557330D.3010009@freebsd.org> <20061112170013.78949e96@localhost> <45578D8C.8020207@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_ATVtY2eHHel8gAeCL1mx/ax
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Andre Oppermann <andre@freebsd.org> wrote:

> Fabian Keil wrote:
> > Andre Oppermann <andre@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.
> >=20
> >=20
> > 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.
>=20
> 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@tor /usr/jails/buildjail/usr/ports/devel/libowfat/work/libowfat-0.24]$ =
grep -n sendfile\( *.c
trybsdsf.c:18:  r=3Dsendfile(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=3Dsendfile(1,fd,&o,23);

Fabian
--=20
http://www.fabiankeil.de/

--Sig_ATVtY2eHHel8gAeCL1mx/ax
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFV6GrBYqIVf93VJ0RAhoAAKCDIDEkBK1kEop/fKGRui4L+h2QpwCfcJDW
Fy2wvnYmLlJsNBUbrHcnA8s=
=F5S4
-----END PGP SIGNATURE-----

--Sig_ATVtY2eHHel8gAeCL1mx/ax--



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