Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jan 2006 19:40:06 GMT
From:      "David G. Lawrence" <dg@dglawrence.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/92243: sendfile(2) returns early on files > 4GB
Message-ID:  <200601261940.k0QJe6g2048475@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/92243; it has been noted by GNATS.

From: "David G. Lawrence" <dg@dglawrence.com>
To: David Kelly <dkelly@hiwaay.net>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/92243: sendfile(2) returns early on files > 4GB
Date: Thu, 26 Jan 2006 11:34:58 -0800

 > On Mon, Jan 23, 2006 at 11:09:08PM -0800, David G. Lawrence wrote:
 > > > >How-To-Repeat:
 > > > Get a file which is larger than 4G via ftpd, apache, or anything else which uses sendfile(2).
 > > 
 > >    Do you know if sendfile(2) is returning an error in the failure case?
 > 
 > I don't know the method for attaching gdb to a running daemon, have
 > never had need of it before. Have sprinkled printf's in ftpd and edited
 > the return message trying to understand what is happening. I think
 > sendfile is returning once and ftpd is calling it again then the 2nd
 > time the count is zero so ftp returns "premature end." This is untouched
 > stock RELENG6:
 
    I've been trying to reproduce the problem here, but I haven't been able
 to so far. It might be because I'm using a larger file or perhaps it has
 to do with the system configuration. Can you tell me how much main memory
 you have in your system?
    Whatever the problem is, it sure isn't obvious in the code. I've spent
 many hours combing through sendfile and the macros and functions that
 it calls, looking for anything that might cause a 64bit->32bit precision
 truncation, and so far everything looks fine to me.
 
 -DG
 
 David G. Lawrence
 President
 Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500
 The FreeBSD Project - http://www.freebsd.org
 Pave the road of life with opportunities.



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