Skip to content

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

Closed as not planned

Description

@bcmills
#!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)

Activity

  1. added
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    on Jan 21, 2021
  2. added this to the Backlog milestone on Jan 21, 2021
  3. mdempsky commented on Jan 21, 2021

    @mdempsky
    Contributor

    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

  4. mdempsky commented on Jan 21, 2021

    @mdempsky
    Contributor

    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.

  5. bcmills commented on Jan 22, 2021

    @bcmills
    ContributorAuthor

    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?

  6. added
    WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.
    on Apr 6, 2023
  7. gopherbot commented on May 6, 2023

    @gopherbot
    Contributor

    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.)

  8. gopherbot commented on May 24, 2023

    @gopherbot
    Contributor

    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

  9. gopherbot commented on May 31, 2023

    @gopherbot
    Contributor

    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

  10. added
    WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.
    and removed
    WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.
    on Jan 28, 2024
  11. locked and limited conversation to collaborators on Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-DarwinWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions