Skip to content

runtime: can't build go distribution caused by #16272 and #16570 #17182

@n10v

Description

@n10v

Please answer these questions before submitting your issue. Thanks!

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

go version go1.7.1 darwin/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/albert/go"
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wp/sytm29yd1d1dclmf01xgvqbw0000gn/T/go-build971136125=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

Just updated to macOS Sierra, if it makes sense

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.
Trying to build go distribution

git clone https://go.googlesource.com/go godev
cd godev/src
./all.bash

What did you expect to see?

ALL TESTS PASSED

What did you see instead?

##### Building Go bootstrap tool.
cmd/dist

##### Building Go toolchain using /Users/albert/.go1.4.
bootstrap/internal/dwarf
bootstrap/internal/sys
bootstrap/asm/internal/flags
bootstrap/internal/bio
bootstrap/compile/internal/big
bootstrap/internal/obj
bootstrap/compile/internal/syntax
bootstrap/internal/gcprog
bootstrap/internal/obj/arm
bootstrap/internal/obj/arm64
bootstrap/internal/obj/mips
bootstrap/internal/obj/ppc64
bootstrap/internal/obj/s390x
bootstrap/internal/obj/x86
bootstrap/asm/internal/lex
bootstrap/link/internal/ld
bootstrap/asm/internal/arch
bootstrap/compile/internal/ssa
bootstrap/asm/internal/asm
bootstrap/asm
bootstrap/link/internal/amd64
bootstrap/link/internal/arm
bootstrap/link/internal/arm64
bootstrap/link/internal/mips64
bootstrap/link/internal/ppc64
bootstrap/link/internal/s390x
bootstrap/link/internal/x86
bootstrap/link
bootstrap/compile/internal/gc
bootstrap/compile/internal/amd64
bootstrap/compile/internal/arm
bootstrap/compile/internal/arm64
bootstrap/compile/internal/mips64
bootstrap/compile/internal/ppc64
bootstrap/compile/internal/s390x
bootstrap/compile/internal/x86
bootstrap/compile

##### Building go_bootstrap for host, darwin/amd64.
runtime/internal/sys
runtime/internal/atomic
runtime
encoding
errors
internal/race
internal/syscall/windows/sysdll
math
sort
sync/atomic
unicode
unicode/utf16
unicode/utf8
container/heap
sync
internal/singleflight
io
syscall
hash
bytes
strings
hash/adler32
bufio
strconv
path
reflect
encoding/base64
crypto
regexp/syntax
crypto/sha1
internal/syscall/windows
internal/syscall/windows/registry
time
regexp
os
os/signal
path/filepath
io/ioutil
encoding/binary
fmt
context
flag
go/token
log
net/url
text/template/parse
compress/flate
encoding/json
debug/dwarf
os/exec
go/scanner
go/ast
compress/zlib
text/template
debug/macho
debug/elf
unexpected fault address 0xf161c606c38
fatal error: fault
[signal 0xb code=0x1 addr=0xf161c606c38 pc=0x24ef15]

goroutine 1 [running]:
runtime.gothrow(0x780320, 0x5)
    /usr/local/go/src/runtime/panic.go:503 +0x8e fp=0xc2085b1ea8 sp=0xc2085b1e90
runtime.sigpanic()
    /usr/local/go/src/runtime/sigpanic_unix.go:29 +0x261 fp=0xc2085b1ef8 sp=0xc2085b1ea8
bootstrap/compile/internal/ssa.(*Config).Log(0xf161c606bd0, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/ssa/config.go:288 +0x25 fp=0xc2085b1f20 sp=0xc2085b1ef8
bootstrap/compile/internal/ssa.(*Func).Log(0xc208cdde60, 0xc200000000)
    /Users/albert/godev/src/cmd/compile/internal/ssa/func.go:411 +0x2b fp=0xc2085b1f38 sp=0xc2085b1f20
bootstrap/compile/internal/ssa.Compile(0xc208cdde60)
    /Users/albert/godev/src/cmd/compile/internal/ssa/compile.go:68 +0x54d fp=0xc2085b5638 sp=0xc2085b1f38
bootstrap/compile/internal/gc.buildssa(0xc208704480, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:169 +0x1490 fp=0xc2085b5970 sp=0xc2085b5638
bootstrap/compile/internal/gc.compile(0xc208704480)
    /Users/albert/godev/src/cmd/compile/internal/gc/pgen.go:370 +0x6f5 fp=0xc2085b5b78 sp=0xc2085b5970
bootstrap/compile/internal/gc.funccompile(0xc208704480)
    /Users/albert/godev/src/cmd/compile/internal/gc/dcl.go:1260 +0x1be fp=0xc2085b5bf0 sp=0xc2085b5b78
bootstrap/compile/internal/gc.Main()
    /Users/albert/godev/src/cmd/compile/internal/gc/main.go:472 +0x2a3c fp=0xc2085b5ee0 sp=0xc2085b5bf0
main.main()
    /Users/albert/godev/src/cmd/compile/main.go:47 +0x12f fp=0xc2085b5f98 sp=0xc2085b5ee0
runtime.main()
    /usr/local/go/src/runtime/proc.go:63 +0xf3 fp=0xc2085b5fe0 sp=0xc2085b5f98
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc2085b5fe8 sp=0xc2085b5fe0
go tool dist: FAILED: /Users/albert/godev/pkg/tool/darwin_amd64/compile -pack -o /var/folders/wp/sytm29yd1d1dclmf01xgvqbw0000gn/T/go-tool-dist-871135730/text/template/_go_.a -p text/template /Users/albert/godev/src/text/template/doc.go /Users/albert/godev/src/text/template/exec.go /Users/albert/godev/src/text/template/funcs.go /Users/albert/godev/src/text/template/helper.go /Users/albert/godev/src/text/template/option.go /Users/albert/godev/src/text/template/template.go: exit status 2
failed MSpanList_Insert 0xc01050 0xf161d920d74 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.MSpanList_Insert(0xb19d90, 0xc01050)
    /usr/local/go/src/runtime/mheap.c:692 +0x8f
runtime.MHeap_Free(0xb19d20, 0xc01050, 0x0)
    /usr/local/go/src/runtime/mheap.c:500 +0x5b
runtime.MCentral_FreeSpan(0xb236b8, 0xc01050, 0x2, 0xc20848e000, 0xc20848f000, 0x0, 0x64)
    /usr/local/go/src/runtime/mcentral.c:181 +0x1bb
runtime.MSpan_Sweep(0xc01050, 0xf00000000, 0x1)
    /usr/local/go/src/runtime/mgc0.c:1099 +0x477
runtime.MHeap_Alloc(0xb19d20, 0x1, 0x10000000008, 0xd589)
    /usr/local/go/src/runtime/mheap.c:240 +0x66
runtime.MCentral_CacheSpan(0xb20f58, 0xc00e48)
    /usr/local/go/src/runtime/mcentral.c:85 +0x167
runtime.MCache_Refill(0xbeb000, 0x8, 0xc00e48)
    /usr/local/go/src/runtime/mcache.c:90 +0xa0

goroutine 1 [running]:
runtime.switchtoM()
    /usr/local/go/src/runtime/asm_amd64.s:198 fp=0xc2089d11d8 sp=0xc2089d11d0
runtime.mallocgc(0x70, 0x7313c0, 0xc200000000, 0xc2087cb738)
    /usr/local/go/src/runtime/malloc.go:178 +0x849 fp=0xc2089d1288 sp=0xc2089d11d8
runtime.newobject(0x7313c0, 0xc200000da2)
    /usr/local/go/src/runtime/malloc.go:353 +0x49 fp=0xc2089d12b0 sp=0xc2089d1288
bootstrap/compile/internal/ssa.(*Func).newValue(0xc2088dbd40, 0x5ba, 0xc0c200, 0xc20804c050, 0xc2087ad5e8, 0x17e, 0xc208489f80)
    /Users/albert/godev/src/cmd/compile/internal/ssa/func.go:92 +0x2ab fp=0xc2089d1338 sp=0xc2089d12b0
bootstrap/compile/internal/ssa.(*Block).NewValue0A(0xc2087ad5e8, 0x5ba0000017e, 0xc0c200, 0xc20804c050, 0x74d040, 0xc208936630, 0xc208489f80)
    /Users/albert/godev/src/cmd/compile/internal/ssa/func.go:211 +0x1fb fp=0xc2089d13c8 sp=0xc2089d1338
bootstrap/compile/internal/gc.(*state).lookupVarOutgoing(0xc2088edb00, 0xc2087ad5e8, 0xc0c200, 0xc20804c050, 0xc208936630, 0xc20000017e, 0xc208489f80)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:4087 +0x130 fp=0xc2089d1498 sp=0xc2089d13c8
bootstrap/compile/internal/gc.(*state).resolveFwdRef(0xc2088edb00, 0xc208489f80, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:4043 +0x858 fp=0xc2089d1600 sp=0xc2089d1498
bootstrap/compile/internal/gc.(*state).linkForwardReferences(0xc2088edb00, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:3997 +0xb8 fp=0xc2089d1638 sp=0xc2089d1600
bootstrap/compile/internal/gc.buildssa(0xc208533a70, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:158 +0x102d fp=0xc2089d1970 sp=0xc2089d1638
bootstrap/compile/internal/gc.compile(0xc208533a70)
    /Users/albert/godev/src/cmd/compile/internal/gc/pgen.go:370 +0x6f5 fp=0xc2089d1b78 sp=0xc2089d1970
bootstrap/compile/internal/gc.funccompile(0xc208533a70)
    /Users/albert/godev/src/cmd/compile/internal/gc/dcl.go:1260 +0x1be fp=0xc2089d1bf0 sp=0xc2089d1b78
bootstrap/compile/internal/gc.Main()
    /Users/albert/godev/src/cmd/compile/internal/gc/main.go:472 +0x2a3c fp=0xc2089d1ee0 sp=0xc2089d1bf0
main.main()
    /Users/albert/godev/src/cmd/compile/main.go:47 +0x12f fp=0xc2089d1f98 sp=0xc2089d1ee0
runtime.main()
    /usr/local/go/src/runtime/proc.go:63 +0xf3 fp=0xc2089d1fe0 sp=0xc2089d1f98
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc2089d1fe8 sp=0xc2089d1fe0
can't create /var/folders/wp/sytm29yd1d1dclmf01xgvqbw0000gn/T/go-tool-dist-871135730/debug/elf/_go_.a: open /var/folders/wp/sytm29yd1d1dclmf01xgvqbw0000gn/T/go-tool-dist-871135730/debug/elf/_go_.a: no such file or directory

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions