Commit 4a011b95 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Merge r3445: Add asserts to find where WRW is leaking in ticket 390



git-svn-id: http://www.varnish-cache.org/svn/branches/2.0@3645 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ca796713
...@@ -176,6 +176,7 @@ cnt_deliver(struct sess *sp) ...@@ -176,6 +176,7 @@ cnt_deliver(struct sess *sp)
sp->restarts = 0; sp->restarts = 0;
RES_WriteObj(sp); RES_WriteObj(sp);
AZ(sp->wrk->wfd);
HSH_Deref(sp->obj); HSH_Deref(sp->obj);
sp->obj = NULL; sp->obj = NULL;
sp->step = STP_DONE; sp->step = STP_DONE;
...@@ -383,6 +384,7 @@ cnt_fetch(struct sess *sp) ...@@ -383,6 +384,7 @@ cnt_fetch(struct sess *sp)
AN(sp->director); AN(sp->director);
AZ(sp->vbe); AZ(sp->vbe);
i = Fetch(sp); i = Fetch(sp);
AZ(sp->wrk->wfd);
AZ(sp->vbe); AZ(sp->vbe);
AN(sp->director); AN(sp->director);
...@@ -799,6 +801,7 @@ cnt_pipe(struct sess *sp) ...@@ -799,6 +801,7 @@ cnt_pipe(struct sess *sp)
assert(sp->handling == VCL_RET_PIPE); assert(sp->handling == VCL_RET_PIPE);
PipeSession(sp); PipeSession(sp);
AZ(sp->wrk->wfd);
sp->step = STP_DONE; sp->step = STP_DONE;
return (0); return (0);
} }
...@@ -1025,6 +1028,7 @@ CNT_Session(struct sess *sp) ...@@ -1025,6 +1028,7 @@ CNT_Session(struct sess *sp)
CHECK_OBJ_ORNULL(w->nobjhead, OBJHEAD_MAGIC); CHECK_OBJ_ORNULL(w->nobjhead, OBJHEAD_MAGIC);
} }
WSL_Flush(w, 0); WSL_Flush(w, 0);
AZ(w->wfd);
} }
/* /*
......
...@@ -308,6 +308,8 @@ wrk_thread(void *priv) ...@@ -308,6 +308,8 @@ wrk_thread(void *priv)
AN(w->wrq->func); AN(w->wrq->func);
w->lastused = NAN; w->lastused = NAN;
w->wrq->func(w, w->wrq->priv); w->wrq->func(w, w->wrq->priv);
AZ(w->wfd);
assert(w->wlp == w->wlb);
w->wrq = NULL; w->wrq = NULL;
Lck_Lock(&qp->mtx); Lck_Lock(&qp->mtx);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment