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

syz-manager: still ignore log parse problems #5064

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion pkg/repro/repro.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ func Run(crashLog []byte, cfg *mgrconfig.Config, features flatrpc.Feature, repor
return ctx.run()
}

var ErrEmptyCrashLog = errors.New("no programs")

func prepareCtx(crashLog []byte, cfg *mgrconfig.Config, features flatrpc.Feature, reporter *report.Reporter,
exec execInterface) (*reproContext, error) {
entries := cfg.Target.ParseLog(crashLog)
if len(entries) == 0 {
return nil, fmt.Errorf("crash log (%d bytes) does not contain any programs", len(crashLog))
return nil, fmt.Errorf("log (%d bytes) parse failed: %w", len(crashLog), ErrEmptyCrashLog)
}
crashStart := len(crashLog)
crashTitle, crashType := "", crash.UnknownType
Expand Down
7 changes: 5 additions & 2 deletions syz-manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,11 @@ func reportReproError(err error) {
default:
}

switch err {
case repro.ErrNoVMs:
if errors.Is(err, repro.ErrEmptyCrashLog) {
// The kernel could have crashed before we executed any programs.
log.Logf(0, "repro failed: %v", err)
return
} else if errors.Is(err, repro.ErrNoVMs) {
// This error is to be expected if we're shutting down.
if shutdown {
return
Expand Down
Loading