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

cmd/compile: "internal compiler error: curfn mismatch" on darwin-amd64-race builder #43826

Closed
bcmills opened this issue Jan 21, 2021 · 6 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Darwin WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Jan 21, 2021

#!watchflakes
post <- log ~ `internal compiler error: curfn mismatch`

2021-01-18T17:21:53-5a8fbb0/darwin-amd64-race

See previously #37407, #37406, but note that those were believed to have been fixed by upgrading the builders.
(CC @randall77 @josharian @golang/release)

@bcmills bcmills added OS-Darwin NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 21, 2021
@bcmills bcmills added this to the Backlog milestone Jan 21, 2021
@mdempsky
Copy link
Member

That seems like memory corruption. Either runtime bugs or faulty memory or something. That sort of failure shouldn't be random.

Another failure on the same machine, which also looks like a pointer is nil when it shouldn't be: https://build.golang.org/log/9a0af1fedad51a17898be428620c03c863e258a0

And another similar failure on the non-race version of the machine (not sure if the same physical hardware or not): https://build.golang.org/log/5e5d23f0d609ad291d7be138ef1ff147a6c613b1

@mdempsky
Copy link
Member

mdempsky commented Jan 21, 2021

That last one definitely looks like some sort of memory corruption. The error message is:

vet: [...]/go/src/reflect/type.go:2611:57: tt.Elem().Field(0).hodsTypeOf undefined (type Value has no field or method hodsTypeOf)

but that corresponding line of source is:

                typ = (*structType)(unsafe.Pointer(tt.Elem().Field(0).UnsafeAddr()))

So the string that should be "UnsafeAddr" is actually "hodsTypeOf"? Notably, the same length, but wrong bytes. It looks like maybe the string data for "methods" and "TypeOf" are consecutive in memory, and the pointer for "UnsafeAddr" is off.

@bcmills
Copy link
Contributor Author

bcmills commented Jan 22, 2021

Agreed, it looks like memory corruption. My question is, is this memory corruption due to a hardware issue (e.g. overheading RAM), due to a kernel or platform bug, or due to a bug somewhere in the Go toolchain or runtime?

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Apr 6, 2023
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `internal compiler error: curfn mismatch`
2023-05-22 18:55 linux-ppc64le-power10osu vuln@4d485808 go@298fe517 runtime [build] (log)
/workdir/go/src/runtime/alg.go:45:5: internal compiler error: curfn mismatch: initMetrics.func9 != mapassign_faststr for ~R0

goroutine 1 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x6c
cmd/compile/internal/base.FatalfAt({0x2394a00?, 0xc0?}, {0x97b4ab, 0x1f}, {0xc001e43390, 0x3, 0x3})
	cmd/compile/internal/base/print.go:230 +0x250
cmd/compile/internal/base.Fatalf(...)
	cmd/compile/internal/base/print.go:199
cmd/compile/internal/escape.(*escape).newLoc(...)
...
cmd/compile/internal/ir.(*bottomUpVisitor).visit(0xc0017cfef0, 0xc001ca2b00)
	cmd/compile/internal/ir/scc.go:87 +0x214
cmd/compile/internal/ir.VisitFuncsBottomUp({0xc00568a000, 0xc49, 0x2?}, 0x99a040)
	cmd/compile/internal/ir/scc.go:60 +0x140
cmd/compile/internal/escape.Funcs(...)
	cmd/compile/internal/escape/escape.go:119
cmd/compile/internal/gc.Main(0x999ea8)
	cmd/compile/internal/gc/main.go:314 +0x136c
main.main()
	cmd/compile/main.go:57 +0x124
2023-05-22 18:55 linux-ppc64le-power10osu vuln@4d485808 go@298fe517 x/vuln/internal/vulncheck/internal/buildinfo.TestExtractPackagesAndSymbols (log)
--- FAIL: TestExtractPackagesAndSymbols (65.15s)
    --- FAIL: TestExtractPackagesAndSymbols/freebsd/arm (1.65s)
        buildtest.go:78: exit status 1

watchflakes

@gopherbot gopherbot reopened this May 24, 2023
@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `internal compiler error: curfn mismatch`
2023-05-31 15:03 linux-ppc64-sid-buildlet sys@b52f5441 go@07719453 runtime [build] (log)
/workdir/go/src/runtime/alg.go:45:5: internal compiler error: curfn mismatch: growWork_faststr != mallocinit for h

goroutine 1 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x6c
cmd/compile/internal/base.FatalfAt({0xc0?, 0x275e980?}, {0x97b3d6, 0x1f}, {0xc005f0f6d8, 0x3, 0x3})
	cmd/compile/internal/base/print.go:230 +0x270
cmd/compile/internal/base.Fatalf(...)
	cmd/compile/internal/base/print.go:199
cmd/compile/internal/escape.(*escape).newLoc(...)
	cmd/compile/internal/escape/graph.go:242
cmd/compile/internal/escape.(*batch).initFunc(0x1?, 0xc001a9dce0)
	cmd/compile/internal/escape/escape.go:187 +0x4dc
cmd/compile/internal/escape.Batch({0xc002296000, 0x1, 0xc001a9dce0?}, 0x0?)
	cmd/compile/internal/escape/escape.go:140 +0x108
cmd/compile/internal/ir.(*bottomUpVisitor).visit(0xc00210f920, 0xc001a9dce0)
	cmd/compile/internal/ir/scc.go:124 +0x358
cmd/compile/internal/ir.VisitFuncsBottomUp({0xc0057e6000, 0xd4f, 0x2?}, 0x999f68)
	cmd/compile/internal/ir/scc.go:60 +0x148
cmd/compile/internal/escape.Funcs(...)
	cmd/compile/internal/escape/escape.go:119
cmd/compile/internal/gc.Main(0x999df0)
	cmd/compile/internal/gc/main.go:314 +0x14a0
main.main()
	cmd/compile/main.go:57 +0x134

watchflakes

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jan 28, 2024
@gopherbot gopherbot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Darwin WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
Status: Done
Development

No branches or pull requests

4 participants