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

Panics inside golang:1.22-bookworm #40

Closed
slobodyanyuk opened this issue Apr 5, 2024 · 0 comments · Fixed by #41
Closed

Panics inside golang:1.22-bookworm #40

slobodyanyuk opened this issue Apr 5, 2024 · 0 comments · Fixed by #41

Comments

@slobodyanyuk
Copy link

Started to panic inside golang:1.22-bookworm docker image.

uname -a
Linux 3de55cc04cca 6.6.16-linuxkit #1 SMP Fri Feb 16 11:54:02 UTC 2024 x86_64 GNU/Linux

Trace:

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

goroutine 14 [running]:
go/types.(*Checker).handleBailout(0xc000450600, 0xc00029dc68)
	/usr/local/go/src/go/types/check.go:367 +0x88
panic({0x64cc00?, 0x83a320?})
	/usr/local/go/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0x6e4a88, 0x83d480})
	/usr/local/go/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
	/usr/local/go/src/go/types/sizes.go:333
go/types.representableConst.func1({0x6e4a88?, 0x83d480?})
	/usr/local/go/src/go/types/const.go:76 +0x9e
go/types.representableConst({0x6e6240, 0x832e00}, 0xc000450600, 0x83d480, 0x0)
	/usr/local/go/src/go/types/const.go:92 +0x192
go/types.(*Checker).arrayLength(0xc000450600, {0x6e5b90, 0xc0004821c0?})
	/usr/local/go/src/go/types/typexpr.go:510 +0x2d3
go/types.(*Checker).typInternal(0xc000450600, {0x6e5ce0, 0xc00008e060}, 0x0)
	/usr/local/go/src/go/types/typexpr.go:299 +0x49d
go/types.(*Checker).definedType(0xc000450600, {0x6e5ce0, 0xc00008e060}, 0xc000305250?)
	/usr/local/go/src/go/types/typexpr.go:180 +0x37
go/types.(*Checker).varType(0xc000450600, {0x6e5ce0, 0xc00008e060})
	/usr/local/go/src/go/types/typexpr.go:145 +0x25
go/types.(*Checker).structType(0xc000450600, 0xc000595710, 0xc000595710?)
	/usr/local/go/src/go/types/struct.go:113 +0x19f
go/types.(*Checker).typInternal(0xc000450600, {0x6e5d10, 0xc0001a0318}, 0xc00026f400)
	/usr/local/go/src/go/types/typexpr.go:316 +0x1345
go/types.(*Checker).definedType(0xc000450600, {0x6e5d10, 0xc0001a0318}, 0x10?)
	/usr/local/go/src/go/types/typexpr.go:180 +0x37
go/types.(*Checker).typeDecl(0xc000450600, 0xc00026f400, 0xc0000a6040, 0x0)
	/usr/local/go/src/go/types/decl.go:615 +0x44d
go/types.(*Checker).objDecl(0xc000450600, {0x6e8338, 0xc00026f400}, 0x0)
	/usr/local/go/src/go/types/decl.go:197 +0xa7f
go/types.(*Checker).packageObjects(0xc000450600)
	/usr/local/go/src/go/types/resolver.go:681 +0x425
go/types.(*Checker).checkFiles(0xc000450600, {0xc000194000, 0x1, 0x1})
	/usr/local/go/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
	/usr/local/go/src/go/types/check.go:372
golang.org/x/tools/go/packages.(*loader).loadPackage(0xc000160000, 0xc0000f2200)
	/go/cache/mod/golang.org/x/[email protected]/go/packages/packages.go:838 +0x6fe
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
	/go/cache/mod/golang.org/x/[email protected]/go/packages/packages.go:685 +0x1a9
sync.(*Once).doSlow(0x0?, 0x0?)
	/usr/local/go/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
	/usr/local/go/src/sync/once.go:65
golang.org/x/tools/go/packages.(*loader).loadRecursive(0x0?, 0x0?)
	/go/cache/mod/golang.org/x/[email protected]/go/packages/packages.go:673 +0x4a
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1(0x0?)
	/go/cache/mod/golang.org/x/[email protected]/go/packages/packages.go:680 +0x26
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1 in goroutine 93
	/go/cache/mod/golang.org/x/[email protected]/go/packages/packages.go:679 +0x94

Newly built deep-copy with updated modules works:

diff --git a/go.mod b/go.mod
index 7b031a3..bffdc8d 100644
--- a/go.mod
+++ b/go.mod
@@ -5,5 +5,6 @@ go 1.13
 require (
        github.com/google/go-cmp v0.5.5
        github.com/stretchr/testify v1.8.4
-       golang.org/x/tools v0.0.0-20200107050322-53017a39ae36
+       golang.org/x/mod v0.17.0 // indirect
+       golang.org/x/tools v0.19.0
 )

Could you please bump modules?

@urandom urandom linked a pull request May 3, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant