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

Crash with gotip and latest tagged version (but not master) #851

Closed
justinsb opened this issue Oct 25, 2023 · 6 comments
Closed

Crash with gotip and latest tagged version (but not master) #851

justinsb opened this issue Oct 25, 2023 · 6 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@justinsb
Copy link
Contributor

The latest tagged version is v0.13.0, which includes golang.org/x/tools@ v0.12.0. Versions of golang.org/x/tools before v0.13.0 panic on the development go version (e.g. gotip) when generating CRDs.

master has golang.org/x/tools v0.14.0, which does not panic.

Can we please tag a new version which includes golang.org/x/tools v0.14.0 (technically v0.13.0 would avoid the panic also). I'm happy to do that / propose a PR as desired.

To reproduce:

After installing gotip (go install golang.org/dl/gotip@latest; gotip download)

git co v0.13.0
go test -test.count=1 ./pkg/crd # Passes with go 1.21.3
gotip test -test.count=1 ./pkg/crd # Panics

The panic looks like this (though it is fixed, so I assume known):

Running Suite: CRD Generation Suite
===================================
Random Seed: 1698232074
Will run 32 of 32 specs

••••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=0x9fa14f]

goroutine 149 [running]:
go/types.(*Checker).handleBailout(0xc0007f4960, 0xc000765d08)
        /home/justinsb/sdk/gotip/src/go/types/check.go:332 +0x88
panic({0xbfd460?, 0x138f180?})
        /home/justinsb/sdk/gotip/src/runtime/panic.go:763 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xe01d38, 0x13992e0})
        /home/justinsb/sdk/gotip/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
        /home/justinsb/sdk/gotip/src/go/types/sizes.go:333
go/types.representableConst.func1({0xe01d38?, 0x13992e0?})
        /home/justinsb/sdk/gotip/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xe08290, 0x12e0888}, 0xc0007f4960, 0x13992e0, 0xc000765480)
        /home/justinsb/sdk/gotip/src/go/types/const.go:92 +0x192
go/types.(*Checker).representation(0xc0007f4960, 0xc000d789c0, 0x13992e0)
        /home/justinsb/sdk/gotip/src/go/types/const.go:256 +0x65
go/types.(*Checker).implicitTypeAndValue(0xc0007f4960, 0xc000d789c0, {0xe01d60, 0xc0003ac230})
        /home/justinsb/sdk/gotip/src/go/types/expr.go:375 +0x30d
go/types.(*Checker).assignment(0xc0007f4960, 0xc000d789c0, {0xe01d60, 0xc0003ac230}, {0xcd68ff, 0x14})
        /home/justinsb/sdk/gotip/src/go/types/assignments.go:52 +0x417
go/types.(*Checker).initConst(0xc0007f4960, 0xc000699080, 0xc000d789c0)
        /home/justinsb/sdk/gotip/src/go/types/assignments.go:126 +0x329
go/types.(*Checker).constDecl(0xc0007f4960, 0xc000699080, {0xe04ed0, 0xc0006e1240}, {0xe06070, 0xc0006aade0}, 0x0)
        /home/justinsb/sdk/gotip/src/go/types/decl.go:482 +0x353
go/types.(*Checker).objDecl(0xc0007f4960, {0xe0d698, 0xc000699080}, 0x0)
        /home/justinsb/sdk/gotip/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc0007f4960)
        /home/justinsb/sdk/gotip/src/go/types/resolver.go:687 +0x454
go/types.(*Checker).checkFiles(0xc0007f4960, {0xc000682000?, 0x1, 0x1})
        /home/justinsb/sdk/gotip/src/go/types/check.go:380 +0x225
go/types.(*Checker).Files(...)
        /home/justinsb/sdk/gotip/src/go/types/check.go:337
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000206720, 0xc00021bd80)
        /home/justinsb/k8s/src/sigs.k8s.io/controller-tools/pkg/loader/loader.go:286 +0x49e
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc00021bd80)
        /home/justinsb/k8s/src/sigs.k8s.io/controller-tools/pkg/loader/loader.go:99 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc000630570, 0xc00021bd80)
        /home/justinsb/k8s/src/sigs.k8s.io/controller-tools/pkg/loader/refs.go:268 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x0?)
        /home/justinsb/k8s/src/sigs.k8s.io/controller-tools/pkg/loader/refs.go:262 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 104
        /home/justinsb/k8s/src/sigs.k8s.io/controller-tools/pkg/loader/refs.go:260 +0x1c5
FAIL    sigs.k8s.io/controller-tools/pkg/crd    0.309s
FAIL

@sbueringer
Copy link
Member

sbueringer commented Oct 25, 2023

In general sounds fine.

@alvaroaleman @vincepri Any opinions if we should create a release-0.13 release branch and bump the dependency on the release branch or think about a 0.14 release?

(bumping a patch version of a dependency seems okay for a controller-tools patch version (?))

@alvaroaleman
Copy link
Member

@justinsb is there anything that would keep you from using latest c-t? If the answer is no, I'd tend to do a 0.14 release

@vincepri
Copy link
Member

bumping the dep sgtm

nan-yu added a commit to nan-yu/kpt-config-sync that referenced this issue Nov 7, 2023
The lastest version (v0.13.0) of controller-gen crashes when generating
CRDs: kubernetes-sigs/controller-tools#851.
A newer version hasn't been released yet.

Before the new version is available, we use the HEAD on the master
branch as a temporary workaround.
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 31, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 1, 2024
@joelanford
Copy link
Member

Looks like we eventually followed through with this and didn't close the issue. Closing now.

jobcespedes added a commit to krestomatio/lms-moodle-operator that referenced this issue Apr 18, 2024
jobcespedes added a commit to krestomatio/lms-moodle-operator that referenced this issue Apr 18, 2024
jobcespedes added a commit to krestomatio/lms-moodle-operator that referenced this issue Apr 18, 2024
jobcespedes added a commit to krestomatio/container_builder that referenced this issue Apr 18, 2024
jobcespedes added a commit to krestomatio/lms-moodle-operator that referenced this issue Apr 18, 2024
jobcespedes added a commit to krestomatio/lms-moodle-operator that referenced this issue Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

7 participants