Re: Cache index mangled?

From: Dancer <dancer@dont-contact.us>
Date: Wed, 05 Nov 1997 13:17:20 +1000

We're using 1.1.17, and it happened yesterday. I'd say the glitch is still there.

D

Stewart Forster wrote:

> Hi All,
>
> I implemented the re-usable cache log files (ie. no unlink - just write
> over the top of the old file) independently to the mainstream squid code. I
> noticed that when a cache was restarted however after it had died abnormally,
> the would be a race condition that while the cache was reading through the old
> index log file, that if someone referred to an URL whose cache log file had
> subsequently been written over (by porn perhaps) then this situation would
> arise. It may be that since you've upgraded squid this situation hasn't
> come about yet for those have noted it hasn't happened since 1.1.14.
>
> I don't know what has been done to fix this problem in the current
> versions of squid, but for us, the only true fix was to NOT serve anything
> from disk (newly pulled in hot memory objects are OK) until the entire cache
> log file had been reread, giving squid a chance to evict the invalid URL to
> cache log file mappings.
>
> This may seem expensive but the reread only takes 15 minutes for us
> (2.5 million URLS) so we decided it was small price for the rare event when
> squid dies without rewriting a clean swap log file.
>
> Can someone confirm if the newer versions of squid have fixed this
> problem, and if not, I'll send my patches.
>
> Cheers,
>
> Stew.

--
Note to evil sorcerers and mad scientists: don't ever, ever summon powerful
demons or rip holes in the fabric of space and time. It's never a good idea.
ICQ UIN: 3225440
Received on Tue Nov 04 1997 - 19:26:54 MST

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