We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
Running controller-gen via go generate with go1.22 causes the following panic:
go generate
panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa0774f] goroutine 99 [running]: go/types.(*Checker).handleBailout(0xc000bc9800, 0xc001b77d40) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/check.go:367 +0x88 panic({0xbc0300?, 0x12a8920?}) /opt/hostedtoolcache/go/1.22.2/x64/src/runtime/panic.go:770 +0x132 go/types.(*StdSizes).Sizeof(0x0, {0xdba0f8, 0x12b10c0}) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/sizes.go:228 +0x30f go/types.(*Config).sizeof(...) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/sizes.go:333 go/types.representableConst.func1({0xdba0f8?, 0x12b10c0?}) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/const.go:76 +0x9e go/types.representableConst({0xdc0410, 0x127d240}, 0xc000bc9800, 0x12b10c0, 0xc001b774b0) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/const.go:92 +0x192 go/types.(*Checker).representation(0xc000bc9800, 0xc001ea2ec0, 0x12b10c0) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/const.go:256 +0x65 go/types.(*Checker).implicitTypeAndValue(0xc000bc9800, 0xc001ea2ec0, {0xdba120, 0xc000292620}) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/expr.go:375 +0x2d7 go/types.(*Checker).assignment(0xc000bc9800, 0xc001ea2ec0, {0xdba120, 0xc000292620}, {0xc8cfca, 0x14}) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/assignments.go:52 +0x2e5 go/types.(*Checker).initConst(0xc000bc9800, 0xc001dccf60, 0xc001ea2ec0) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/assignments.go:126 +0x2c5 go/types.(*Checker).constDecl(0xc000bc9800, 0xc001dccf60, {0xdbcce0, 0xc0017a7180}, {0xdbcce0, 0xc0017a71a0}, 0x0) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/decl.go:490 +0x311 go/types.(*Checker).objDecl(0xc000bc9800, {0xdc5ba0, 0xc001dccf60}, 0x0) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/decl.go:191 +0xa49 go/types.(*Checker).packageObjects(0xc000bc9800) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/resolver.go:693 +0x4dd go/types.(*Checker).checkFiles(0xc000bc9800, {0xc001794210, 0x5, 0x5}) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/check.go:408 +0x1a5 go/types.(*Checker).Files(...) /opt/hostedtoolcache/go/1.22.2/x64/src/go/types/check.go:372 sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc0002b7410, 0xc0004076a0) /home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.12.0/pkg/loader/loader.go:286 +0x36a sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc0004076a0) /home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.12.0/pkg/loader/loader.go:99 +0x39 sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc000a7ca50, 0xc0004076a0) /home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.12.0/pkg/loader/refs.go:268 +0x2b7 sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x50?) /home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.12.0/pkg/loader/refs.go:262 +0x53 created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine [38](https://github.com/rancher/rancher/actions/runs/9085696649/job/24969627838?pr=45326#step:7:39) /home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.12.0/pkg/loader/refs.go:260 +0x1c5 Generated files have either been changed manually or were not updated.
There is an upstream issue that can be found in the controller-gen repo: kubernetes-sigs/controller-tools#880
To Reproduce
Result
controller-gen panics
Expected Result
controller-gen completes successfully
controller-gen
Screenshots
Additional context
Github action job with error can be found here: https://github.com/rancher/rancher/actions/runs/9085696649/job/24969627838?pr=45326#step:7:38
I have tested updating it to v0.14.0 and was able to confirm it completed as expected: https://github.com/rancher/rancher/actions/runs/9099611990/job/25012556952?pr=45326#step:7:38
The text was updated successfully, but these errors were encountered:
jakefhyde
No branches or pull requests
Describe the bug
Running controller-gen via
go generate
with go1.22 causes the following panic:There is an upstream issue that can be found in the controller-gen repo: kubernetes-sigs/controller-tools#880
To Reproduce
go generate
Result
controller-gen panics
Expected Result
controller-gen
completes successfullyScreenshots
Additional context
Github action job with error can be found here: https://github.com/rancher/rancher/actions/runs/9085696649/job/24969627838?pr=45326#step:7:38
I have tested updating it to v0.14.0 and was able to confirm it completed as expected: https://github.com/rancher/rancher/actions/runs/9099611990/job/25012556952?pr=45326#step:7:38
The text was updated successfully, but these errors were encountered: