[master] f2357c88f Don't panic on worker pool failuers during H2:OU handshake
Poul-Henning Kamp
phk at FreeBSD.org
Mon Mar 11 11:49:07 UTC 2019
commit f2357c88fa396b3fe911e9f194527e1fbe0dd978
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Mar 11 11:47:18 2019 +0000
Don't panic on worker pool failuers during H2:OU handshake
Fixes #2937
diff --git a/bin/varnishd/http2/cache_http2_session.c b/bin/varnishd/http2/cache_http2_session.c
index 671d4a01d..cbdda42c0 100644
--- a/bin/varnishd/http2/cache_http2_session.c
+++ b/bin/varnishd/http2/cache_http2_session.c
@@ -303,7 +303,7 @@ h2_ou_session(struct worker *wrk, struct h2_sess *h2,
r2->scheduled = 0;
h2_del_req(wrk, r2);
VSLb(h2->vsl, SLT_Debug, "H2: No Worker-threads");
- return (h2_ou_rel(wrk, req));
+ return (0);
}
return (1);
}
diff --git a/bin/varnishtest/tests/r02937.vtc b/bin/varnishtest/tests/r02937.vtc
new file mode 100644
index 000000000..8a2d00d58
--- /dev/null
+++ b/bin/varnishtest/tests/r02937.vtc
@@ -0,0 +1,25 @@
+varnishtest "#2937: Panic on OU pool failure"
+
+server s1 {
+ rxreq
+ txresp
+} -start
+
+varnish v1 -vcl+backend {} -start
+
+varnish v1 -cliok "param.set feature +http2"
+varnish v1 -cliok "debug.reqpool.fail F"
+
+client c1 {
+ send "GET / HTTP/1.1\r\n"
+ send "Host: foo\r\n"
+ send "Upgrade: h2c\r\n"
+ send "HTTP2-Settings: AAMAAABkAAQAAP__\r\n"
+ send "\r\n"
+ rxresp
+ expect resp.status == 101
+ expect resp.http.upgrade == h2c
+ expect resp.http.connection == Upgrade
+ txpri
+ expect_close
+} -run
More information about the varnish-commit
mailing list