From 07dedd50ee8834dbca4da7667e69e72b7d0565b9 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 27 Jun 2024 12:01:58 +0200 Subject: 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. --- syz-manager/manager.go | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) (limited to 'syz-manager/manager.go') 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)) -- cgit mrf-deployment