mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-17 01:58:02 +00:00
syz-ci: set Timeout for bisections
Add Timeout config param for bisections. Specify timeout in syz-ci as 8h based on the following data. Out of 1049 cause bisections that we have now: - 891 finished under 6h (84.9%) - 957 finished under 8h (91.2%) - 980 finished under 10h (93.4%) - 989 finished under 12h (94.3%) - 1011 finished under 18h (96.3%) - 1025 finished under 24h (97.7%) There is also a significant increase in errors/inconclusive bisections after ~8h. Out of 4075 fix bisections: - 4015 finished under 6h (98.5%) - 4020 finished under 8h (98.7%) - 4026 finished under 10h (98.8%) - 4032 finished under 12h (98.9%) Significant increase in errors starts after ~12h. The current timeout also take into account that bisection jobs compete with patch testing jobs (it's bad delaying patch testing). When/if bisection jobs don't compete with patch testing, it makes sense to increase this to 12-24h. Fixes #1923
This commit is contained in:
parent
1ad470c265
commit
0faffd0438
@ -23,6 +23,7 @@ type Config struct {
|
||||
Fix bool
|
||||
BinDir string
|
||||
DebugDir string
|
||||
Timeout time.Duration
|
||||
Kernel KernelConfig
|
||||
Syzkaller SyzkallerConfig
|
||||
Repro ReproConfig
|
||||
@ -68,6 +69,7 @@ type env struct {
|
||||
kernelConfig []byte
|
||||
inst instance.Env
|
||||
numTests int
|
||||
startTime time.Time
|
||||
buildTime time.Duration
|
||||
testTime time.Duration
|
||||
}
|
||||
@ -135,6 +137,7 @@ func runImpl(cfg *Config, repo vcs.Repo, inst instance.Env) (*Result, error) {
|
||||
bisecter: bisecter,
|
||||
minimizer: minimizer,
|
||||
inst: inst,
|
||||
startTime: time.Now(),
|
||||
}
|
||||
head, err := repo.HeadCommit()
|
||||
if err != nil {
|
||||
@ -455,6 +458,9 @@ func (env *env) build() (*vcs.Commit, string, error) {
|
||||
|
||||
func (env *env) test() (*testResult, error) {
|
||||
cfg := env.cfg
|
||||
if cfg.Timeout != 0 && time.Since(env.startTime) > cfg.Timeout {
|
||||
return nil, fmt.Errorf("bisection is taking too long (>%v), aborting", cfg.Timeout)
|
||||
}
|
||||
env.numTests++
|
||||
current, kernelSign, err := env.build()
|
||||
res := &testResult{
|
||||
|
@ -384,8 +384,27 @@ func (jp *JobProcessor) bisect(job *Job, mgrcfg *mgrconfig.Config) error {
|
||||
cfg := &bisect.Config{
|
||||
Trace: io.MultiWriter(trace, log.VerboseWriter(3)),
|
||||
DebugDir: osutil.Abs(filepath.Join("jobs", "debug", strings.Replace(req.ID, "|", "_", -1))),
|
||||
Fix: req.Type == dashapi.JobBisectFix,
|
||||
BinDir: jp.cfg.BisectBinDir,
|
||||
// Out of 1049 cause bisections that we have now:
|
||||
// - 891 finished under 6h (84.9%)
|
||||
// - 957 finished under 8h (91.2%)
|
||||
// - 980 finished under 10h (93.4%)
|
||||
// - 989 finished under 12h (94.3%)
|
||||
// - 1011 finished under 18h (96.3%)
|
||||
// - 1025 finished under 24h (97.7%)
|
||||
// There is also a significant increase in errors/inconclusive bisections after ~8h.
|
||||
// Out of 4075 fix bisections:
|
||||
// - 4015 finished under 6h (98.5%)
|
||||
// - 4020 finished under 8h (98.7%)
|
||||
// - 4026 finished under 10h (98.8%)
|
||||
// - 4032 finished under 12h (98.9%)
|
||||
// Significant increase in errors starts after ~12h.
|
||||
// The current timeout also take into account that bisection jobs
|
||||
// compete with patch testing jobs (it's bad delaying patch testing).
|
||||
// When/if bisection jobs don't compete with patch testing,
|
||||
// it makes sense to increase this to 12-24h.
|
||||
Timeout: 8 * time.Hour,
|
||||
Fix: req.Type == dashapi.JobBisectFix,
|
||||
BinDir: jp.cfg.BisectBinDir,
|
||||
Kernel: bisect.KernelConfig{
|
||||
Repo: mgr.mgrcfg.Repo,
|
||||
Branch: mgr.mgrcfg.Branch,
|
||||
|
Loading…
x
Reference in New Issue
Block a user