diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-02-01 23:53:07 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-02-02 09:48:55 +0000 |
| commit | 60bf9982e3c5f47dee643bd88d86c7f0b631e32d (patch) | |
| tree | 35b20c7f3a0c22e130eafcb7403575469d553a65 /syz-manager | |
| parent | d61103fc7c348a4ab85310b9a08c1f05f47a8655 (diff) | |
syz-manager: treat progs from hub and dashboard differently
From dashboard we receive logs, from syz-hub - ready reproducers.
If we failed to find a repro from the log, report a failure back
to the dashboard. If we succeeded, prepend the options.
Diffstat (limited to 'syz-manager')
| -rw-r--r-- | syz-manager/hub.go | 4 | ||||
| -rw-r--r-- | syz-manager/manager.go | 22 |
2 files changed, 14 insertions, 12 deletions
diff --git a/syz-manager/hub.go b/syz-manager/hub.go index 9825c4857..9598a41d4 100644 --- a/syz-manager/hub.go +++ b/syz-manager/hub.go @@ -283,8 +283,8 @@ func (hc *HubConnector) processRepros(repros [][]byte) int { typ = crash.MemoryLeak } hc.hubReproQueue <- &Crash{ - vmIndex: -1, - external: true, + vmIndex: -1, + fromHub: true, Report: &report.Report{ Title: "external repro", Type: typ, diff --git a/syz-manager/manager.go b/syz-manager/manager.go index 1ef1f18ea..a06aee93b 100644 --- a/syz-manager/manager.go +++ b/syz-manager/manager.go @@ -139,8 +139,9 @@ const ( const currentDBVersion = 4 type Crash struct { - vmIndex int - external bool // this crash was created based on a repro from hub or dashboard + vmIndex int + fromHub bool // this crash was created based on a repro from syz-hub + fromDashboard bool // .. or from dashboard *report.Report machineInfo []byte } @@ -323,7 +324,8 @@ type ReproResult struct { strace *repro.StraceResult stats *repro.Stats err error - external bool // repro came from hub or dashboard + fromHub bool + fromDashboard bool originalTitle string // crash title before we started bug reproduction } @@ -445,7 +447,7 @@ func (mgr *Manager) vmLoop() { } delete(reproducing, res.report0.Title) if res.repro == nil { - if !res.external { + if !res.fromHub { mgr.saveFailedRepro(res.report0, res.stats) } } else { @@ -504,7 +506,8 @@ func (mgr *Manager) runRepro(crash *Crash, vmIndexes []int, putInstances func(.. repro: res, stats: stats, err: err, - external: crash.external, + fromHub: crash.fromHub, + fromDashboard: crash.fromDashboard, originalTitle: crash.Title, } if err == nil && res != nil && mgr.cfg.StraceBin != "" { @@ -767,7 +770,6 @@ func (mgr *Manager) runInstance(index int) (*Crash, error) { } crash := &Crash{ vmIndex: index, - external: false, Report: rep, machineInfo: machineInfo, } @@ -997,7 +999,7 @@ func (mgr *Manager) needLocalRepro(crash *Crash) bool { } func (mgr *Manager) needRepro(crash *Crash) bool { - if crash.external { + if crash.fromHub || crash.fromDashboard { return true } if mgr.checkResult == nil || (mgr.checkResult.Features[host.FeatureLeak].Enabled && @@ -1061,7 +1063,7 @@ func (mgr *Manager) saveRepro(res *ReproResult) { progText := repro.Prog.Serialize() // Append this repro to repro list to send to hub if it didn't come from hub originally. - if !res.external { + if !res.fromHub { progForHub := []byte(fmt.Sprintf("# %+v\n# %v\n# %v\n%s", repro.Opts, repro.Report.Title, mgr.cfg.Tag, progText)) mgr.mu.Lock() @@ -1573,8 +1575,8 @@ func (mgr *Manager) dashboardReproTasks() { } if len(resp.CrashLog) > 0 { mgr.externalReproQueue <- &Crash{ - vmIndex: -1, - external: true, + vmIndex: -1, + fromDashboard: true, Report: &report.Report{ Title: resp.Title, Output: resp.CrashLog, |
