Skip to content

pkg/aflow: provide better kernel build errors#7007

Open
a-nogikh wants to merge 2 commits intogoogle:masterfrom
a-nogikh:features/aflow-build-error
Open

pkg/aflow: provide better kernel build errors#7007
a-nogikh wants to merge 2 commits intogoogle:masterfrom
a-nogikh:features/aflow-build-error

Conversation

@a-nogikh
Copy link
Copy Markdown
Collaborator

When reporting a kernel build error, also try to include the build error report. Otherwise it's hard to understand what happened, see e.g. https://syzkaller.appspot.com/ai_job?id=55a13c60-a5f5-4f2c-8ea9-d5e1b343572c

When reporting a kernel build error, also try to include the build error
report. Otherwise it's hard to understand what happened.
@a-nogikh a-nogikh requested a review from dvyukov March 26, 2026 13:14
@a-nogikh a-nogikh added the AI patching Feature requests and bugs related to AI-based kernel bug fix generation. label Mar 26, 2026
@dvyukov
Copy link
Copy Markdown
Collaborator

dvyukov commented Mar 26, 2026

Update #6896

if buildErr == err {
return aflow.FlowError(err)
}
return aflow.FlowError(fmt.Errorf("%w\n\nRoot cause:\n%w", err, buildErr))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this won't work. The problem is that we truncate errors, see #6896.
At the very least we should print buildErr first, and maybe take the last part of err.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the current err should actually be quite small, right?
It doesn't include the full output:

func (err *VerboseError) Error() string {
return err.Err.Error()
}

ExtractRootCause's output should also be reasonably small:

func (err *KernelError) Error() string {
return string(err.Report)
}

I think it should fit even without truncation.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may prepend the full output later b/c what you on the dashboard is not the short output, it's full output.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the context of #6896, we'd probably want to keep what we keep in Error reasonably short (= do not keep full logs there) for display in the trajectory table and separately store the full log separately (and make it available via some link).

@a-nogikh
Copy link
Copy Markdown
Collaborator Author

Just in case.
@pimyn-girgis are you currently not working on sth similar in parallel?

@pimyn-girgis
Copy link
Copy Markdown
Collaborator

@a-nogikh I started something but I paused it for something else. You can keep going with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI patching Feature requests and bugs related to AI-based kernel bug fix generation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants