corrupt cache

From: Peter van Empel <Peter.vanEmpel@dont-contact.us>
Date: Thu, 12 Jun 1997 15:53:41 +0200

We changed recently our Harvest cache for Squid Cache: Version 1.1.10 running
on a Sunos 4.1.3_U1. Squid crashed sometimes but after we introduced RunCache,
Squid was running day and night.

After 3 weeks we got suddenly a call from a user that he had seen 'strange'
pictures on our home-page. He made a print-screen as evidence. When we looked
at it in the morning everything looked oke and it was stable the rest of the
day and night. We assumed that a 'reload' at the browser-client has corrected
the squid-cache and put it all to rest.

Next morning we saw at our homepage that several 'strange' pictures appeared
at places where other pictures has to be. 80% of our homepage was correct.
Because 1 of the 3 pictures was a nude picture we thougt that someone was
hacking.

Our documentroot on a different machine was checked: everything oke
Our proxyserver was checked: completly secure. Every important daemon is
TCP-wrapped. Only a few staff-members could access. everything oke.

Then we looked in our cache.log and saw a lot of warnings:
97/06/05 10:42:23| storeSwapInHandle: WARNING: Object size mismatch.
97/06/05 10:42:23| --> 'http://cwis.kub.nl/~dbi/cwis/inf/index.htm'
97/06/05 10:42:23| --> Expecting 5330 bytes from file: /cache/0A/53/0000053A
97/06/05 10:42:23| --> Only read 2328 bytes
97/06/05 10:42:23| storeSwapInHandle: WARNING: Object size mismatch.
97/06/05 10:42:23| --> 'http://cwis.kub.nl/~dbi/cwis/gifs/help.gif'
97/06/05 10:42:23| --> Expecting 1276 bytes from file: /cache/0D/53/0000053D
97/06/05 10:42:23| --> Only read 1944 bytes
97/06/05 10:42:23| storeSwapInHandle: WARNING: Object size mismatch.
97/06/05 10:42:23| --> 'http://cwis.kub.nl/~drc/gifs/knoplhom.gif'
97/06/05 10:42:23| --> Expecting 1558 bytes from file: /cache/07/19/00000197
97/06/05 10:42:23| --> Only read 6044 bytes

This seems the problem. Squid is detecting that a certain objectsize is not
correct but still it served the files out. When it detects some
inconsistencies it has to refresh it, or deny this request , but never serve
them out!
A warning in a log is not enough, because at last a complete cache is getting
corrupt.

In the past we had seen FATALS like:
FATAL: Received Segment Violation...dying
FATAL: Received Bus Error...dying

I assume that RunCache was there to start it again..
Could this be the beginning of a corrupt cache. The moment that Squid doesn't
write his last information when it dies?

After this corrupt-cache-experience, I completely removed the cachedatabase,
started Squid al over again. It was a complete fresh start. Placing max
debug-levels on the source codes of cache_cf and store has no sence because my
poor log disk-space. And you never know when the troubles will start.

This morning it happened again... 6 days after.

Has anyone an idea what the main cause is of this error, so I can focus on it?

Thanx in advance.

-- 
===============
Peter van Empel 
Postbus 90153
5000 LE Tilburg
Voice : 0134 66 28 85
E-mail: Peter.vanEmpel@kub.nl
PGP-Key-ID: C58548B9 1994/10/10 
PGP-Fingerprint: 64 39 08 D6 86 2F 4C 1F  A4 63 06 DF B4 FE 31 DE
http://pgp.surfnet.nl:11371/pks/lookup?op=get&search=0xC58548B9
Received on Thu Jun 12 1997 - 06:57:13 MDT

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