[master] 7f26d65 Under circumstances I don't understand, test p00006 takes 52 seconds on osx.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Feb 8 12:50:21 CET 2016
commit 7f26d6506ba1bcd725e8e40ec9c6adf35fbddb67
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Feb 8 11:49:14 2016 +0000
Under circumstances I don't understand, test p00006 takes 52 seconds
on osx.
Use the cli_timeout to control how long the MGR waits before killing
the worker process, and give this test 60 seconds.
diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index 8baaa6d..1484e06 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -483,14 +483,20 @@ mgt_reap_child(void)
ev_listen = NULL;
}
- /* Wait 10 seconds for child to die */
- for (i = 0; i < 10; i++) {
+ /* Compose obituary */
+ vsb = VSB_new_auto();
+ XXXAN(vsb);
+
+ /* Wait for child to die */
+ for (i = 0; i < mgt_param.cli_timeout; i++) {
r = waitpid(child_pid, &status, WNOHANG);
if (r == child_pid)
break;
(void)sleep(1);
}
if (r == 0) {
+ VSB_printf(vsb, "Child (%jd) not dying, killing", (intmax_t)r);
+
/* Kick it Jim... */
if (MGT_FEATURE(FEATURE_NO_COREDUMP))
(void)kill(child_pid, SIGKILL);
@@ -504,9 +510,6 @@ mgt_reap_child(void)
MAC_reopen_sockets(NULL);
- /* Compose obituary */
- vsb = VSB_new_auto();
- XXXAN(vsb);
VSB_printf(vsb, "Child (%jd) %s", (intmax_t)r,
status ? "died" : "ended");
if (WIFEXITED(status) && WEXITSTATUS(status)) {
diff --git a/bin/varnishtest/tests/p00006.vtc b/bin/varnishtest/tests/p00006.vtc
index fb5fcca..9303fdc 100644
--- a/bin/varnishtest/tests/p00006.vtc
+++ b/bin/varnishtest/tests/p00006.vtc
@@ -12,6 +12,7 @@ server s1 {
varnish v1 \
-arg "-sdeprecated_persistent,${tmpdir}/_.per,10m" \
+ -arg "-pcli_timeout=60"
-arg "-pban_lurker_sleep=0" \
-vcl+backend { } -start
More information about the varnish-commit
mailing list