From b83d2cc8893cb6f6523a796cd12752163c5948b6 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 23 May 2017 14:03:56 +0200 Subject: executor: increase syscall timeout in debug mode Debug output takes time, so 20ms is not enough for almost any syscall. Give a syscall 500ms in debug before considering it blocked. --- executor/executor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'executor/executor.cc') diff --git a/executor/executor.cc b/executor/executor.cc index 52da3a16b..955302cab 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -440,10 +440,11 @@ retry: // Wait for call completion. uint64_t start = current_time_ms(); uint64_t now = start; + const uint64_t timeout_ms = flag_debug ? 500 : 20; for (;;) { timespec ts = {}; ts.tv_sec = 0; - ts.tv_nsec = (20 - (now - start)) * 1000 * 1000; + ts.tv_nsec = (timeout_ms - (now - start)) * 1000 * 1000; syscall(SYS_futex, &th->done, FUTEX_WAIT, 0, &ts); if (__atomic_load_n(&th->done, __ATOMIC_RELAXED)) break; -- cgit mrf-deployment