quick update notes below, but you should still review upstream's RELEASENOTES.html if you use this. - if you explicitly configure sslcrtd_program (for advanced tls mitm configurations) you need to change from /usr/local/libexec/squid/sslcrtd to /usr/local/libexec/squid/security_file_certgen in your config (if you just use options on the http_port line to enable this without extra config, this doesn't need to change). - if using a cert helper disk cache, you may need to clear/reinitialize the directory (not mentioned in release notes but I needed this). - the SMB_LM helpers (for old lanmanager protocol, which should not be used anyway) are no longer packaged, following upstream's change in default build.
39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
$OpenBSD: patch-src_store_cc,v 1.1 2019/02/05 23:03:16 sthen Exp $
|
|
|
|
proposed fix from https://bugs.squid-cache.org/show_bug.cgi?id=4823
|
|
see e.g. comment 36 for description
|
|
|
|
Index: src/store.cc
|
|
--- src/store.cc.orig
|
|
+++ src/store.cc
|
|
@@ -2044,13 +2044,24 @@ StoreEntry::detachFromDisk()
|
|
void
|
|
StoreEntry::checkDisk() const
|
|
{
|
|
- const bool ok = (swap_dirn < 0) == (swap_filen < 0) &&
|
|
- (swap_dirn < 0) == (swap_status == SWAPOUT_NONE) &&
|
|
- (swap_dirn < 0 || swap_dirn < Config.cacheSwap.n_configured);
|
|
+ try {
|
|
+ Must((swap_dirn < 0) == (swap_filen < 0));
|
|
+ Must((swap_dirn < 0) || (swap_dirn < Config.cacheSwap.n_configured));
|
|
|
|
- if (!ok) {
|
|
+ if (swap_dirn < 0) {
|
|
+ Must(swap_status == SWAPOUT_NONE);
|
|
+ } else if (swap_status == SWAPOUT_FAILED) {
|
|
+ // This situation may occur after swapout failures (e.g., max_size/max_object_size overflows).
|
|
+ // The entry is still attached to the disk (both swap_dirn and swap_dirn >= 0), but the
|
|
+ // corresponding disk entry is not available already. Such StoreEntry must be released by this
|
|
+ // time.
|
|
+ Must(EBIT_TEST(flags, RELEASE_REQUEST));
|
|
+ } else {
|
|
+ Must((swap_dirn >= 0 && (swap_status == SWAPOUT_WRITING || swap_status == SWAPOUT_DONE)));
|
|
+ }
|
|
+ } catch (...) {
|
|
debugs(88, DBG_IMPORTANT, "ERROR: inconsistent disk entry state " << *this);
|
|
- throw std::runtime_error("inconsistent disk entry state ");
|
|
+ throw;
|
|
}
|
|
}
|
|
|