[master] fda1241b4 Add asserts to ensure the (hypothetical?) race in #2528 doesn't happen.
Poul-Henning Kamp
phk at FreeBSD.org
Wed Jun 13 07:36:10 UTC 2018
commit fda1241b4f4d358174788f90d4b0803e0bc055cf
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Jun 13 07:35:00 2018 +0000
Add asserts to ensure the (hypothetical?) race in #2528 doesn't happen.
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 09418262a..0f81e544e 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -927,6 +927,10 @@ vbf_fetch_thread(struct worker *wrk, void *priv)
while (stp != F_STP_DONE) {
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
assert(bo->fetch_objcore->boc->refcount >= 1);
+ if (bo->fetch_objcore->boc->state < BOS_REQ_DONE)
+ AN(bo->req);
+ else
+ AZ(bo->req);
switch (stp) {
#define FETCH_STEP(l, U, arg) \
case F_STP_##U: \
More information about the varnish-commit
mailing list