aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/fuzzer/queue/queue.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-07-01 14:26:05 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-08-02 13:16:51 +0000
commit66fcb0a84fcd55ad8e1444cdd0bc0ad6592f7329 (patch)
tree998e52d5569938e0251da1eb7c54c3746186b488 /pkg/fuzzer/queue/queue.go
parent1e9c4cf3ae82ef82220af312606fffe65e124563 (diff)
pkg/fuzzer: try to triage on different VMs
Distribute triage requests to different VMs.
Diffstat (limited to 'pkg/fuzzer/queue/queue.go')
-rw-r--r--pkg/fuzzer/queue/queue.go21
1 files changed, 16 insertions, 5 deletions
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 {