Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/manager: tolerate more bug list querying errors #5427

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion pkg/manager/crash.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"time"

"github.com/google/syzkaller/pkg/hash"
"github.com/google/syzkaller/pkg/log"
"github.com/google/syzkaller/pkg/mgrconfig"
"github.com/google/syzkaller/pkg/osutil"
"github.com/google/syzkaller/prog"
Expand Down Expand Up @@ -285,16 +286,23 @@ func (cs *CrashStore) BugList() ([]*BugInfo, error) {
return nil, err
}
var ret []*BugInfo
var lastErr error
errCount := 0
for _, dir := range dirs {
info, err := cs.BugInfo(dir, false)
if err != nil {
return nil, fmt.Errorf("failed to process crashes/%s: %w", dir, err)
errCount++
lastErr = err
continue
}
ret = append(ret, info)
}
sort.Slice(ret, func(i, j int) bool {
return strings.ToLower(ret[i].Title) < strings.ToLower(ret[j].Title)
})
if lastErr != nil {
log.Logf(0, "some stored crashes are inconsistent: %d skipped, last error %v", errCount, lastErr)
}
return ret, nil
}

Expand Down
Loading