From 66fcb0a84fcd55ad8e1444cdd0bc0ad6592f7329 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 1 Jul 2024 14:26:05 +0200 Subject: pkg/fuzzer: try to triage on different VMs Distribute triage requests to different VMs. --- pkg/fuzzer/queue/queue.go | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'pkg/fuzzer/queue/queue.go') diff --git a/pkg/fuzzer/queue/queue.go b/pkg/fuzzer/queue/queue.go index aadbaade8..cbdb2ba19 100644 --- a/pkg/fuzzer/queue/queue.go +++ b/pkg/fuzzer/queue/queue.go @@ -41,18 +41,28 @@ type Request struct { // Important requests will be retried even from crashed VMs. Important bool + // Avoid specifies set of executors that are preferable to avoid when executing this request. + // The restriction is soft since there can be only one executor at all or available right now. + Avoid []ExecutorID + // The callback will be called on request completion in the LIFO order. // If it returns false, all further processing will be stopped. // It allows wrappers to intercept Done() requests. callback DoneCallback - onceCrashed bool + onceCrashed bool + delayedSince uint64 mu sync.Mutex result *Result done chan struct{} } +type ExecutorID struct { + VM int + Proc int +} + type DoneCallback func(*Request, *Result) bool func (r *Request) OnDone(cb DoneCallback) { @@ -137,10 +147,11 @@ func (r *Request) initChannel() { } type Result struct { - Info *flatrpc.ProgInfo - Output []byte - Status Status - Err error // More details in case of ExecFailure. + Info *flatrpc.ProgInfo + Executor ExecutorID + Output []byte + Status Status + Err error // More details in case of ExecFailure. } func (r *Result) clone() *Result { -- cgit mrf-deployment