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 on test -race #16008

Closed
LK4D4 opened this issue Jun 8, 2016 · 10 comments
Closed

cmd/compile: internal compiler error on test -race #16008

LK4D4 opened this issue Jun 8, 2016 · 10 comments
Milestone

Comments

@LK4D4
Copy link
Contributor

LK4D4 commented Jun 8, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version devel +3c6b668 Thu Jun 2 00:22:03 2016 +0000 linux/amd64 (it's go1.7beta1)
  2. What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/moroz/project/workspace"
GORACE=""
GOROOT="/home/moroz/go"
GOTOOLDIR="/home/moroz/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build360617198=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.
go test -race github.com/docker/swarmkit/manager/state/store
  1. What did you expect to see?
    Tests just passing
  2. What did you see instead?
    Compilation fails with
# github.com/docker/swarmkit/manager/state/store
manager/state/store/memory_test.go:1177: internal compiler error: Treating auto as if it were arg, func BenchmarkUpdateNodeTransaction.func1, node autotmp_2905, value v264

goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
        /home/moroz/go/src/runtime/debug/stack.go:24 +0x79
cmd/compile/internal/gc.Fatalf(0x907f5d, 0x3b, 0xc422bb5680, 0x3, 0x3)
        /home/moroz/go/src/cmd/compile/internal/gc/subr.go:165 +0x248
cmd/compile/internal/gc.(*ssaExport).Fatalf(0xb58186, 0xd35, 0x907f5d, 0x3b, 0xc422bb5680, 0x3, 0x3)
        /home/moroz/go/src/cmd/compile/internal/gc/ssa.go:4426 +0x74
cmd/compile/internal/ssa.(*Config).Fatalf(0xc4218ae000, 0xc400000d35, 0x907f5d, 0x3b, 0xc422bb5680, 0x3, 0x3)
        /home/moroz/go/src/cmd/compile/internal/ssa/config.go:200 +0x6e
cmd/compile/internal/gc.(*state).Fatalf(0xc422b8cd80, 0x907f5d, 0x3b, 0xc422bb5680, 0x3, 0x3)
        /home/moroz/go/src/cmd/compile/internal/gc/ssa.go:336 +0x83
cmd/compile/internal/gc.(*state).resolveFwdRef(0xc422b8cd80, 0xc4218b5408, 0x0)
        /home/moroz/go/src/cmd/compile/internal/gc/ssa.go:3801 +0x587
cmd/compile/internal/gc.(*state).linkForwardReferences(0xc422b8cd80, 0x0)
        /home/moroz/go/src/cmd/compile/internal/gc/ssa.go:3786 +0x6e
cmd/compile/internal/gc.buildssa(0xc4216ef7a0, 0x0)
        /home/moroz/go/src/cmd/compile/internal/gc/ssa.go:221 +0x93a
cmd/compile/internal/gc.compile(0xc4216ef7a0)
        /home/moroz/go/src/cmd/compile/internal/gc/pgen.go:405 +0x1363
cmd/compile/internal/gc.funccompile(0xc4216ef7a0)
        /home/moroz/go/src/cmd/compile/internal/gc/dcl.go:1287 +0x186
cmd/compile/internal/gc.Main()
        /home/moroz/go/src/cmd/compile/internal/gc/main.go:465 +0x19af
cmd/compile/internal/amd64.Main()
        /home/moroz/go/src/cmd/compile/internal/amd64/galign.go:93 +0x2fa
main.main()
        /home/moroz/go/src/cmd/compile/main.go:33 +0x2a3

FAIL    github.com/docker/swarmkit/manager/state/store [build failed]

Sorry for numeration :/ I dunno how to fix markdown

UPD in case if master will change, here is hash of commit f338afd2303f1f25a3ba8bf50a35d85b0cc5aacc

@ianlancetaylor ianlancetaylor changed the title Internal compiler error on test -race cmd/compile: internal compiler error on test -race Jun 8, 2016
@ianlancetaylor ianlancetaylor added this to the Go1.7 milestone Jun 8, 2016
@ianlancetaylor
Copy link
Contributor

CC @randall77 @josharian

@dr2chase
Copy link
Contributor

dr2chase commented Jun 8, 2016

Reproduces nicely for me (after a go get). No idea of the root cause (yet) though I added that error message (it means "uninitialized autotmp in the entry block, this won't get better if we continue compiling").

@josharian
Copy link
Contributor

@dr2chase since you have it set up already, want to bisect?

@dr2chase
Copy link
Contributor

dr2chase commented Jun 8, 2016

Sure. I'm sitting in a talk anyhow right now...

@dr2chase
Copy link
Contributor

dr2chase commented Jun 8, 2016

Sigh.
20803b8 cmd/compile: eliminate PPARAMREF

@dr2chase
Copy link
Contributor

dr2chase commented Jun 8, 2016

For comparison, here's the input to SSA from the last good and first bad revisions, for the problematic function, with trailing irrelevant output trimmed off:
GOSSAFUNC=BenchmarkUpdateNodeTransaction.func1 go test -race github.com/docker/swarmkit/manager/state/store >& good_or_bad.txt

bad.txt
good.txt

@dr2chase dr2chase self-assigned this Jun 9, 2016
@dr2chase
Copy link
Contributor

dr2chase commented Jun 9, 2016

I have what looks like a likely fix, more later, need to also make a tiny test case.

@gopherbot
Copy link

CL https://golang.org/cl/23954 mentions this issue.

@dr2chase
Copy link
Contributor

See also #15091
Very related (same error, for OAS, not OASWB).
Possibly all nodes should be treated in the "improved" way.

@LK4D4
Copy link
Contributor Author

LK4D4 commented Jun 13, 2016

@dr2chase thanks!

@golang golang locked and limited conversation to collaborators Jun 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants