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: 'Float64D3': no register available..." (1.20 regression?) #57846

Closed
thepudds opened this issue Jan 17, 2023 · 4 comments
Assignees
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. release-blocker
Milestone

Comments

@thepudds
Copy link
Contributor

thepudds commented Jan 17, 2023

What version of Go are you using (go version)?

$ go version

go version devel go1.20-66689c7 Tue Jan 17 15:26:07 2023 +0000 linux/amd64

Does this issue reproduce with the latest release?

Not with go1.19, but yes with go1.20rc3 and tip.

What did you do?

Ran many public modules through vet as part of testing #57173 and the related https://go.dev/cl/455195. Some modules failed to compile with internal compiler error.

Example:

git clone -b v1.3.0 https://github.com/vbsw/slices
cd ./slices/count
go build ./...

What did you see?

./count.go:320:22: internal compiler error: 'Float64D3': no register available for v0 = OpInvalid <<T>>

Call stack:

goroutine 118 [running]:
runtime/debug.Stack()
        /home/thepudds1460/sdk/gotip/src/runtime/debug/stack.go:24 +0x65
cmd/compile/internal/base.FatalfAt({0x193d1d8?, 0xc0?}, {0xc001659e90, 0x22}, {0xc00160fae0, 0x2, 0x2})
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/base/print.go:227 +0x1d7
cmd/compile/internal/base.Fatalf(...)
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/ssagen.(*ssafn).Fatalf(0xf?, {0x6be93ef8?, 0x7f08?}, {0xdd69e6, 0x1c}, {0xc001930700, 0x1, 0x0?})
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/ssagen/ssa.go:7831 +0x177
cmd/compile/internal/ssa.(*Func).Fatalf(0xc0016bca80, {0xdd69e6, 0x1c}, {0xc001930700, 0x1, 0x1})
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/ssa/func.go:722 +0x28b
cmd/compile/internal/ssa.(*regAllocState).allocReg(0xc0016ffc80, 0xc000781810?, 0xc000781810?)
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/ssa/regalloc.go:404 +0xde
cmd/compile/internal/ssa.(*regAllocState).regalloc(0xc0016ffc80, 0xc0016bca80)
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/ssa/regalloc.go:1567 +0x46c7
cmd/compile/internal/ssa.regalloc(0xc0016bca80?)
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/ssa/regalloc.go:148 +0x45
cmd/compile/internal/ssa.Compile(0xc0016bca80)
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/ssa/compile.go:97 +0x963
cmd/compile/internal/ssagen.buildssa(0xc0006b2140, 0x0)
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/ssagen/ssa.go:572 +0x2027
cmd/compile/internal/ssagen.Compile(0xc0006b2140, 0x0?)
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/ssagen/pgen.go:185 +0x4c
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/gc/compile.go:171 +0x3a
cmd/compile/internal/gc.compileFunctions.func3.1()
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/gc/compile.go:153 +0x32
created by cmd/compile/internal/gc.compileFunctions.func3
        /home/thepudds1460/sdk/gotip/src/cmd/compile/internal/gc/compile.go:152 +0x245
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jan 17, 2023
@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 17, 2023
@cherrymui cherrymui added this to the Go1.20 milestone Jan 17, 2023
@cherrymui
Copy link
Member

cc @golang/compiler

@cuonglm
Copy link
Member

cuonglm commented Jan 17, 2023

git bisec point to 5f7abec cc @randall77

@randall77 randall77 self-assigned this Jan 17, 2023
@gopherbot
Copy link

Change https://go.dev/cl/461685 mentions this issue: cmd/compile: ensure temp register mask isn't empty

@thepudds
Copy link
Contributor Author

I saw two other flavors of internal compiler error using tip against a larger number of public modules, but one of the errors looks like it was reported a few days ago (#57778).

It seems the other internal compiler error I saw does not reproduce with go build or go vet, but does happen when using golang.org/x/tools/go/analysis/singlechecker (which is how I originally saw the problem), so that one is probably a lower priority. I'll file a separate issue once I have time to poke at it slightly more:

<unknown line number>: internal compiler error: have package "main" (0xc0003ff9a0), 
want package "github.com/maxbrunsfeld/counterfeiter/v6" (0xc0003ff950)

@golang golang locked and limited conversation to collaborators Jan 17, 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. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants