aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-execprog
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-04-15 11:15:51 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-04-15 10:17:59 +0000
commitf44873e33df5bb834265aeced37ef199ce0717c7 (patch)
treead7ffedce387480c457d3ff8dbb82bdafc2b57d5 /tools/syz-execprog
parent011dbba622c6133a460ca0757a71169345ed06d6 (diff)
syz-fuzzer: don't sleep after transient executor errors
There is non-0 rate of transient executor errors. Currently we do full GC, free OS memory and sleep for a second after then. This was more meaningful when the fuzzer was in the VM as the fuzzer process consumed lots of memory. Now it consumes only ~20MB, any OOMs are likely not due to the fuzzer process. So instead sleep briefly and only after several retries (I would assume most errors are fixed after 1 retry).
Diffstat (limited to 'tools/syz-execprog')
-rw-r--r--tools/syz-execprog/execprog.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go
index b1c355a1b..d2d194da2 100644
--- a/tools/syz-execprog/execprog.go
+++ b/tools/syz-execprog/execprog.go
@@ -185,7 +185,9 @@ func (ctx *Context) execute(pid int, env *ipc.Env, p *prog.Prog, progIndex int)
}
// Don't print err/output in this case as it may contain "SYZFAIL" and we want to fail yet.
log.Logf(1, "executor failed, retrying")
- time.Sleep(time.Second)
+ if try > 3 {
+ time.Sleep(100 * time.Millisecond)
+ }
continue
}
if ctx.config.Flags&ipc.FlagDebug != 0 || err != nil {