httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <ch...@topsail.org>
Subject Re: [PATCH] garbage_coll() not called in proxy if filsystem full
Date Wed, 19 Mar 1997 20:40:18 GMT
This looks good as far as it goes, Petr. I will stop working on my patch
for these problems, assuming my testing indicates this works (no doubt
it will) and add an additional patch for proxy_ftp.c. The same problem
can occur there.

Petr Lampa wrote:
> 
> > Symptoms:
> >
> > When the cache filesystem is full, garbage_coll() is never called,
> > and the filesystem remains full indefinitely.
> >
> > Description:
> >
> > 1. garbage_coll() is called only when proxy_cache_tidy() successfully
> > writes new cached file. When the filesystem is full, this never happens.
> > proxy_cache_tidy() returns prematurely, garbage_coll() at the end
> > of the proxy_cache_tidy() is not called, and cache remains full.
> >
> > 2. If $CACHEDIR/.time doesn't exist and the filesystem is full, garbage_coll()
> > ends prematurely and doesn't clean anything.
> >
> 
> Here is the patch for above and two another bugs:
> 1. Cache cleanup when the cache filesystem is full - fixes only #1 of
>    the report. I don't think that #2 is critical (failure of cache
>    cleanup if $CACHE/.time cannot be created since the filesystem is full).
> 2. Incomplete cache file left if origin server didn't send Content-Length
>    header and the client has aborted transfer.
> 3. Incomplete cache file left if origin server didn't send Content-Length
>    header and bwrite() to client has failed.
> 
> Fix for #1 - move garbage_coll() from proxy_cache_tidy() to the end
>              of http_handler() and ftp_handler().
> Fix for #2 - delete cache file if connection->aborted in proxy_cache_tidy()
> Fix for #3 - delete cache file if bwrite() fails in send_fb()
> 

-- 
chuck
Chuck Murcko
The Topsail Group, West Chester PA USA
chuck@topsail.org

Mime
View raw message