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

x/build/maintner/maintnerd/maintapi: nil pointer dereference panic during GoFindTryWork #49286

Closed
dmitshur opened this issue Nov 2, 2021 · 4 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Nov 2, 2021

maintnerd appears to be in a crash-loop due to:

2021/11/02 13:59:51 gerrit code.googlesource.com/gocloud: ran git ls-remote in 1.617s
2021/11/02 13:59:51 gerrit go.googlesource.com/playground: ran git ls-remote in 2.802s
2021/11/02 13:59:51 gerrit go.googlesource.com/go: ran git fetch origin in 8.233s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xa02274]

goroutine 1595 [running]:
golang.org/x/build/maintner.(*GerritProject).CL(...)
	/go/src/golang.org/x/build/maintner/gerrit.go:218
golang.org/x/build/maintner/maintnerd/maintapi.goFindTryWork({0xc94018, 0xc01fa804e0}, 0x0, 0xc0003a2360)
	/go/src/golang.org/x/build/maintner/maintnerd/maintapi/api.go:325 +0x374
golang.org/x/build/maintner/maintnerd/maintapi.apiService.GoFindTryWork({0xafa960}, {0xc94050, 0xc0188bfe90}, 0x10f8e08)
	/go/src/golang.org/x/build/maintner/maintnerd/maintapi/api.go:287 +0x2b7
golang.org/x/build/maintner/maintnerd/apipb._MaintnerService_GoFindTryWork_Handler({0xb5d9c0, 0xc0003a2360}, {0xc94050, 0xc0188bfe90}, 0xc000228690, 0x0)
	/go/src/golang.org/x/build/maintner/maintnerd/apipb/api.pb.go:820 +0x170
@dmitshur dmitshur added Builders x/build issues (builders, bots, dashboards) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Soon This needs to be done soon. (regressions, serious bugs, outages) labels Nov 2, 2021
@dmitshur dmitshur self-assigned this Nov 2, 2021
@bcmills
Copy link
Contributor

bcmills commented Nov 2, 2021

Looks like the missing nil-check is here:
https://github.com/golang/build/blob/fd71dbe823f0b189f48e47111c2c2d425eb81f7b/maintner/maintnerd/maintapi/api.go#L325

Maybe a CL against a repo that maintner hasn't yet been updated to index?

@dmitshur
Copy link
Contributor Author

dmitshur commented Nov 2, 2021

This might be related to a new repository in the process of being added, and maintapi not having good support for the edge case where that repo starts to have CLs before x/build/repos is updated.

Sent CL 360734 for now.

Edit: It is indeed related to the recently added repo (rather than something else):

2021/11/02 14:35:08 nil Gerrit project "vuln"

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Nov 2, 2021
@gopherbot gopherbot added this to the Unreleased milestone Nov 2, 2021
@gopherbot
Copy link

Change https://golang.org/cl/360734 mentions this issue: maintner/maintnerd/maintapi: handle non-existing Gerrit project gracefully

@dmitshur
Copy link
Contributor Author

dmitshur commented Nov 2, 2021

This is mitigated so removing Soon label.

@dmitshur dmitshur removed the Soon This needs to be done soon. (regressions, serious bugs, outages) label Nov 2, 2021
@dmitshur dmitshur changed the title x/build/maintner: nil pointer dereference panic during GoFindTryWork x/build/maintner/maintnerd/maintapi: nil pointer dereference panic during GoFindTryWork Nov 2, 2021
@dmitshur dmitshur added this to Done in Go Release Team Nov 2, 2021
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
Archived in project
Development

No branches or pull requests

3 participants