From 109d2082129b092aabc13316527c1c35a9c6be1b Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 7 Aug 2024 12:47:06 +0200 Subject: syz-manager: restore crash collection in snapshotting mode We should have been closing only the context of the Pool.Loop(). --- syz-manager/manager.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'syz-manager') 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() -- cgit mrf-deployment