diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-05-23 14:03:56 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-05-23 14:03:56 +0200 |
| commit | b83d2cc8893cb6f6523a796cd12752163c5948b6 (patch) | |
| tree | 054a8b439bbb28a7b3289142d275ccc3d7166795 /executor | |
| parent | ecebe18fc3a6e2b94ece456a6618beeac54f4a63 (diff) | |
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.
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/executor.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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; |
