[6.0] c403c025f Fix an h/2 thread leak

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Aug 16 08:53:13 UTC 2018


commit c403c025f5573498952cf684179cc8ccdc7fce95
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