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

make manifests generate fails with panic: runtime error: invalid memory address or nil pointer dereference #184

Open
midnightercz opened this issue Nov 12, 2024 · 0 comments

Comments

@midnightercz
Copy link

midnightercz commented Nov 12, 2024

[main][~/github/konflux-ci/internal-services]$ make manifests generate
 mkdir -p /home/jluza/github/konflux-ci/internal-services/bin
 test -s /home/jluza/github/konflux-ci/internal-services/bin/controller-gen || GOBIN=/home/jluza/github/konflux-ci/internal-services/bin go install sigs.k8s.io/controller-tools/cmd/[email protected]
go: downloading sigs.k8s.io/controller-tools v0.10.0
go: downloading github.com/spf13/cobra v1.4.0
go: downloading k8s.io/apiextensions-apiserver v0.25.0
go: downloading k8s.io/apimachinery v0.25.0
go: downloading k8s.io/api v0.25.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading sigs.k8s.io/yaml v1.3.0                                                                                                                                                                                                       go: downloading github.com/gobuffalo/flect v0.2.5 
go: downloading golang.org/x/tools v0.1.12
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/fatih/color v1.12.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/google/gofuzz v1.1.0
go: downloading sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2
go: downloading k8s.io/klog/v2 v2.70.1
go: downloading sigs.k8s.io/structured-merge-diff/v4 v4.2.3
go: downloading gopkg.in/inf.v0 v0.9.1
go: downloading golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
go: downloading golang.org/x/net v0.0.0-20220722155237-a158d28d115b
go: downloading golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
go: downloading github.com/go-logr/logr v1.2.3                                                                                                                                                                                                go: downloading github.com/json-iterator/go v1.1.12
go: downloading github.com/modern-go/reflect2 v1.0.2
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading golang.org/x/text v0.3.7
/home/jluza/github/konflux-ci/internal-services/bin/controller-gen rbac:roleName=internal-services-manager-role crd 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=0xa04b0f] 
                                                                                                                                                                                                                                              goroutine 209 [running]:                                                                                                                           
go/types.(*Checker).handleBailout(0xc001b93000, 0xc000bdfd40)                                                                                                             /usr/lib/golang/src/go/types/check.go:367 +0x88                     
panic({0xbbb9c0?, 0x129bce0?})                                                                                                                                                                                                                        /usr/lib/golang/src/runtime/panic.go:770 +0x132                                                                                                                                                                                       
go/types.(*StdSizes).Sizeof(0x0, {0xdb0d58, 0x12a4440})                                                                                                                                                                                               
/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({0xdb0d58?, 0x12a4440?})                                                                                                                                                                                            
/usr/lib/golang/src/go/types/const.go:76 +0x9e                                                                                                                                                                                        
go/types.representableConst({0xdb6ff8, 0x12705a8}, 0xc001b93000, 0x12a4440, 0xc000bdf4b0)                                                                                                                                                             
/usr/lib/golang/src/go/types/const.go:92 +0x192                                                                                                                                                                                       
go/types.(*Checker).representation(0xc001b93000, 0xc001cc4d80, 0x12a4440)                                                                                                                                                                             
/usr/lib/golang/src/go/types/const.go:256 +0x65                                                                                                                                                                                       
go/types.(*Checker).implicitTypeAndValue(0xc001b93000, 0xc001cc4d80, {0xdb0d80, 0xc0000f44d0})                                                                                                                                                        
/usr/lib/golang/src/go/types/expr.go:375 +0x2d7                                                                                                                                                                                       
go/types.(*Checker).assignment(0xc001b93000, 0xc001cc4d80, {0xdb0d80, 0xc0000f44d0}, {0xc88479, 0x14})                                                                                                                                                
/usr/lib/golang/src/go/types/assignments.go:52 +0x2e5                                                                                                                                                                                 go/types.(*Checker).initConst(0xc001b93000, 0xc001c853e0, 0xc001cc4d80)                                                                                                                                                                               /usr/lib/golang/src/go/types/assignments.go:126 +0x2c5                                                                                                                                                                                go/types.(*Checker).constDecl(0xc001b93000, 0xc001c853e0, {0xdb3928, 0xc000f092e0}, {0xdb4e28, 0xc00131d3e0}, 0x0) 
/usr/lib/golang/src/go/types/decl.go:490 +0x311                                                                                                                                                                                      
go/types.(*Checker).objDecl(0xc001b93000, {0xdbc7e0, 0xc001c853e0}, 0x0)                                                                                                                                                                             
/usr/lib/golang/src/go/types/decl.go:191 +0xa49                                                                                                                                                                                      
go/types.(*Checker).packageObjects(0xc001b93000)                                                                                                                                                                                                     
/usr/lib/golang/src/go/types/resolver.go:693 +0x4dd                                                                                                                                                                                  
go/types.(*Checker).checkFiles(0xc001b93000, {0xc00088cba8, 0x1, 0x1})                                                                                                                                                                               
/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(0xc0003770b0, 0xc000b0c600)                                                                                                                                                              
/home/jluza/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:286 +0x36a                                                                                                                                          
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc000b0c600)                                                                                                                                                                       
/home/jluza/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:99 +0x39                                                                                                                                            
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc000770d80, 0xc000b0c600)                                                                                                                                                             
/home/jluza/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:268 +0x2b7                                                                                                                                            
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x309c?)                                                                                                                                                                          
/home/jluza/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:262 +0x53                                                                                                                                             
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 246                                                                                                                                                             
/home/jluza/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:260 +0x1c5                                                                                                                                            
make: *** [Makefile:96: manifests] Error 2

I'm running command on

Linux fedora 6.10.7-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 30 00:08:59 UTC 2024 x86_64 GNU/Linux
go version go1.22.7 linux/amd64
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

1 participant