pulp / pulp/pulp-operator

panic: runtime error: invalid memory address or nil pointer dereference on "make deploy"

Open
#1,440 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue Triage-Needed
Dominant language
Go
Stars
88
Forks
66
Avg merge
53m
Merged PRs (30d)
1

Description

Version
pulp-operator-1.0.0-beta.4

Describe the bug
make deploy fails with the following error while attempting to build on macOS 15.4 using go 1.24.2. Also fails on Go 1.23.8

test -s /Users/XXXXXXXXX/projects/deployments/pulp/pulp-operator-1.0.0-beta.4/bin/controller-gen || GOBIN=/Users/XXXXXXXXX/projects/deployments/pulp/pulp-operator-1.0.0-beta.4/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2
/Users/XXXXXXXXX/projects/deployments/pulp/pulp-operator-1.0.0-beta.4/bin/controller-gen rbac:roleName=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=0x2 addr=0x0 pc=0x104f70394]

goroutine 211 [running]:
go/types.(*Checker).handleBailout(0x14001b063c0, 0x14002b1bd58)
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/check.go:434 +0x98
panic({0x105282920?, 0x10589d480?})
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/runtime/panic.go:792 +0x124
go/types.(*StdSizes).Sizeof(0x0, {0x105367440, 0x1058a6400})
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/sizes.go:229 +0x314
go/types.(*Config).sizeof(...)
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/sizes.go:334
go/types.representableConst.func1(...)
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/const.go:77
go/types.representableConst({0x10536dca8, 0x1051dd240}, 0x14001b063c0, 0x1058a6400, 0x14002b1b588)
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/const.go:93 +0x18c
go/types.(*Checker).representation(0x14001b063c0, 0x14002b42100, 0x1058a6400)
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/const.go:257 +0x60
go/types.(*Checker).implicitTypeAndValue(0x14001b063c0, 0x14002b42100, {0x105367468, 0x14002b36070})
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/expr.go:374 +0x724
go/types.(*Checker).assignment(0x14001b063c0, 0x14002b42100, {0x105367468, 0x14002b36070}, {0x1050c262b, 0x14})
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/assignments.go:70 +0x3a8
go/types.(*Checker).initConst(0x14001b063c0, 0x140025d6c00, 0x14002b42100)
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/assignments.go:144 +0x1f4
go/types.(*Checker).constDecl(0x14001b063c0, 0x140025d6c00, {0x10536a7f8, 0x14001d6e160}, {0x10536a7f8, 0x14001d6e180}, 0x0)
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/decl.go:475 +0x234
go/types.(*Checker).objDecl(0x14001b063c0, {0x1053736e0, 0x140025d6c00}, 0x0)
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/decl.go:184 +0x7d4
go/types.(*Checker).packageObjects(0x14001b063c0)
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/resolver.go:690 +0x404
go/types.(*Checker).checkFiles(0x14001b063c0, {0x14002049200?, 0x10?, 0x1052b4c20?})
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/check.go:489 +0x2b0
go/types.(*Checker).Files(0x14000385880?, {0x14002049200?, 0x140025d6420?, 0x5?})
	/opt/homebrew/Cellar/go/1.24.2/libexec/src/go/types/check.go:452 +0x80
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0x140003708d0, 0x1400038ca40)
	/Users/XXXXXXXXX/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:286 +0x2d4
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0x1400038ca40)
	/Users/XXXXXXXXX/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:99 +0x44
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0x140004f70b0, 0x1400038ca40)
	/Users/XXXXXXXXX/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:268 +0x2fc
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x4b?)
	/Users/XXXXXXXXX/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:262 +0x54
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 131
	/Users/XXXXXXXXX/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:260 +0x228
make: *** [manifests] Error 2

To Reproduce
Steps to reproduce the behavior:

  1. Download release tarball for pulp-operator-1.0.0-beta.4
  2. Unzip
  3. run make deploy

Expected behavior
Expected behaviour is that the build completes and is deployed to the k8s cluster.

Additional context
This error doesn't occur on any of the pre-1.0.0-* builds. Release 0.14.1 works and deploys successfully to a local k8s cluster.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing make deploy from the pulp-operator-1.0.0-beta.4 release tarball and inspect the controller-gen v0.9.2 command that generates config/crd/bases. Compare the behavior with the pre-1.0.0 builds and 0.14.1, focusing on the go/types panic shown in controller-tools/pkg/loader/loader.go. Done means the manifests build completes and deployment proceeds on the reported Go and macOS versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.