From ac37c1f8489ad2f16314d4b79f4cbf41356898f8 Mon Sep 17 00:00:00 2001 From: Nick Biryulin Date: Mon, 27 Jan 2025 23:21:24 +0300 Subject: 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. --- executor/common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'executor') 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 -- cgit mrf-deployment