aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorNick Biryulin <keddad@yandex.ru>2025-01-27 23:21:24 +0300
committerDmitry Vyukov <dvyukov@google.com>2025-01-28 08:59:12 +0000
commitac37c1f8489ad2f16314d4b79f4cbf41356898f8 (patch)
treec526b2f1e2ec2e3ab3b5296019576dcf670d5d3d /executor
parent856815515a7a8d05b7ee511c95ca189e41927b4d (diff)
executor: increase timeouts for glob requests
Proper glob resolution is required for fuzzing. If it times out, it does so silently, and fuzzing dictionary will be smaller then expected, without any obvious errors. Given that, it makes sense to increase glob timeouts.
Diffstat (limited to 'executor')
-rw-r--r--executor/common.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/executor/common.h b/executor/common.h
index 7425a8bff..e7e02ffb2 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -696,17 +696,21 @@ static void loop(void)
// then the main thread hangs when it wants to page in a page.
// Below we check if the test process still executes syscalls
// and kill it after ~1s of inactivity.
+ // (Globs are an exception: they can be slow, so we allow up to ~120s)
uint64 min_timeout_ms = program_timeout_ms * 3 / 5;
uint64 inactive_timeout_ms = syscall_timeout_ms * 20;
+ uint64 glob_timeout_ms = program_timeout_ms * 120;
+
uint64 now = current_time_ms();
uint32 now_executed = output_data->completed.load(std::memory_order_relaxed);
if (executed_calls != now_executed) {
executed_calls = now_executed;
last_executed = now;
}
+
// TODO: adjust timeout for progs with syz_usb_connect call.
// If the max program timeout is exceeded, kill unconditionally.
- if (now - start > program_timeout_ms)
+ if ((now - start > program_timeout_ms && request_type != rpc::RequestType::Glob) || (now - start > glob_timeout_ms && request_type == rpc::RequestType::Glob))
goto kill_test;
// If the request type is not a normal test program (currently, glob expansion request),
// then wait for the full timeout (these requests don't update number of completed calls