]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix rock/RockSwapDir.cc "slot->sameKey()" assertion (#1310)
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 17 Mar 2023 14:50:15 +0000 (14:50 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 25 Mar 2023 02:09:14 +0000 (02:09 +0000)
commit682b7fcd1a80df0ebfaca7c410e4210cdb7d059e
treecad45572d7e6139693bd6e7183041a5a6482edf0
parentc26990d0ddf812fc061715b08b4423bd3eace0c6
Fix rock/RockSwapDir.cc "slot->sameKey()" assertion (#1310)

Introduced in 2014 commit fa2301d, the assertion was too strict: Due to
store_client idiosyncrasies, openStoreIO() may be called long after the
initial cache hit is detected and locked for reading. It is possible
that the StoreEntry object has gone private since that detection and
locking. Private StoreEntry objects lose their public keys. The existing
anchor lock assures that we still point to the right disk entry, but we
cannot check that invariant using the now-private StoreEntry key.

There are no known sightings of this assertion in the wild, but we can
now reproduce it using high-load Web Polygraph tests. It is not clear
whether some other Squid changes made the triggering sequence of events
a bit more likely, or we were just lucky to discover the right workload.
src/fs/rock/RockSwapDir.cc