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

A panic during tests with Go 1.22 version #945

Closed
franpog859 opened this issue May 10, 2024 · 3 comments
Closed

A panic during tests with Go 1.22 version #945

franpog859 opened this issue May 10, 2024 · 3 comments

Comments

@franpog859
Copy link

I'm facing the same issue as described here. The workaround proposed is to revert to Go 1.21 version. I think it should work with the newest Go version too

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=0x9ed62f]
goroutine 87 [running]:
go/types.(*Checker).handleBailout(0xc000021000, 0xc00181dd40)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/check.go:367 +0x88
panic({0xb9a3a0?, 0x125fa90?})
	/opt/hostedtoolcache/go/1.22.3/x64/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xd850a8, 0x12682c0})
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/sizes.go:333
go/types.representableConst.func1({0xd850a8?, 0x12682c0?})
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xd8b500, 0x1[23](https://github.com/myproject/myrepo/actions/runs/9029812345/job/24813112345#step:7:24)4420}, 0xc000021000, 0x12682c0, 0x0)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/const.go:92 +0x192
go/types.(*Checker).arrayLength(0xc000021000, {0xd89760, 0xc00063b3a0?})
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/typexpr.go:510 +0x2d3
go/types.(*Checker).typInternal(0xc000021000, {0xd87e10, 0xc000709080}, 0x0)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/typexpr.go:299 +0x49d
go/types.(*Checker).definedType(0xc000021000, {0xd87e10, 0xc000709080}, 0xc00181d328?)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/typexpr.go:180 +0x37
go/types.(*Checker).varType(0xc000021000, {0xd87e10, 0xc000709080})
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/typexpr.go:145 +0x25
go/types.(*Checker).structType(0xc000021000, 0xc0007547b0, 0xc0007547b0?)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/struct.go:113 +0x19f
go/types.(*Checker).typInternal(0xc000021000, {0xd87d80, 0xc00070c558}, 0xc000752500)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/typexpr.go:316 +0x1345
go/types.(*Checker).definedType(0xc000021000, {0xd87d80, 0xc00070c558}, 0xc607af?)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/typexpr.go:180 +0x37
go/types.(*Checker).typeDecl(0xc000021000, 0xc000752500, 0xc00070aa40, 0x0)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/decl.go:615 +0x44d
go/types.(*Checker).objDecl(0xc000021000, {0xd90940, 0xc000752500}, 0x0)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/decl.go:197 +0xa7f
go/types.(*Checker).packageObjects(0xc000021000)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/resolver.go:681 +0x425
go/types.(*Checker).checkFiles(0xc000021000, {0xc001e23[24](https://github.com/myproject/myrepo/actions/runs/9029812345/job/24813112345#step:7:25)8, 0x3, 0x3})
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
	/opt/hostedtoolcache/go/1.22.3/x64/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc00023af30, 0xc001624360)
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:283 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc001624360)
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:96 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc001bfdc50, 0xc001624360)
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:263 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x49?)
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:[25](https://github.com/myproject/myrepo/actions/runs/9029812345/job/24813112345#step:7:26)7 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine [26](https://github.com/myproject/myrepo/actions/runs/9029812345/job/24813112345#step:7:27)
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:255 +0x1c5
make: *** [Makefile:52: generate] Error 2
@sbueringer
Copy link
Member

sbueringer commented May 10, 2024

controller-tools v0.6.1 is roughly 3 years old and v0.6 is not actively maintained anymore (we're now at v0.15)

@franpog859
Copy link
Author

All right :D I'm closing this issue as my new problems are more about non-existing commands or some breaking changes than this panic. Thanks

@tuminoid
Copy link

Btw, the same happens up to 0.12.1 with Go 1.22. Starting 0.13.0 it works ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants