aboutsummaryrefslogtreecommitdiffstats
path: root/syz-manager
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-08-07 12:47:06 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-08-07 11:40:19 +0000
commit109d2082129b092aabc13316527c1c35a9c6be1b (patch)
tree410d0cf165f583b4e5e5e376b47f8c9bed855d11 /syz-manager
parent7b2f2f35af7b159d1eaa589844939134ae9ff082 (diff)
syz-manager: restore crash collection in snapshotting mode
We should have been closing only the context of the Pool.Loop().
Diffstat (limited to 'syz-manager')
-rw-r--r--syz-manager/manager.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/syz-manager/manager.go b/syz-manager/manager.go
index 8156ac436..ec4fc5dd4 100644
--- a/syz-manager/manager.go
+++ b/syz-manager/manager.go
@@ -312,13 +312,16 @@ func RunManager(mode Mode, cfg *mgrconfig.Config) {
<-vm.Shutdown
return
}
- ctx, cancel := context.WithCancel(vm.ShutdownCtx())
- mgr.loopStop = cancel
mgr.pool = vm.NewDispatcher(mgr.vmPool, mgr.fuzzerInstance)
mgr.reproMgr = newReproManager(mgr, mgr.vmPool.Count()-mgr.cfg.FuzzingVMs, mgr.cfg.DashboardOnlyRepro)
+ ctx := vm.ShutdownCtx()
go mgr.processFuzzingResults(ctx)
go mgr.reproMgr.Loop(ctx)
- mgr.pool.Loop(ctx)
+
+ loopCtx, cancel := context.WithCancel(ctx)
+ mgr.loopStop = cancel
+ mgr.pool.Loop(loopCtx)
+
if cfg.Snapshot {
log.Logf(0, "starting VMs for snapshot mode")
mgr.serv.Close()