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

[Bug]: controller-gen panic when using go 1.22 #507

Closed
1 task done
cyberchen98 opened this issue Jun 5, 2024 · 1 comment
Closed
1 task done

[Bug]: controller-gen panic when using go 1.22 #507

cyberchen98 opened this issue Jun 5, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@cyberchen98
Copy link
Contributor

cyberchen98 commented Jun 5, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

  • Version or commit-id (e.g. v0.1.0 or 8b23a93):
  • Hardware parameters:
  • OS type:
  • Others:

Actual Behavior

make helm-pkg
cd api && make manifests
/Users/wangchen/workspace/matrixorigin/matrixone-operator/api/bin/controller-gen crd:crdVersions=v1 rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=../deploy/crds output:webhook:artifacts:config=../deploy/webhook
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=0x105188d14]

goroutine 132 [running]:
go/types.(*Checker).handleBailout(0x14000653800, 0x14000a25d18)
        /usr/local/go/src/go/types/check.go:367 +0x9c
panic({0x105453a60?, 0x1059dbf30?})
        /usr/local/go/src/runtime/panic.go:770 +0x124
go/types.(*StdSizes).Sizeof(0x0, {0x10551cc70, 0x1059e4860})
        /usr/local/go/src/go/types/sizes.go:228 +0x314
......
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x0?)
        /Users/wangchen/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:262 +0x58
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 1
        /Users/wangchen/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:260 +0x230
make[1]: *** [manifests] Error 2
make: *** [manifests] Error 2

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

I have noticed that this is caused by a breaking change in go1.22 #61035 and the downstream application controller-gen has already fixed this issue. However, we are also using crd-ref-docs, which depends on a lower version of controller-gen, and it is uncertain whether they will immediately fix this problem. Before the go team completely resolves this issue, the most convenient solution may be downgrading to go1.21.

@cyberchen98 cyberchen98 added the kind/bug Something isn't working label Jun 5, 2024
@cyberchen98
Copy link
Contributor Author

fixed in #525

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant