r2516 - trunk/varnish-cache/bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Tue Feb 19 12:57:04 CET 2008


Author: des
Date: 2008-02-19 12:57:04 +0100 (Tue, 19 Feb 2008)
New Revision: 2516

Modified:
   trunk/varnish-cache/bin/varnishd/cache_center.c
Log:
If HSH_Lookup() returns non-NULL, assert that sp->objhead != NULL.
HSH_Lookup() is supposed to guarantee this, but it appears that it
sometimes doesn't (perhaps a bug snuck in with grace mode?)


Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2008-02-19 11:52:27 UTC (rev 2515)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2008-02-19 11:57:04 UTC (rev 2516)
@@ -547,6 +547,7 @@
 		 * We hit a busy object, disembark worker thread and expect
 		 * hash code to restart us, still in STP_LOOKUP, later.
 		 */
+		spassert(sp->objhead != NULL);
 		WSP(sp, SLT_Debug, "on waiting list <%s>", sp->objhead->hash);
 		/*
 		 * There is a non-zero risk that we come here more than once




More information about the varnish-commit mailing list