[master] 66beb68 Fix a race in persistent startup which seldomly triggered p00005

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 28 08:54:46 CEST 2015


commit 66beb68288394bdb2d95c9640933121a3a0cfef5
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 28 06:54:22 2015 +0000

    Fix a race in persistent startup which seldomly triggered p00005

diff --git a/bin/varnishd/storage/storage_persistent_silo.c b/bin/varnishd/storage/storage_persistent_silo.c
index 6d5c771..45c8a66 100644
--- a/bin/varnishd/storage/storage_persistent_silo.c
+++ b/bin/varnishd/storage/storage_persistent_silo.c
@@ -166,8 +166,8 @@ smp_load_seg(struct worker *wrk, const struct smp_sc *sc,
 		oc->ban = BAN_RefBan(oc, so->ban, sc->tailban);
 		HSH_Insert(wrk, so->hash, oc);
 		oc->exp = so->exp;
-		EXP_Inject(wrk, oc, sg->lru);
 		sg->nobj++;
+		EXP_Inject(wrk, oc, sg->lru);
 	}
 	Pool_Sumstat(wrk);
 	sg->flags |= SMP_SEG_LOADED;



More information about the varnish-commit mailing list