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

runtime: fatal error: found bad pointer in Go heap on darwin-amd64-nocgo #62186

Closed
bcmills opened this issue Aug 21, 2023 · 3 comments
Closed
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Darwin

Comments

@bcmills
Copy link
Contributor

bcmills commented Aug 21, 2023

#!watchflakes
post <- goos == "darwin" && goarch == "amd64" && log ~ `fatal error: found bad pointer in Go heap`

Pulled out from #55167 (comment).

Note that the failure in that log is on release-branch.go1.20 (see also #59483).

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. compiler/runtime Issues related to the Go compiler and/or runtime. labels Aug 21, 2023
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "darwin" && goarch == "amd64" && log ~ `fatal error: found bad pointer in Go heap`
2023-07-24 17:08 darwin-amd64-12_0 tools@67ba5997 go@df0a1297 x/tools/go/packages.TestAll (log)
runtime: pointer 0xc01477ee10 to unused region of span span.base()=0xc01477e000 span.limit=0xc01477ffe0 span.state=1
runtime: found in object at *(0xc0394e8000+0x17d8)
object=0xc0394e8000 s.base()=0xc039408000 s.limit=0xc03a370000 s.spanclass=0 s.elemsize=16154624 s.state=mSpanInUse
 *(object+0) = 0x4
 *(object+8) = 0x1350008
 *(object+16) = 0x14d37c0
 *(object+24) = 0x1351c90
 *(object+32) = 0xc037d90e38
 *(object+40) = 0x5
 *(object+48) = 0x13500f8
...
fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)

runtime stack:
runtime.throw({0x12f6b3f?, 0x6?})
	/tmp/buildlet/go/src/runtime/panic.go:1077 +0x5c fp=0x700005b78d90 sp=0x700005b78d60 pc=0x10360dc
runtime.badPointer(0x5f407c8, 0x700005b78e10?, 0xc0394e8000, 0xc00791dfe0?)
	/tmp/buildlet/go/src/runtime/mbitmap.go:321 +0x165 fp=0x700005b78de8 sp=0x700005b78d90 pc=0x1013885
runtime.findObject(0xc02fca9280?, 0x10563de?, 0x106c4a0?)
	/tmp/buildlet/go/src/runtime/mbitmap.go:364 +0xa6 fp=0x700005b78e20 sp=0x700005b78de8 pc=0x1013a06
runtime.scanobject(0xc0394e8000, 0xc000030140)
...
	/tmp/buildlet/go/src/runtime/chan.go:442 +0x12 fp=0xc00010ac98 sp=0xc00010ac70 pc=0x1005f12
testing.(*T).Run(0xc00cc761a0, {0x12e60ab?, 0xc000171e20?}, 0xc00d581278)
	/tmp/buildlet/go/src/testing/testing.go:1649 +0x3c8 fp=0xc00010ad58 sp=0xc00010ac98 pc=0x10eec48
golang.org/x/tools/go/packages_test.testLoadDifferentPatterns(0xc00cc761a0, {0x1350d40, 0x150c880})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/overlay_test.go:997 +0x517 fp=0xc00010aed8 sp=0xc00010ad58 pc=0x1257a97
golang.org/x/tools/go/packages_test.testAllOrModulesParallel.func1(0xc00cc761a0, {0x1350d40, 0x150c880})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages_test.go:81 +0x138 fp=0xc00010af30 sp=0xc00010aed8 pc=0x1258f78
golang.org/x/tools/go/packages/packagestest.TestAll.func1(0xc00cc761a0)
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packagestest/export.go:162 +0x51 fp=0xc00010af70 sp=0xc00010af30 pc=0x1247c91
testing.tRunner(0xc00cc761a0, 0xc00e8fd5c0)
2023-08-16 19:26 darwin-amd64-nocgo tools@b225aa05 go@974a3c9a (log)

watchflakes

@mknyszek
Copy link
Contributor

Turns out this is already captured by #60449. I'm starting to think all of these corruption issues boil down to the same problem, and now we're building a class of failures. Closing this for now as a duplicate.

@mknyszek mknyszek closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2023
@gopherbot gopherbot reopened this Oct 25, 2023
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "darwin" && goarch == "amd64" && log ~ `fatal error: found bad pointer in Go heap`
2023-10-25 20:47 darwin-amd64-12_0 tools@672de526 go@d4863909 x/tools/go/packages.TestAll (log)
runtime: pointer 0xc00c2ddf80 to unused region of span span.base()=0xc00c2dc000 span.limit=0xc00c2de000 span.state=1
runtime: found in object at *(0xc00565a000+0x7e78)
object=0xc00565a000 s.base()=0xc0055fa000 s.limit=0xc005669f90 s.spanclass=0 s.elemsize=458752 s.state=mSpanInUse
 *(object+0) = 0x0
 *(object+8) = 0x0
 *(object+16) = 0x0
 *(object+24) = 0x0
 *(object+32) = 0x0
 *(object+40) = 0x0
 *(object+48) = 0x0
...
fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)

runtime stack:
runtime.throw({0x12e70e5?, 0x6?})
	/tmp/buildlet/go/src/runtime/panic.go:1047 +0x5d fp=0x7000039c3d90 sp=0x7000039c3d60 pc=0x103517d
runtime.badPointer(0xac04af8, 0x7000039c3e08?, 0xc00565a000, 0x7000039c3e98?)
	/tmp/buildlet/go/src/runtime/mbitmap.go:314 +0x150 fp=0x7000039c3de0 sp=0x7000039c3d90 pc=0x1013f50
runtime.findObject(0xc00bb179a0?, 0xc029e94000?, 0x0?)
	/tmp/buildlet/go/src/runtime/mbitmap.go:357 +0xa6 fp=0x7000039c3e18 sp=0x7000039c3de0 pc=0x10140e6
runtime.scanobject(0xc000030138?, 0xc000030138)
...
	/tmp/buildlet/go/src/runtime/chan.go:442 +0x18 fp=0xc00ac2ac98 sp=0xc00ac2ac70 pc=0x1005ff8
testing.(*T).Run(0xc016e0e680, {0x12d5ea0?, 0xc000287e20?}, 0xc01b3c4090)
	/tmp/buildlet/go/src/testing/testing.go:1630 +0x405 fp=0xc00ac2ad58 sp=0xc00ac2ac98 pc=0x10ee6e5
golang.org/x/tools/go/packages_test.testLoadDifferentPatterns(0xc016e0e680, {0x13387f8, 0x14e2568})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/overlay_test.go:996 +0x529 fp=0xc00ac2aed8 sp=0xc00ac2ad58 pc=0x124c3a9
golang.org/x/tools/go/packages_test.testAllOrModulesParallel.func1(0xc016e0e680, {0x13387f8, 0x14e2568})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages_test.go:80 +0x138 fp=0xc00ac2af30 sp=0xc00ac2aed8 pc=0x124d8b8
golang.org/x/tools/go/packages/packagestest.TestAll.func1(0xc016e0e680)
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packagestest/export.go:161 +0x57 fp=0xc00ac2af70 sp=0xc00ac2af30 pc=0x123be97
testing.tRunner(0xc016e0e680, 0xc015703080)

watchflakes

@mknyszek mknyszek closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2023
@mknyszek mknyszek removed this from Test Flakes Nov 1, 2023
@golang golang locked and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Darwin
Projects
None yet
Development

No branches or pull requests

3 participants