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

[Backport release-1.28] Bump Go to v1.22.5 #4824

Merged

Conversation

twz123
Copy link
Member

@twz123 twz123 commented Jul 31, 2024

@twz123 twz123 added chore backport/release-1.27 PR that needs to be backported/cherrypicked to release-1.27 branch labels Jul 31, 2024
@twz123 twz123 force-pushed the backport-4823-to-release-1.28 branch from fb2ad13 to 63bd34c Compare July 31, 2024 06:16
twz123 added 5 commits July 31, 2024 09:05
https://github.com/kubernetes-sigs/controller-tools/releases/tag/v0.14.0

This cherry-pick fixes a segfault in controller-gen when compiled with
Go 1.22:

  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=0xa0a8be]

  goroutine 161 [running]:
  go/types.(*Checker).handleBailout(0xc00035b200, 0xc000c8bd40)
          /usr/local/go/src/go/types/check.go:367 +0x88
  panic({0xbc39e0?, 0x12ab4e0?})
          /usr/local/go/src/runtime/panic.go:770 +0x132
  go/types.(*StdSizes).Sizeof(0x0, {0xdbec58, 0x12b3cc0})
          /usr/local/go/src/go/types/sizes.go:228 +0x31e
  go/types.(*Config).sizeof(...)
          /usr/local/go/src/go/types/sizes.go:333
  go/types.representableConst.func1({0xdbec58?, 0x12b3cc0?})
          /usr/local/go/src/go/types/const.go:76 +0x9e
  go/types.representableConst({0xdc4fb0, 0x127ec60}, 0xc00035b200, 0x12b3cc0, 0x0)
          /usr/local/go/src/go/types/const.go:92 +0x192
  go/types.(*Checker).arrayLength(0xc00035b200, {0xdc3258, 0xc0013007e0?})
          /usr/local/go/src/go/types/typexpr.go:510 +0x2d3
  go/types.(*Checker).typInternal(0xc00035b200, {0xdc1878, 0xc001302d50}, 0x0)
          /usr/local/go/src/go/types/typexpr.go:299 +0x49d
  go/types.(*Checker).definedType(0xc00035b200, {0xdc1878, 0xc001302d50}, 0xc000c8b328?)
          /usr/local/go/src/go/types/typexpr.go:180 +0x37
  go/types.(*Checker).varType(0xc00035b200, {0xdc1878, 0xc001302d50})
          /usr/local/go/src/go/types/typexpr.go:145 +0x25
  go/types.(*Checker).structType(0xc00035b200, 0xc000670630, 0xc000670630?)
          /usr/local/go/src/go/types/struct.go:113 +0x19f
  go/types.(*Checker).typInternal(0xc00035b200, {0xdc17e8, 0xc001304210}, 0xc000a546e0)
          /usr/local/go/src/go/types/typexpr.go:316 +0x1345
  go/types.(*Checker).definedType(0xc00035b200, {0xdc17e8, 0xc001304210}, 0xc8cf2e?)
          /usr/local/go/src/go/types/typexpr.go:180 +0x37
  go/types.(*Checker).typeDecl(0xc00035b200, 0xc000a546e0, 0xc000c7e800, 0x0)
          /usr/local/go/src/go/types/decl.go:615 +0x44d
  go/types.(*Checker).objDecl(0xc00035b200, {0xdca418, 0xc000a546e0}, 0x0)
          /usr/local/go/src/go/types/decl.go:197 +0xa7f
  go/types.(*Checker).packageObjects(0xc00035b200)
          /usr/local/go/src/go/types/resolver.go:681 +0x425
  go/types.(*Checker).checkFiles(0xc00035b200, {0xc00109db90, 0x3, 0x3})
          /usr/local/go/src/go/types/check.go:408 +0x1a5
  go/types.(*Checker).Files(...)
          /usr/local/go/src/go/types/check.go:372
  sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc0002873b0, 0xc000329aa0)
          /run/k0s-build/go/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:286 +0x36a
  sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc000329aa0)
          /run/k0s-build/go/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:99 +0x39
  sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc00056f320, 0xc000329aa0)
          /run/k0s-build/go/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:268 +0x2b7
  sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x54?)
          /run/k0s-build/go/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 129
          /run/k0s-build/go/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:260 +0x1c5

Signed-off-by: Tom Wieczorek <[email protected]>
(cherry picked from commit fb02476)
https://go.dev/doc/go1.22

Signed-off-by: Tom Wieczorek <[email protected]>
(cherry picked from commit 364e467)
(cherry picked from commit 095bb94)
@twz123 twz123 force-pushed the backport-4823-to-release-1.28 branch 2 times, most recently from 318fce5 to 1525b9f Compare July 31, 2024 08:04
@twz123 twz123 force-pushed the backport-4823-to-release-1.28 branch from 1525b9f to 5dab678 Compare July 31, 2024 08:27
twz123 added 3 commits July 31, 2024 15:10
Upstream no longer supports Alpine 3.18. Any further Go version bumps
will require a newer Alpine version.

See: 05a498b ("Update to Alpine 3.19.0")
Signed-off-by: Tom Wieczorek <[email protected]>
@twz123 twz123 force-pushed the backport-4823-to-release-1.28 branch from 5dab678 to 28b3910 Compare July 31, 2024 13:10
@twz123 twz123 marked this pull request as ready for review August 1, 2024 12:41
@twz123 twz123 requested a review from a team as a code owner August 1, 2024 12:41
@twz123 twz123 requested review from kke and makhov August 1, 2024 12:41
@twz123 twz123 enabled auto-merge August 1, 2024 12:41
@twz123 twz123 merged commit 36a9a6f into k0sproject:release-1.28 Aug 5, 2024
76 checks passed
@twz123 twz123 deleted the backport-4823-to-release-1.28 branch August 5, 2024 11:43
@k0s-bot
Copy link

k0s-bot commented Aug 5, 2024

Backport failed for release-1.27, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin release-1.27
git worktree add -d .worktree/backport-4824-to-release-1.27 origin/release-1.27
cd .worktree/backport-4824-to-release-1.27
git checkout -b backport-4824-to-release-1.27
ancref=$(git merge-base 286952feb390b3342a3aeb69af1bebc39f7100fd 28b3910da3fcfe1e484c786989cacc0f61414ab0)
git cherry-pick -x $ancref..28b3910da3fcfe1e484c786989cacc0f61414ab0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/release-1.27 PR that needs to be backported/cherrypicked to release-1.27 branch chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants