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

SIGSEGV during operator deployment using controller-gen #335

Closed
anoopcs9 opened this issue Apr 17, 2024 · 3 comments · Fixed by #337
Closed

SIGSEGV during operator deployment using controller-gen #335

anoopcs9 opened this issue Apr 17, 2024 · 3 comments · Fixed by #337

Comments

@anoopcs9
Copy link
Collaborator

controller-gen not found in PATH, checking /root/samba-operator/.bin
go: downloading sigs.k8s.io/controller-tools v0.6.2
go: downloading k8s.io/apimachinery v0.21.3
go: downloading github.com/fatih/color v1.12.0
go: downloading k8s.io/api v0.21.3
go: downloading golang.org/x/tools v0.1.5
go: downloading github.com/gobuffalo/flect v0.2.3
go: downloading k8s.io/apiextensions-apiserver v0.21.3
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading golang.org/x/sys v0.0.0-20210510120138-977fb7262007
go: downloading k8s.io/utils v0.0.0-20201110183641-67b214c5f920
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading sigs.k8s.io/structured-merge-diff/v4 v4.1.2
go: downloading k8s.io/klog/v2 v2.8.0
go: downloading github.com/google/gofuzz v1.1.0
go: downloading github.com/google/go-cmp v0.5.6
go: downloading golang.org/x/net v0.0.0-20210428140749-89ef3d95e781
go: downloading github.com/json-iterator/go v1.1.11
go: downloading github.com/go-logr/logr v0.4.0
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading golang.org/x/text v0.3.6
go: downloading golang.org/x/mod v0.4.2
controller-gen installed in /root/samba-operator/.bin
/root/samba-operator/.bin/controller-gen "crd:trivialVersions=true,crdVersions=v1" rbac:roleName=manager-role webhook \
	paths="./..." output:crd:artifacts:config=config/crd/bases
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=0xa13ecf]

goroutine 156 [running]:
go/types.(*Checker).handleBailout(0xc00107a400, 0xc002487d40)
	/usr/lib/golang/src/go/types/check.go:367 +0x88
panic({0xbcc620?, 0x128b6d0?})
	/usr/lib/golang/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xdc3348, 0x1293fe0})
	/usr/lib/golang/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
	/usr/lib/golang/src/go/types/sizes.go:333
go/types.representableConst.func1({0xdc3348?, 0x1293fe0?})
	/usr/lib/golang/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xdc97a0, 0x12b5ce0}, 0xc00107a400, 0x1293fe0, 0xc0024874b0)
	/usr/lib/golang/src/go/types/const.go:92 +0x192
go/types.(*Checker).representation(0xc00107a400, 0xc00248ce80, 0x1293fe0)
	/usr/lib/golang/src/go/types/const.go:256 +0x65
go/types.(*Checker).implicitTypeAndValue(0xc00107a400, 0xc00248ce80, {0xdc3370, 0xc0001e6850})
	/usr/lib/golang/src/go/types/expr.go:375 +0x2d7
go/types.(*Checker).assignment(0xc00107a400, 0xc00248ce80, {0xdc3370, 0xc0001e6850}, {0xc9b87f, 0x14})
	/usr/lib/golang/src/go/types/assignments.go:52 +0x2e5
go/types.(*Checker).initConst(0xc00107a400, 0xc0023d6900, 0xc00248ce80)
	/usr/lib/golang/src/go/types/assignments.go:126 +0x2c5
go/types.(*Checker).constDecl(0xc00107a400, 0xc0023d6900, {0xdc5ff0, 0xc000874860}, {0xdc5ff0, 0xc000874c00}, 0x0)
	/usr/lib/golang/src/go/types/decl.go:490 +0x311
go/types.(*Checker).objDecl(0xc00107a400, {0xdcf4a0, 0xc0023d6900}, 0x0)
	/usr/lib/golang/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc00107a400)
	/usr/lib/golang/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc00107a400, {0xc002187710, 0x5, 0x5})
	/usr/lib/golang/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
	/usr/lib/golang/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc0002befc0, 0xc001bac240)
	/root/go/pkg/mod/sigs.k8s.io/controller-tools@v0.6.2/pkg/loader/loader.go:283 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc001bac240)
	/root/go/pkg/mod/sigs.k8s.io/controller-tools@v0.6.2/pkg/loader/loader.go:96 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc001425350, 0xc001bac240)
	/root/go/pkg/mod/sigs.k8s.io/controller-tools@v0.6.2/pkg/loader/refs.go:263 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x4b?)
	/root/go/pkg/mod/sigs.k8s.io/controller-tools@v0.6.2/pkg/loader/refs.go:257 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 117
	/root/go/pkg/mod/sigs.k8s.io/controller-tools@v0.6.2/pkg/loader/refs.go:255 +0x1c5
make: *** [Makefile:152: manifests] Error 2
@anoopcs9
Copy link
Collaborator Author

CentOS Stream 9 recently pushed golang v1.22 into its repositories which is problematic when used with controller-gen < v0.14.0 as noted in kubernetes-sigs/controller-tools#888 (comment).

@anoopcs9
Copy link
Collaborator Author

@phlogistonjohn

Is there anything which blocks an update to contorller-gen v0.14.0 or higher?

@phlogistonjohn
Copy link
Collaborator

Time and effort alone AFAIK.

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

Successfully merging a pull request may close this issue.

2 participants