[master] 63d19da Improve panic message in case #2592 happens again

Poul-Henning Kamp phk at FreeBSD.org
Mon Mar 12 10:23:08 UTC 2018


commit 63d19da46d2ed910647a65638e306335f35a6ea0
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Mar 12 10:20:40 2018 +0000

    Improve panic message in case #2592 happens again

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 9490129..582f70b 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -818,6 +818,6 @@ Tlen(const txt t)
 	do {								\
 		if ((ptr)->magic != (exp))				\
 			VSB_printf((vsb),				\
-			    "MAGIC 0x%08x (Should:%s/0x%08x)\n",	\
-			    (ptr)->magic, #exp, exp);			\
+			    "MAGIC at %p is 0x%08x (Should be: %s/0x%08x)\n", \
+			    ptr, (ptr)->magic, #exp, exp);		\
 	} while(0)
diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index 4c194bb..dea26a6 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -118,7 +118,7 @@ sess_close_2str(enum sess_close sc, int want_desc)
 
 /*--------------------------------------------------------------------*/
 
-#define N_ALREADY 64
+#define N_ALREADY 256
 static const void *already_list[N_ALREADY];
 static int already_idx;
 
diff --git a/bin/varnishd/http2/cache_http2_panic.c b/bin/varnishd/http2/cache_http2_panic.c
index 26bb42f..9e80eb6 100644
--- a/bin/varnishd/http2/cache_http2_panic.c
+++ b/bin/varnishd/http2/cache_http2_panic.c
@@ -48,6 +48,7 @@ h2_sess_panic(struct vsb *vsb, const struct sess *sp)
 	VSB_printf(vsb, "streams {\n");
 	VSB_indent(vsb, 2);
 	VTAILQ_FOREACH(r2, &h2->streams, list) {
+		PAN_CheckMagic(vsb, r2, H2_REQ_MAGIC);
 		VSB_printf(vsb, "0x%08x", r2->stream);
 		switch (r2->state) {
 #define H2_STREAM(U,sd,d) case H2_S_##U: VSB_printf(vsb, " %-6s", sd); break;


More information about the varnish-commit mailing list