Re: sendfile data corruption

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Sun, 12 Nov 2006 15:46:38 +0100
Andre Oppermann <andre_at_freebsd.org> wrote:

> Anish Mistry wrote:
> > On Saturday 11 November 2006 13:00, Andre Oppermann wrote:
> >> Pawel Worach wrote:

> >> I tried to reproduce the problem with lighttpd w/o success.
> >>
> >> My guess is that something gets wrong when using non-blocking
> >> sockets and the http headers.  Could you obtain the truss of the
> >> sendfile(2) calls so I get the input parameters to it?  A visual
> >> inspection of a corruptly transferred text file would be helpful
> >> too.  This should give more hints what happens, like duplicated or
> >> missing pages, etc.
> > For me I'm seeing 3 different behaviors.
> > 1) The file is just truncated after a few KB.
> > 2) A section of the file is just missing.  eg.  A small section of the 
> > file in the middle is just gone.
> > 3) The data is sent before the headers.  eg. a portion of the html is 
> > sent, and then you see
> 
> What webserver are you running?

I was seeing similar problems with Apache/2.0.5[89] and
Gatling 0.8. PNG files got corrupted and HTML files
contained the last lines twice in some HTTP clients
(not tested with Gatling).

scp continued to work.

After applying Joe's patch the PNG file corruption
seems to be gone, but I'm still seeing the HTML
corruption with Apache. I'm currently using
FreeBSD 7.0-CURRENT #19: Sat Nov 11 13:53:29 CET 2006

I'm seeing the HTML problem at http://tor.fabiankeil.de/
with lynx without proxy or any client chained with Privoxy,
but curl without proxy fetches the document intact and
doesn't display an error message either.

I'm not seeing the problem with Privoxy's integrated
documentation web server which doesn't use sendfile. I didn't
try this before applying Joe's patch though.

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

Received on Sun Nov 12 2006 - 13:47:28 UTC

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