[4.1] fb4fb34 Remove spurious assert on VCL release
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Sep 12 17:57:13 CEST 2016
commit fb4fb34e503b9c175c781fc2c22835e81d3a60e0
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Aug 30 21:55:07 2016 +0200
Remove spurious assert on VCL release
diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index a2d90eb..7dd6b95 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -455,8 +455,12 @@ VRT_rel_vcl(VRT_CTX, struct vclref **refp)
vcl = ctx->vcl;
CHECK_OBJ_NOTNULL(vcl, VCL_MAGIC);
assert(vcl == ref->vcl);
- assert(vcl->temp == VCL_TEMP_WARM || vcl->temp == VCL_TEMP_BUSY ||
- vcl->temp == VCL_TEMP_COOLING);
+
+ /* NB: A VCL may be released by a VMOD at any time, but it must happen
+ * after a warmup and before the end of a cooldown. The release may or
+ * may not happen while the same thread holds the temperature lock, so
+ * instead we check that all references are gone in VCL_Nuke.
+ */
Lck_Lock(&vcl_mtx);
assert(!VTAILQ_EMPTY(&vcl->ref_list));
More information about the varnish-commit
mailing list