aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/repro/repro.go6
-rw-r--r--pkg/repro/repro_test.go4
2 files changed, 10 insertions, 0 deletions
diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go
index af390162b..61793ac76 100644
--- a/pkg/repro/repro.go
+++ b/pkg/repro/repro.go
@@ -631,6 +631,12 @@ func (ctx *context) bisectProgs(progs []*prog.LogEntry, pred func([]*prog.LogEnt
guilty := [][]*prog.LogEntry{progs}
again:
+ if len(guilty) > 8 {
+ // This is usually the case for flaky crashes. Continuing bisection at this
+ // point would just take a lot of time and likely produce no result.
+ ctx.reproLog(3, "bisect: too many guilty chunks, aborting")
+ return nil, nil
+ }
ctx.reproLog(3, "bisect: guilty chunks: %v", chunksToStr(guilty))
for i, chunk := range guilty {
if len(chunk) == 1 {
diff --git a/pkg/repro/repro_test.go b/pkg/repro/repro_test.go
index bc6949a97..d28ec24ac 100644
--- a/pkg/repro/repro_test.go
+++ b/pkg/repro/repro_test.go
@@ -60,6 +60,10 @@ func TestBisect(t *testing.T) {
}
return guilty == numGuilty, nil
})
+ if numGuilty > 8 && len(progs) == 0 {
+ // Bisection has been aborted.
+ continue
+ }
if len(progs) != numGuilty {
t.Fatalf("bisect test failed: wrong number of guilty progs: got: %v, want: %v", len(progs), numGuilty)
}