From 52a7b9393f0a55ee3d0ab4dd526eba9da2be7a58 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 26 Nov 2008 12:05:44 +0000 Subject: [PATCH] Add asserts to find where WRW is leaking in ticket 390 git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3445 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_center.c | 4 ++++ varnish-cache/bin/varnishd/cache_pool.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index f9995496..8a5a07c9 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -176,6 +176,7 @@ cnt_deliver(struct sess *sp) sp->restarts = 0; RES_WriteObj(sp); + AZ(sp->wrk->wfd); HSH_Deref(sp->obj); sp->obj = NULL; sp->step = STP_DONE; @@ -383,6 +384,7 @@ cnt_fetch(struct sess *sp) AN(sp->director); AZ(sp->vbe); i = Fetch(sp); + AZ(sp->wrk->wfd); AZ(sp->vbe); AN(sp->director); @@ -799,6 +801,7 @@ cnt_pipe(struct sess *sp) assert(sp->handling == VCL_RET_PIPE); PipeSession(sp); + AZ(sp->wrk->wfd); sp->step = STP_DONE; return (0); } @@ -1025,6 +1028,7 @@ CNT_Session(struct sess *sp) CHECK_OBJ_ORNULL(w->nobjhead, OBJHEAD_MAGIC); } WSL_Flush(w, 0); + AZ(w->wfd); } /* diff --git a/varnish-cache/bin/varnishd/cache_pool.c b/varnish-cache/bin/varnishd/cache_pool.c index 3fe9a6e5..881ba0a6 100644 --- a/varnish-cache/bin/varnishd/cache_pool.c +++ b/varnish-cache/bin/varnishd/cache_pool.c @@ -308,6 +308,8 @@ wrk_thread(void *priv) AN(w->wrq->func); w->lastused = NAN; w->wrq->func(w, w->wrq->priv); + AZ(w->wfd); + assert(w->wlp == w->wlb); w->wrq = NULL; Lck_Lock(&qp->mtx); } -- 2.39.5