Skip to content

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

@LK4D4

Description

@LK4D4
Contributor

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

Activity

changed the title [-]Internal compiler error on test -race[/-] [+]cmd/compile: internal compiler error on test -race[/+] on Jun 8, 2016
added this to the Go1.7 milestone on Jun 8, 2016
ianlancetaylor

ianlancetaylor commented on Jun 8, 2016

@ianlancetaylor
Contributor
dr2chase

dr2chase commented on Jun 8, 2016

@dr2chase
Contributor

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

josharian commented on Jun 8, 2016

@josharian
Contributor

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

dr2chase

dr2chase commented on Jun 8, 2016

@dr2chase
Contributor

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

dr2chase

dr2chase commented on Jun 8, 2016

@dr2chase
Contributor

Sigh.
20803b8 cmd/compile: eliminate PPARAMREF

dr2chase

dr2chase commented on Jun 8, 2016

@dr2chase
Contributor

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

self-assigned this
on Jun 9, 2016
dr2chase

dr2chase commented on Jun 9, 2016

@dr2chase
Contributor

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

gopherbot

gopherbot commented on Jun 10, 2016

@gopherbot
Contributor

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

dr2chase

dr2chase commented on Jun 10, 2016

@dr2chase
Contributor

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

LK4D4

LK4D4 commented on Jun 13, 2016

@LK4D4
ContributorAuthor

@dr2chase thanks!

locked and limited conversation to collaborators on Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @josharian@LK4D4@dr2chase@ianlancetaylor@gopherbot

        Issue actions

          cmd/compile: internal compiler error on test -race · Issue #16008 · golang/go