[master] f69063109 Fix an h/2 thread leak
Dag Haavi Finstad
daghf at varnish-software.com
Fri Jun 15 14:18:14 UTC 2018
commit f69063109328a8d26e5c0fd402c42d13d72af6ee
Author: Dag Haavi Finstad <daghf at varnish-software.com>
Date: Fri Jun 15 16:03:22 2018 +0200
Fix an h/2 thread leak
If we failed to schedule a thread for a stream and it's not cleaned up
prior to handling a request body, the rxthread would sit around waiting
in h2_rx_data indefinitely.
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index c43a65f96..729f0a4ee 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -723,7 +723,7 @@ h2_rx_data(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
(void)wrk;
ASSERT_RXTHR(h2);
- if (r2 == NULL)
+ if (r2 == NULL || !r2->scheduled)
return (0);
Lck_Lock(&h2->sess->mtx);
AZ(h2->mailcall);
More information about the varnish-commit
mailing list