On Thu, 4 May 2006, Joe Orton wrote:

This was on XFS and on an NFS mount. It should be noted that this
works on a 32bit (also Ubuntu Breezy) machine with identical config.

Can you try it on a local ext3 filesystem?

Same results.

if (length < MAX_BUCKET_SIZE) {

does that work?

It probably won't since this seems to be an issue of using sendfile
instead of sendfile64 since it's the sendfile syscall returning EINVAL
and not apr.

Assuming that sendfile works for small files, I am guessing that this is
a kernel (or fs-specific) problem with passing large (>2Gb?) count
values.  If you change the code as I indicate that will ensure that
sendfile() is never used with a >1Gb count value, which should test that
hypothesis.  It it does fail please include some strace output to ensure
the sendfile() call is failing at the same point.  (and not e.g. when
the offset value grows to >2Gb).

Your guess was correct, it's the count value that's the problem. 1GB is OK, 2GB gives EINVAL. The file makes it through OK too, at least the md5sum matches ;)

So, I'd suggest going with that fix/kludge and change server/core.c to use apr_brigade_insert_file(), and possibly other places that needs the fix. It won't hurt performance that much calling sendfile() every 1GB even on those platforms that can cope with larger sendfile-chunks.

/Nikke
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se      |     [EMAIL PROTECTED]
---------------------------------------------------------------------------
 Modems are proof people enjoy torturing themselves
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Reply via email to