diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-06-27 12:01:58 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-07-02 15:07:08 +0000 |
| commit | 07dedd50ee8834dbca4da7667e69e72b7d0565b9 (patch) | |
| tree | 44925ee15f9fad9ad0641435fd459d25375c811d /syz-manager/manager.go | |
| parent | 6a2ff1acbd95b320444a729d9d281835be88ec66 (diff) | |
pkg/fuzzer: remove signal rotation
Signal rotation is intended to make the fuzzer re-discover flaky coverage
in non flaky way. However, taking into accout that we get effectively
the same effect after each manager restart, and that the fuzzer is overloaded
with triage/smash jobs, it does not look to be worth it.
Diffstat (limited to 'syz-manager/manager.go')
| -rw-r--r-- | syz-manager/manager.go | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/syz-manager/manager.go b/syz-manager/manager.go index 037b3a305..f888c4286 100644 --- a/syz-manager/manager.go +++ b/syz-manager/manager.go @@ -1622,39 +1622,14 @@ func (mgr *Manager) MaxSignal() signal.Signal { return nil } -func (mgr *Manager) fuzzerSignalRotation() { - const ( - rotateSignals = 1000 - timeBetweenRotates = 15 * time.Minute - // Every X dropped signals may in the worst case lead up to 3 * X - // additional triage executions, which is in this case constitutes - // 3000/60000 = 5%. - execsBetweenRotates = 60000 - ) - lastExecTotal := 0 - lastRotation := time.Now() - for range time.NewTicker(5 * time.Minute).C { - if mgr.serv.StatExecs.Val()-lastExecTotal < execsBetweenRotates { - continue - } - if time.Since(lastRotation) < timeBetweenRotates { - continue - } - mgr.fuzzer.Load().RotateMaxSignal(rotateSignals) - lastRotation = time.Now() - lastExecTotal = mgr.serv.StatExecs.Val() - } -} - func (mgr *Manager) fuzzerLoop(fuzzer *fuzzer.Fuzzer) { for ; ; time.Sleep(time.Second / 2) { if mgr.cfg.Cover { // Distribute new max signal over all instances. - newSignal, dropSignal := fuzzer.Cover.GrabSignalDelta() - log.Logf(2, "distributing %d new signal, %d dropped signal", - len(newSignal), len(dropSignal)) - if len(newSignal)+len(dropSignal) != 0 { - mgr.serv.DistributeSignalDelta(newSignal, dropSignal) + newSignal := fuzzer.Cover.GrabSignalDelta() + log.Logf(2, "distributing %d new signal", len(newSignal)) + if len(newSignal) != 0 { + mgr.serv.DistributeSignalDelta(newSignal) } } @@ -1668,7 +1643,6 @@ func (mgr *Manager) fuzzerLoop(fuzzer *fuzzer.Fuzzer) { if mgr.enabledFeatures&flatrpc.FeatureLeak != 0 { mgr.serv.TriagedCorpus() } - go mgr.fuzzerSignalRotation() if mgr.cfg.HubClient != "" { mgr.phase = phaseTriagedCorpus go mgr.hubSyncLoop(pickGetter(mgr.cfg.HubKey)) |
