[4.1] f9fccc0 Try fixing the u00001 instability by retrying polls which fail with EINTR.
Poul-Henning Kamp
phk at FreeBSD.org
Fri Sep 4 15:54:50 CEST 2015
commit f9fccc0430ca1c963da1f8c67316bd1737bd5e7e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Sat Jul 11 20:24:54 2015 +0000
Try fixing the u00001 instability by retrying polls which fail
with EINTR.
I suspect the underlying issue is that SIGCHLD is being sent
to a random thread and that happens to be the s1 thread on some
platforms.
diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index 5a291dc..ec1350a 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -387,6 +387,8 @@ http_rxchar(struct http *hp, int n, int eof)
pfd[0].events = POLLIN;
pfd[0].revents = 0;
i = poll(pfd, 1, hp->timeout);
+ if (i < 0 && errno == EINTR)
+ continue;
if (i == 0)
vtc_log(hp->vl, hp->fatal,
"HTTP rx timeout (fd:%d %u ms)",
@@ -1215,6 +1217,8 @@ cmd_http_expect_close(CMD_ARGS)
fds[0].events = POLLIN | POLLERR;
fds[0].revents = 0;
i = poll(fds, 1, hp->timeout);
+ if (i < 0 && errno == EINTR)
+ continue;
if (i == 0)
vtc_log(vl, hp->fatal, "Expected close: timeout");
if (i != 1 || !(fds[0].revents & (POLLIN|POLLERR)))
More information about the varnish-commit
mailing list