[4.1] 34360fd Add some debugging (OSX64/m00011)

Poul-Henning Kamp phk at FreeBSD.org
Fri Sep 4 15:54:56 CEST 2015


commit 34360fd1bbecfc5b0a6b8a27c2fa97a19f0bcd6a
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Aug 25 19:43:51 2015 +0000

    Add some debugging (OSX64/m00011)

diff --git a/bin/varnishd/waiter/cache_waiter_poll.c b/bin/varnishd/waiter/cache_waiter_poll.c
index 72c97fb..5e2edb8 100644
--- a/bin/varnishd/waiter/cache_waiter_poll.c
+++ b/bin/varnishd/waiter/cache_waiter_poll.c
@@ -171,12 +171,15 @@ vwp_main(void *priv)
 			i = -1;
 		else
 			i = (int)floor(1e3 * (then - VTIM_real()));
+		assert(vwp->hpoll > 0);
+		AN(vwp->pollfd);
 		v = poll(vwp->pollfd, vwp->hpoll, i);
 		assert(v >= 0);
 		now = VTIM_real();
 		if (vwp->pollfd[0].revents)
 			v--;
 		for (i = 1; i < vwp->hpoll;) {
+VSL(SLT_Debug, vwp->pollfd[i].fd, "POLL loop i=%d revents=0x%x", i, vwp->pollfd[i].revents);
 			assert(vwp->pollfd[i].fd != vwp->pipes[0]);
 			wp = vwp->idx[i];
 			CHECK_OBJ_NOTNULL(wp, WAITED_MAGIC);



More information about the varnish-commit mailing list