On 13/07/2013 12:31 a.m., Tsantilas Christos wrote:
Hi all,

  Finally I did not apply the last patch I posted because I found a bug.
Squid hits an assertion in clientReplyContext::processExpired at
client_side_reply.cc:245,
assert(http->storeEntry()->lastmod >= 0);

Moreover looking in the code I am seeing that objects which does not
have a "Last-Modified" header are never stored in squid cache.
So in the patch I am posting here I removed the part of the patch which
allowed to use a stored entry which does not have Last-Modified header
but have a strong etag.   This is the part which causes the assertion .
Alternatively we can just remove the assertion.

However still I do not know how an entry with lastmod=-1 (no
Last-Modified header) found in my cache and causes the above assertion.

Any opinion on this?

I expect it will be the same way the no-Date objects find their way in. By being stored there temporarily while in-use by a client then RELEASEd only after completion. If shutdown terminates Squid before that RELEASE happens, or anything else stops it completing, they can be treated as normal cache objects after next DIRTY restart.

I think we need someone to do a bit of analysis and check that Squid is using Date properly as modified timestamp when Last-Modified is missing.

BTW: when you commit this If-None-Match patch please mark it --fixes squid:2112 and close http://bugs.squid-cache.org/show_bug.cgi?id=2112

Amos

Reply via email to