Re: [PATCH] Revised fix for download corruption\

From: Henrik Nordström <hno@dont-contact.us>
Date: Tue, 5 Nov 2002 02:11:14 +0100 (CET)

You are correct. Clients sending TCP RST effectively force
"half_closed_clients off". The condition of the bug window is there even
without "hald_closed_clients off", only enlarged somewhat by
"half_closed_clients off".

If you want to expose the second window of this bug then add a sleep in
squidaio_do_read() (src/fs/aufs/aiops.c), and then request a large cache
hit and abort the request when some data have been received. This window
actually exposes the real problem of the lost/broken cbdata barrier.

  1. Send request
  2. Read some reply data, but not the entier packet received.
  3. Close the receiving socket to generate a RST.

Regards
Henrik

On Mon, 4 Nov 2002, Phil Oester wrote:

> Not true. half_closed_clients has not been changed on all my servers (and therefore defaults to on).
>
> The corruption is trivially reproducible with the following patch (made my testing much easier). The patch reproduces what occurs when someone sends a TCP reset in the middle of downloading a page. Think about how a page is downloaded with keepalives - one image at a time. The user pushes 'stop' in their browser before finishing the page, and the behavior found in this patch happens.
>
> The below patch, when combined with the following perl script should help anyone out who wants to dig deeper into this - though I'm happy with the bandaid for now.
>
> -Phil
Received on Mon Nov 04 2002 - 18:11:22 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:18:37 MST