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/go: build failure on a machine with gccgo installed after commit 38431f1044 #32060

Closed
siebenmann opened this issue May 15, 2019 · 4 comments

Comments

Projects
None yet
6 participants
@siebenmann
Copy link

commented May 15, 2019

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

$ go version
go version devel +ab242dcbc9 Wed May 15 18:12:10 2019 +0000 linux/amd64

Does this issue reproduce with the latest release?

No; it starts from commit 38431f1.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/homes/hawklords/cks/.cache/go-build"
GOENV="/homes/hawklords/cks/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/homes/hawklords/cks/go"
GOPROXY="direct"
GOROOT="/data/code/go-lang/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/data/code/go-lang/go/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/data/code/go-lang/go/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmpfs/go-build887470000=/tmp/go-build -gno-record-gcc-switches"

What did you do?

On a machine with gccgo installed, running the tests with all.bash fails with:

ok      cmd/fix 0.048s
go test proxy running at GOPROXY=http://127.0.0.1:41319/mod
go proxy: no archive rsc.io/x v0.1.0: file does not exist
--- FAIL: TestScript (0.00s)
    --- FAIL: TestScript/vendor_complex (0.21s)
        script_test.go:192: 
            # smoke test for complex build configuration (0.213s)
            > go build -o complex.exe complex
            > [exec:gccgo] go build -compiler=gccgo -o complex.exe complex
            [stderr]
            panic: lost build action: gccgo stdlib
            
            goroutine 1 [running]:
            cmd/go/internal/work.(*Builder).CompileAction(0xc0000d17c0, 0x0, 0x0, 0xc00021aa00, 0xc0000db400)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:418 +0x265
            cmd/go/internal/work.(*Builder).CompileAction.func1(0x980020)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:383 +0x171
            cmd/go/internal/work.(*Builder).cacheAction(0xc0000d17c0, 0xa20f1f, 0x5, 0xc0001c8000, 0xc000163ae0, 0xc0000b3220)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:340 +0x9e
            cmd/go/internal/work.(*Builder).CompileAction(0xc0000d17c0, 0x0, 0x0, 0xc0001c8000, 0x4376ac)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:373 +0xe8
            cmd/go/internal/work.(*Builder).LinkAction.func1(0x980020)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:496 +0xb2
            cmd/go/internal/work.(*Builder).cacheAction(0xc0000d17c0, 0xa20a53, 0x4, 0xc0001c8000, 0xc000163c50, 0x0)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:340 +0x9e
            cmd/go/internal/work.(*Builder).LinkAction(0xc0000d17c0, 0x1, 0x0, 0xc0001c8000, 0x0)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:490 +0x85
            cmd/go/internal/work.(*Builder).AutoAction(0xc0000d17c0, 0x1, 0x0, 0xc0001c8000, 0x0)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:349 +0x9b
            cmd/go/internal/work.runBuild(0xe76900, 0xc0000b8170, 0x1, 0x1)
                /data/code/go-lang/go/src/cmd/go/internal/work/build.go:386 +0x6c7
            main.main()
                /data/code/go-lang/go/src/cmd/go/main.go:188 +0x57f
            [exit status 2]
            FAIL: testdata/script/vendor_complex.txt:5: unexpected command failure
            
--- FAIL: TestIssue7573 (0.02s)
    go_test.go:3048: running testgo [build -n -compiler gccgo cgoref]
    go_test.go:3048: standard error:
    go_test.go:3048: panic: lost build action: gccgo stdlib
        
        goroutine 1 [running]:
        panic(0x962880, 0xc0001d63e0)
                /data/code/go-lang/go/src/runtime/panic.go:662 +0x2c2 fp=0xc000159940 sp=0xc0001598b0 pc=0x42ee52
        cmd/go/internal/work.(*Builder).CompileAction(0xc0000d5c20, 0x0, 0x0, 0xc0001fea00, 0x1)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:418 +0x265 fp=0xc0001599b0 sp=0xc000159940 pc=0x825385
        cmd/go/internal/work.(*Builder).CompileAction.func1(0x980020)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:383 +0x171 fp=0xc000159a50 sp=0xc0001599b0 pc=0x864471
        cmd/go/internal/work.(*Builder).cacheAction(0xc0000d5c20, 0xa20f1f, 0x5, 0xc0001fe000, 0xc000159ae0, 0x8)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:340 +0x9e fp=0xc000159aa0 sp=0xc000159a50 pc=0x824fbe
        cmd/go/internal/work.(*Builder).CompileAction(0xc0000d5c20, 0x0, 0x0, 0xc0001fe000, 0x4376ac)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:373 +0xe8 fp=0xc000159b10 sp=0xc000159aa0 pc=0x825208
        cmd/go/internal/work.(*Builder).LinkAction.func1(0x980020)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:496 +0xb2 fp=0xc000159bd0 sp=0xc000159b10 pc=0x864dc2
        cmd/go/internal/work.(*Builder).cacheAction(0xc0000d5c20, 0xa20a53, 0x4, 0xc0001fe000, 0xc000159c50, 0xe39628)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:340 +0x9e fp=0xc000159c20 sp=0xc000159bd0 pc=0x824fbe
        cmd/go/internal/work.(*Builder).LinkAction(0xc0000d5c20, 0x1, 0x0, 0xc0001fe000, 0xc0001bfbf0)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:490 +0x85 fp=0xc000159c80 sp=0xc000159c20 pc=0x825545
        cmd/go/internal/work.(*Builder).AutoAction(0xc0000d5c20, 0x1, 0x0, 0xc0001fe000, 0xb07060)
                /data/code/go-lang/go/src/cmd/go/internal/work/action.go:349 +0x9b fp=0xc000159cb8 sp=0xc000159c80 pc=0x8250fb
        cmd/go/internal/work.runBuild(0xe76900, 0xc000020290, 0x1, 0x1)
                /data/code/go-lang/go/src/cmd/go/internal/work/build.go:386 +0x6c7 fp=0xc000159dd8 sp=0xc000159cb8 pc=0x828267
        main.main()
                /data/code/go-lang/go/src/cmd/go/main.go:188 +0x57f fp=0xc000159f98 sp=0xc000159dd8 pc=0x90f7ef
        runtime.main()
                /data/code/go-lang/go/src/runtime/proc.go:203 +0x214 fp=0xc000159fe0 sp=0xc000159f98 pc=0x430b94
        runtime.goexit()
                /data/code/go-lang/go/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc000159fe8 sp=0xc000159fe0 pc=0x45c151
        
        goroutine 2 [force gc (idle)]:
        runtime.gopark(0xa68228, 0xe7fe90, 0x1411, 0x1)
                /data/code/go-lang/go/src/runtime/proc.go:304 +0xe0 fp=0xc000062fb0 sp=0xc000062f90 pc=0x430f60
        runtime.goparkunlock(...)
                /data/code/go-lang/go/src/runtime/proc.go:310
        runtime.forcegchelper()
                /data/code/go-lang/go/src/runtime/proc.go:253 +0xb7 fp=0xc000062fe0 sp=0xc000062fb0 pc=0x430e17
        runtime.goexit()
                /data/code/go-lang/go/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc000062fe8 sp=0xc000062fe0 pc=0x45c151
        created by runtime.init.5
                /data/code/go-lang/go/src/runtime/proc.go:242 +0x35
        
        goroutine 3 [GC sweep wait]:
        runtime.gopark(0xa68228, 0xe800c0, 0x140c, 0x1)
                /data/code/go-lang/go/src/runtime/proc.go:304 +0xe0 fp=0xc0000637a8 sp=0xc000063788 pc=0x430f60
        runtime.goparkunlock(...)
                /data/code/go-lang/go/src/runtime/proc.go:310
        runtime.bgsweep(0xc000040070)
                /data/code/go-lang/go/src/runtime/mgcsweep.go:70 +0x9c fp=0xc0000637d8 sp=0xc0000637a8 pc=0x423c4c
        runtime.goexit()
                /data/code/go-lang/go/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc0000637e0 sp=0xc0000637d8 pc=0x45c151
        created by runtime.gcenable
                /data/code/go-lang/go/src/runtime/mgc.go:210 +0x5c
        
        goroutine 4 [GC scavenge wait]:
        runtime.gopark(0xa68228, 0xe80820, 0x140d, 0x1)
                /data/code/go-lang/go/src/runtime/proc.go:304 +0xe0 fp=0xc000063f38 sp=0xc000063f18 pc=0x430f60
        runtime.goparkunlock(...)
                /data/code/go-lang/go/src/runtime/proc.go:310
        runtime.bgscavenge(0xc000040070)
                /data/code/go-lang/go/src/runtime/mgcscavenge.go:257 +0xe1 fp=0xc000063fd8 sp=0xc000063f38 pc=0x4232a1
        runtime.goexit()
                /data/code/go-lang/go/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc000063fe0 sp=0xc000063fd8 pc=0x45c151
        created by runtime.gcenable
                /data/code/go-lang/go/src/runtime/mgc.go:211 +0x7e
        
        goroutine 5 [finalizer wait]:
        runtime.gopark(0xa68228, 0xe9dd50, 0xe41410, 0x1)
                /data/code/go-lang/go/src/runtime/proc.go:304 +0xe0 fp=0xc000062758 sp=0xc000062738 pc=0x430f60
        runtime.goparkunlock(...)
                /data/code/go-lang/go/src/runtime/proc.go:310
        runtime.runfinq()
                /data/code/go-lang/go/src/runtime/mfinal.go:175 +0xa3 fp=0xc0000627e0 sp=0xc000062758 pc=0x419d23
        runtime.goexit()
                /data/code/go-lang/go/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc0000627e8 sp=0xc0000627e0 pc=0x45c151
        created by runtime.createfing
                /data/code/go-lang/go/src/runtime/mfinal.go:156 +0x61
        
        goroutine 6 [syscall]:
        runtime.notetsleepg(0xe9e220, 0xffffffffffffffff, 0x0)
                /data/code/go-lang/go/src/runtime/lock_futex.go:227 +0x34 fp=0xc000064798 sp=0xc000064768 pc=0x40c5e4
        os/signal.signal_recv(0x0)
                /data/code/go-lang/go/src/runtime/sigqueue.go:139 +0x9c fp=0xc0000647c0 sp=0xc000064798 pc=0x444a1c
        os/signal.loop()
                /data/code/go-lang/go/src/os/signal/signal_unix.go:23 +0x22 fp=0xc0000647e0 sp=0xc0000647c0 pc=0x5a17e2
        runtime.goexit()
                /data/code/go-lang/go/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc0000647e8 sp=0xc0000647e0 pc=0x45c151
        created by os/signal.init.0
                /data/code/go-lang/go/src/os/signal/signal_unix.go:29 +0x41
        
    go_test.go:3048: go [build -n -compiler gccgo cgoref] failed unexpectedly in /data/code/go-lang/go/src/cmd/go: signal: aborted
FAIL
2019/05/15 14:22:37 unexpected files left in tmpdir: [go-build363023201]
FAIL    cmd/go  29.927s
ok      cmd/go/internal/auth    0.026s

This is a Fedora 29 x86_64 machine with gccgo (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2). Removing the gccgo package makes the build and tests work again.

Since all builders are currently passing, I suspect that none of them have gccgo installed. If this is the case, perhaps there should be at least one Linux builder with gccgo (especially since I believe there have been past build problems with gccgo installed).

@gopherbot gopherbot added this to the Gccgo milestone May 15, 2019

@FiloSottile

This comment has been minimized.

Copy link
Member

commented May 15, 2019

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

@bcmills

This comment has been minimized.

Copy link
Member

commented May 15, 2019

That commit is CL 176438, which was merged just recently.

@gopherbot

This comment has been minimized.

Copy link

commented May 16, 2019

Change https://golang.org/cl/177600 mentions this issue: cmd/go: include "gccgo stdlib" in lost build action check

@gopherbot gopherbot closed this in e1fb8e4 May 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.