Justin Erenkrantz <[EMAIL PROTECTED]> writes: > I think we've seen a segfault on daedalus that can be tracked > down to the fact that the file changes on disk while we > serve the page. So, at the start of the request, we see that > it is X bytes, but when we serve the request via sendfile, it > is changed to Y bytes. > > IIRC, FreeBSD is returning EAGAIN from sendfile() in this case - > thats not terribly helpful.
Neither FreeBSD nor Linux sendfile() fail a call to start sending at a bogus offset. Apparently this is part of the normal Unix semantics for seek-type operations. > Uh, what can we do? -- justin Greg and I chatted about this before he put the last patch on to find out for sure whether it was a changing file or bucket bogosity (bad offset) causing the problem. I think we have to trigger an error that (a) causes the connection to end and (b) causes an error status to be recorded. It would be nice if apr_sendfile() could detect that something bogus happened* and return an error, but I don't know if that is practical. *(kernel send[_]file() said everything was cool but it didn't send any bytes -- Jeff Trawick | [EMAIL PROTECTED] Born in Roswell... married an alien...
