aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-03-07 16:05:31 +0100
committerAleksandr Nogikh <nogikh@google.com>2025-03-08 21:58:12 +0000
commit163f510d99dcf7239e56cef53bbca39db1f2fd9b (patch)
tree8f246758557af38063013bebd4440ba46e2efe6e /dashboard/app
parent7e3bd60dd6c8f783f5a418c64aa75f6818236dc4 (diff)
dashboard: include revoked reproducers in reports
Context: #5829. Let's not pretend that the revoked reproducer never existed and still report it. It will avoid unexpected side-effects for the higher-level logic. There may be better ways to resolve the bug, but let's first just get it fixed to prevent syzbot from spamming the mailing lists. Add a test to verify the new behavior.
Diffstat (limited to 'dashboard/app')
-rw-r--r--dashboard/app/reporting.go21
-rw-r--r--dashboard/app/reporting_test.go66
-rw-r--r--dashboard/app/templates/mail_bug.txt4
3 files changed, 78 insertions, 13 deletions
diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go
index 9601d2718..6171ad487 100644
--- a/dashboard/app/reporting.go
+++ b/dashboard/app/reporting.go
@@ -570,18 +570,17 @@ func crashBugReport(c context.Context, bug *Bug, crash *Crash, crashKey *db.Key,
Manager: crash.Manager,
Assets: assetList,
ReportElements: &dashapi.ReportElements{GuiltyFiles: crash.ReportElements.GuiltyFiles},
+ ReproIsRevoked: crash.ReproIsRevoked,
}
- if !crash.ReproIsRevoked {
- rep.ReproCLink = externalLink(c, textReproC, crash.ReproC)
- rep.ReproC, _, err = getText(c, textReproC, crash.ReproC)
- if err != nil {
- return nil, err
- }
- rep.ReproSyzLink = externalLink(c, textReproSyz, crash.ReproSyz)
- rep.ReproSyz, err = loadReproSyz(c, crash)
- if err != nil {
- return nil, err
- }
+ rep.ReproCLink = externalLink(c, textReproC, crash.ReproC)
+ rep.ReproC, _, err = getText(c, textReproC, crash.ReproC)
+ if err != nil {
+ return nil, err
+ }
+ rep.ReproSyzLink = externalLink(c, textReproSyz, crash.ReproSyz)
+ rep.ReproSyz, err = loadReproSyz(c, crash)
+ if err != nil {
+ return nil, err
}
if bugReporting.CC != "" {
rep.CC = append(rep.CC, strings.Split(bugReporting.CC, "|")...)
diff --git a/dashboard/app/reporting_test.go b/dashboard/app/reporting_test.go
index aeadf72f1..36ddcc4d1 100644
--- a/dashboard/app/reporting_test.go
+++ b/dashboard/app/reporting_test.go
@@ -1299,3 +1299,69 @@ func TestWaitForRepro(t *testing.T) {
client.ReportCrash(crash)
client.pollBug()
}
+
+// The test mimics the failure described in #5829.
+func TestReportRevokedBisectCrash(t *testing.T) {
+ c := NewCtx(t)
+ defer c.Close()
+
+ client := c.makeClient(clientPublic, keyPublic, true)
+ build := testBuild(1)
+ build.KernelRepo = "git://git.com/git.git"
+ client.UploadBuild(build)
+
+ const crashTitle = "WARNING: abcd"
+
+ crashRepro := testCrashWithRepro(build, 1)
+ crashRepro.Title = crashTitle
+ client.ReportCrash(crashRepro)
+
+ // Do a bisection.
+ pollResp := client.pollJobs(build.Manager)
+ c.expectNE(pollResp.ID, "")
+ c.expectEQ(pollResp.Type, dashapi.JobBisectCause)
+ done := &dashapi.JobDoneReq{
+ ID: pollResp.ID,
+ Build: *testBuild(2),
+ Log: []byte("bisect log"),
+ Commits: []dashapi.Commit{
+ {
+ Hash: "111111111111111111111111",
+ Title: "kernel: break build",
+ Author: "hacker@kernel.org",
+ Date: time.Date(2000, 2, 9, 4, 5, 6, 7, time.UTC),
+ },
+ },
+ }
+ client.expectOK(client.JobDone(done))
+ report := client.pollBug()
+
+ // Revoke the reproducer.
+ c.advanceTime(c.config().Obsoleting.ReproRetestStart + time.Hour)
+ resp := client.pollSpecificJobs(build.Manager, dashapi.ManagerJobs{
+ TestPatches: true,
+ })
+ c.expectEQ(resp.Type, dashapi.JobTestPatch)
+ client.expectOK(client.JobDone(&dashapi.JobDoneReq{
+ ID: resp.ID,
+ }))
+
+ // Move to the next reporting stage.
+ c.advanceTime(time.Hour)
+ client.updateBug(report.ID, dashapi.BugStatusUpstream, "")
+ report = client.pollBug()
+ client.expectNE(report.ReproCLink, "")
+ client.expectEQ(report.ReproIsRevoked, true)
+
+ // And now report a new reproducer.
+ c.advanceTime(time.Hour)
+ build2 := testBuild(1)
+ client.UploadBuild(build2)
+ crashRepro2 := testCrashWithRepro(build2, 2)
+ crashRepro2.Title = crashTitle
+ client.ReportCrash(crashRepro2)
+
+ // There should be no new report.
+ // We already reported that the bug has a reproducer.
+ client.pollBugs(0)
+}
diff --git a/dashboard/app/templates/mail_bug.txt b/dashboard/app/templates/mail_bug.txt
index addcfdc0f..42ef3c168 100644
--- a/dashboard/app/templates/mail_bug.txt
+++ b/dashboard/app/templates/mail_bug.txt
@@ -11,8 +11,8 @@ git tree: {{.KernelRepoAlias}}
{{end}}dashboard link: {{.Link}}
{{if .CompilerID}}compiler: {{.CompilerID}}
{{end}}{{if .UserSpaceArch}}userspace arch: {{.UserSpaceArch}}
-{{end}}{{if .ReproSyzLink}}syz repro: {{.ReproSyzLink}}
-{{end}}{{if .ReproCLink}}C reproducer: {{.ReproCLink}}
+{{end}}{{if .ReproSyzLink}}syz repro: {{if .ReproIsRevoked}}[OBSOLETE] {{end}}{{.ReproSyzLink}}
+{{end}}{{if .ReproCLink}}C reproducer: {{if .ReproIsRevoked}}[OBSOLETE] {{end}}{{.ReproCLink}}
{{end}}{{if and .Moderation .Maintainers}}CC: {{.Maintainers}}
{{end}}{{if and (not .NoRepro) (not .ReproCLink) (not .ReproSyzLink)}}
Unfortunately, I don't have any reproducer for this issue yet.