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

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

Closed
n10v opened this issue Sep 21, 2016 · 15 comments
Closed

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

n10v opened this issue Sep 21, 2016 · 15 comments

Comments

@n10v
Copy link
Contributor

n10v commented Sep 21, 2016

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
@n10v
Copy link
Contributor Author

n10v commented Sep 21, 2016

Previous build:

##### 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/compile/internal/syntax
bootstrap/internal/obj
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
/Users/albert/godev/src/runtime/panic.go:130: internal compiler error: panic during regalloc while compiling totaldefersize:

runtime error: index out of range

goroutine 1 [running]:
bootstrap/compile/internal/ssa.func·001()
    /Users/albert/godev/src/cmd/compile/internal/ssa/compile.go:35 +0xc2
bootstrap/compile/internal/ssa.(*regAllocState).computeLive(0xc20ae6a280)
    /Users/albert/godev/src/cmd/compile/internal/ssa/regalloc.go:2208 +0x23c9
bootstrap/compile/internal/ssa.(*regAllocState).init(0xc20ae6a280, 0xc20a7f5440)
    /Users/albert/godev/src/cmd/compile/internal/ssa/regalloc.go:540 +0xa45
bootstrap/compile/internal/ssa.regalloc(0xc20a7f5440)
    /Users/albert/godev/src/cmd/compile/internal/ssa/regalloc.go:132 +0x47
bootstrap/compile/internal/ssa.Compile(0xc20a7f5440)
    /Users/albert/godev/src/cmd/compile/internal/ssa/compile.go:64 +0x513
bootstrap/compile/internal/gc.buildssa(0xc208e11ef0, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:169 +0x1490
bootstrap/compile/internal/gc.compile(0xc208e11ef0)
    /Users/albert/godev/src/cmd/compile/internal/gc/pgen.go:370 +0x6f5
bootstrap/compile/internal/gc.funccompile(0xc208e11ef0)
    /Users/albert/godev/src/cmd/compile/internal/gc/dcl.go:1260 +0x1be
bootstrap/compile/internal/gc.Main()
    /Users/albert/godev/src/cmd/compile/internal/gc/main.go:472 +0x2a3c
main.main()
    /Users/albert/godev/src/cmd/compile/main.go:47 +0x12f



/Users/albert/godev/src/cmd/compile/internal/gc/subr.go:165 (0x15919e)
    Fatalf: os.Stdout.Write(debug.Stack())
/Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:4700 (0x157baa)
    (*ssaExport).Fatalf: Fatalf(msg, args...)
/Users/albert/godev/src/cmd/compile/internal/ssa/config.go:289 (0x24efce)
    (*Config).Fatalf: func (c *Config) Fatalf(line int32, msg string, args ...interface{}) { c.fe.Fatalf(line, msg, args...) }
/Users/albert/godev/src/cmd/compile/internal/ssa/func.go:412 (0x262d38)
    (*Func).Fatalf: func (f *Func) Fatalf(msg string, args ...interface{}) { f.Config.Fatalf(f.Entry.Line, msg, args...) }
/Users/albert/godev/src/cmd/compile/internal/ssa/compile.go:37 (0x4e3327)
    func.001: f.Fatalf("panic during %s while compiling %s:\n\n%v\n\n%s\n", phaseName, f.Name, err, stack)
/usr/local/go/src/runtime/asm_amd64.s:401 (0x234d5)
/usr/local/go/src/runtime/panic.go:387 (0x13988)
/usr/local/go/src/runtime/panic.go:12 (0x12b1e)
/Users/albert/godev/src/cmd/compile/internal/ssa/regalloc.go:2208 (0x291769)
    (*regAllocState).computeLive: for _, e := range s.live[b.ID] {
/Users/albert/godev/src/cmd/compile/internal/ssa/regalloc.go:540 (0x27aca5)
    (*regAllocState).init: s.computeLive()
/Users/albert/godev/src/cmd/compile/internal/ssa/regalloc.go:132 (0x278467)
    regalloc: s.init(f)
/Users/albert/godev/src/cmd/compile/internal/ssa/compile.go:64 (0x24b023)
    Compile: p.fn(f)
/Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:169 (0x127ff0)
    buildssa: ssa.Compile(s.f)
/Users/albert/godev/src/cmd/compile/internal/gc/pgen.go:370 (0xf79c5)
    compile: ssafn := buildssa(Curfn)
/Users/albert/godev/src/cmd/compile/internal/gc/dcl.go:1260 (0x8b0ee)
    funccompile: compile(n)
/Users/albert/godev/src/cmd/compile/internal/gc/main.go:472 (0xc9fbc)
    Main: funccompile(xtop[i])
/Users/albert/godev/src/cmd/compile/main.go:47 (0x212f)
    main: gc.Main()
/usr/local/go/src/runtime/proc.go:63 (0x154d3)
/usr/local/go/src/runtime/asm_amd64.s:2232 (0x25591)

go tool dist: FAILED: /Users/albert/godev/pkg/tool/darwin_amd64/compile -pack -o /var/folders/wp/sytm29yd1d1dclmf01xgvqbw0000gn/T/go-tool-dist-089096488/runtime/_go_.a -p runtime -+ -asmhdr /var/folders/wp/sytm29yd1d1dclmf01xgvqbw0000gn/T/go-tool-dist-089096488/runtime/go_asm.h /Users/albert/godev/src/runtime/alg.go /Users/albert/godev/src/runtime/atomic_pointer.go /Users/albert/godev/src/runtime/cgo.go /Users/albert/godev/src/runtime/cgocall.go /Users/albert/godev/src/runtime/cgocallback.go /Users/albert/godev/src/runtime/cgocheck.go /Users/albert/godev/src/runtime/chan.go /Users/albert/godev/src/runtime/compiler.go /Users/albert/godev/src/runtime/complex.go /Users/albert/godev/src/runtime/cpuprof.go /Users/albert/godev/src/runtime/cputicks.go /Users/albert/godev/src/runtime/debug.go /Users/albert/godev/src/runtime/defs_darwin_amd64.go /Users/albert/godev/src/runtime/env_posix.go /Users/albert/godev/src/runtime/error.go /Users/albert/godev/src/runtime/extern.go /Users/albert/godev/src/runtime/fastlog2.go /Users/albert/godev/src/runtime/fastlog2table.go /Users/albert/godev/src/runtime/hash64.go /Users/albert/godev/src/runtime/hashmap.go /Users/albert/godev/src/runtime/hashmap_fast.go /Users/albert/godev/src/runtime/heapdump.go /Users/albert/godev/src/runtime/iface.go /Users/albert/godev/src/runtime/lfstack.go /Users/albert/godev/src/runtime/lfstack_64bit.go /Users/albert/godev/src/runtime/lock_sema.go /Users/albert/godev/src/runtime/malloc.go /Users/albert/godev/src/runtime/mbarrier.go /Users/albert/godev/src/runtime/mbitmap.go /Users/albert/godev/src/runtime/mcache.go /Users/albert/godev/src/runtime/mcentral.go /Users/albert/godev/src/runtime/mem_darwin.go /Users/albert/godev/src/runtime/mfinal.go /Users/albert/godev/src/runtime/mfixalloc.go /Users/albert/godev/src/runtime/mgc.go /Users/albert/godev/src/runtime/mgcmark.go /Users/albert/godev/src/runtime/mgcsweep.go /Users/albert/godev/src/runtime/mgcwork.go /Users/albert/godev/src/runtime/mheap.go /Users/albert/godev/src/runtime/mmap.go /Users/albert/godev/src/runtime/mprof.go /Users/albert/godev/src/runtime/msan0.go /Users/albert/godev/src/runtime/msize.go /Users/albert/godev/src/runtime/mstats.go /Users/albert/godev/src/runtime/mstkbar.go /Users/albert/godev/src/runtime/netpoll.go /Users/albert/godev/src/runtime/netpoll_kqueue.go /Users/albert/godev/src/runtime/os_darwin.go /Users/albert/godev/src/runtime/panic.go /Users/albert/godev/src/runtime/plugin.go /Users/albert/godev/src/runtime/print.go /Users/albert/godev/src/runtime/proc.go /Users/albert/godev/src/runtime/race0.go /Users/albert/godev/src/runtime/rdebug.go /Users/albert/godev/src/runtime/rune.go /Users/albert/godev/src/runtime/runtime.go /Users/albert/godev/src/runtime/runtime1.go /Users/albert/godev/src/runtime/runtime2.go /Users/albert/godev/src/runtime/select.go /Users/albert/godev/src/runtime/sema.go /Users/albert/godev/src/runtime/signal1_unix.go /Users/albert/godev/src/runtime/signal2_unix.go /Users/albert/godev/src/runtime/signal_amd64x.go /Users/albert/godev/src/runtime/signal_darwin.go /Users/albert/godev/src/runtime/signal_darwin_amd64.go /Users/albert/godev/src/runtime/signal_unix.go /Users/albert/godev/src/runtime/sigpanic_unix.go /Users/albert/godev/src/runtime/sigqueue.go /Users/albert/godev/src/runtime/slice.go /Users/albert/godev/src/runtime/softfloat64.go /Users/albert/godev/src/runtime/sqrt.go /Users/albert/godev/src/runtime/stack.go /Users/albert/godev/src/runtime/string.go /Users/albert/godev/src/runtime/stubs.go /Users/albert/godev/src/runtime/stubs2.go /Users/albert/godev/src/runtime/stubs_asm.go /Users/albert/godev/src/runtime/symtab.go /Users/albert/godev/src/runtime/sys_nonppc64x.go /Users/albert/godev/src/runtime/sys_x86.go /Users/albert/godev/src/runtime/time.go /Users/albert/godev/src/runtime/trace.go /Users/albert/godev/src/runtime/traceback.go /Users/albert/godev/src/runtime/type.go /Users/albert/godev/src/runtime/typekind.go /Users/albert/godev/src/runtime/unaligned1.go /Users/albert/godev/src/runtime/vdso_none.go /Users/albert/godev/src/runtime/write_err.go: exit status 2

@n10v
Copy link
Contributor Author

n10v commented Sep 21, 2016

One more compilation. Why are there always new errors?

##### 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
failed MSpanList_Insert 0xec68c0 0x10b7865c6a44 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.MSpanList_Insert(0xbbe590, 0xec68c0)
    /usr/local/go/src/runtime/mheap.c:692 +0x8f
runtime.MHeap_Free(0xbbe520, 0xec68c0, 0x0)
    /usr/local/go/src/runtime/mheap.c:500 +0x5b
runtime.MCentral_FreeSpan(0xbc6958, 0xec68c0, 0x11, 0xc20b810000, 0xc20b811e00, 0x0, 0x64)
    /usr/local/go/src/runtime/mcentral.c:181 +0x1bb
runtime.MSpan_Sweep(0xec68c0, 0x1b00000000, 0x1701)
    /usr/local/go/src/runtime/mgc0.c:1099 +0x477
runtime.MHeap_Alloc(0xbbe520, 0x1, 0x10000000006, 0xd559)
    /usr/local/go/src/runtime/mheap.c:240 +0x66
runtime.MCentral_CacheSpan(0xbc5518, 0xc20aebcf20)
    /usr/local/go/src/runtime/mcentral.c:85 +0x167
runtime.MCache_Refill(0xc9a000, 0x6, 0x800eccf88)
    /usr/local/go/src/runtime/mcache.c:90 +0xa0

goroutine 1 [running]:
runtime.switchtoM()
    /usr/local/go/src/runtime/asm_amd64.s:198 fp=0xc20aebcbe8 sp=0xc20aebcbe0
runtime.mallocgc(0x50, 0x7b03a0, 0x1900000000, 0xc20a388b98)
    /usr/local/go/src/runtime/malloc.go:178 +0x849 fp=0xc20aebcc98 sp=0xc20aebcbe8
runtime.newobject(0x7b03a0, 0x9)
    /usr/local/go/src/runtime/malloc.go:353 +0x49 fp=0xc20aebccc0 sp=0xc20aebcc98
bootstrap/compile/internal/gc.typ(0xc20a388b12, 0xc20a388bf0)
    /Users/albert/godev/src/cmd/compile/internal/gc/type.go:376 +0x2a fp=0xc20aebcd28 sp=0xc20aebccc0
bootstrap/compile/internal/gc.typPtr(0xc208048a00, 0xc20a9e7f40)
    /Users/albert/godev/src/cmd/compile/internal/gc/type.go:451 +0x29 fp=0xc20aebcd60 sp=0xc20aebcd28
bootstrap/compile/internal/gc.Ptrto(0xc208048a00, 0xc2000005a4)
    /Users/albert/godev/src/cmd/compile/internal/gc/subr.go:1202 +0x115 fp=0xc20aebcd90 sp=0xc20aebcd60
bootstrap/compile/internal/gc.(*state).addr(0xc20a5010e0, 0xc20b752a20, 0x0, 0xc20a388b98, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:2948 +0x3a fp=0xc20aebcf20 sp=0xc20aebcd90
bootstrap/compile/internal/gc.(*state).expr(0xc20a5010e0, 0xc20b752b40, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:1906 +0x24bf fp=0xc20aebd508 sp=0xc20aebcf20
bootstrap/compile/internal/gc.(*state).stmt(0xc20a5010e0, 0xc20a9d2870)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:678 +0x6dc fp=0xc20aebd780 sp=0xc20aebd508
bootstrap/compile/internal/gc.(*state).stmtList(0xc20a5010e0, 0xc20b74a700)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:488 +0x89 fp=0xc20aebd7f0 sp=0xc20aebd780
bootstrap/compile/internal/gc.(*state).call(0xc20a5010e0, 0xc20b752f30, 0xcc00, 0xc20aebda20)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:2836 +0x10a fp=0xc20aebd9c0 sp=0xc20aebd7f0
bootstrap/compile/internal/gc.(*state).expr(0xc20a5010e0, 0xc20b752f30, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:2065 +0x2bfb fp=0xc20aebdfa8 sp=0xc20aebd9c0
bootstrap/compile/internal/gc.(*state).stmt(0xc20a5010e0, 0xc20b7538c0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:678 +0x6dc fp=0xc20aebe220 sp=0xc20aebdfa8
bootstrap/compile/internal/gc.(*state).stmtList(0xc20a5010e0, 0xc20b74a720)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:488 +0x89 fp=0xc20aebe290 sp=0xc20aebe220
bootstrap/compile/internal/gc.(*state).expr(0xc20a5010e0, 0xc20a9d2000, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:1411 +0x87 fp=0xc20aebe878 sp=0xc20aebe290
bootstrap/compile/internal/gc.(*state).expr(0xc20a5010e0, 0xc20b753050, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:1872 +0x26de fp=0xc20aebee60 sp=0xc20aebe878
bootstrap/compile/internal/gc.(*state).stmt(0xc20a5010e0, 0xc20a9d2ab0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:678 +0x6dc fp=0xc20aebf0d8 sp=0xc20aebee60
bootstrap/compile/internal/gc.(*state).stmtList(0xc20a5010e0, 0xc20b74a880)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:488 +0x89 fp=0xc20aebf148 sp=0xc20aebf0d8
bootstrap/compile/internal/gc.(*state).stmt(0xc20a5010e0, 0xc20b7530e0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:750 +0x22bb fp=0xc20aebf3c0 sp=0xc20aebf148
bootstrap/compile/internal/gc.(*state).stmts(0xc20a5010e0, 0xc20b74a5c0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:481 +0x89 fp=0xc20aebf430 sp=0xc20aebf3c0
bootstrap/compile/internal/gc.buildssa(0xc20b7563f0, 0x0)
    /Users/albert/godev/src/cmd/compile/internal/gc/ssa.go:126 +0xad4 fp=0xc20aebf790 sp=0xc20aebf430
bootstrap/compile/internal/gc.compile(0xc20b7563f0)
    /Users/albert/godev/src/cmd/compile/internal/gc/pgen.go:402 +0x72e fp=0xc20aebf9a0 sp=0xc20aebf790
bootstrap/compile/internal/gc.funccompile(0xc20b7563f0)
    /Users/albert/godev/src/cmd/compile/internal/gc/dcl.go:1260 +0x1be fp=0xc20aebfa18 sp=0xc20aebf9a0
bootstrap/compile/internal/gc.geneq(0xc20b75efc0, 0xc20967a820)
    /Users/albert/godev/src/cmd/compile/internal/gc/alg.go:512 +0xdef fp=0xc20aebfbf0 sp=0xc20aebfa18
bootstrap/compile/internal/gc.dalgsym(0xc20967a820, 0xffffffffffffffff)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1539 +0x713 fp=0xc20aebfca8 sp=0xc20aebfbf0
bootstrap/compile/internal/gc.dcommontype(0xc20914a540, 0x0, 0xc20967a820, 0xb)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:829 +0xa01 fp=0xc20aebfdb8 sp=0xc20aebfca8
bootstrap/compile/internal/gc.dtypesym(0xc20967a820, 0xc20967a820)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1308 +0x1072 fp=0xc20aebff78 sp=0xc20aebfdb8
bootstrap/compile/internal/gc.dtypesym(0xc20967aaf0, 0xc209138d90)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1292 +0x578 fp=0xc20aec0138 sp=0xc20aebff78
bootstrap/compile/internal/gc.dtypesym(0xc20967a5a0, 0xc20967a5a0)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1304 +0x101c fp=0xc20aec02f8 sp=0xc20aec0138
bootstrap/compile/internal/gc.dtypesym(0xc2096f99f0, 0xc2096f99f0)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1292 +0x578 fp=0xc20aec04b8 sp=0xc20aec02f8
bootstrap/compile/internal/gc.dtypesym(0xc2096f9a40, 0xc209261ce0)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1162 +0xd64 fp=0xc20aec0678 sp=0xc20aec04b8
bootstrap/compile/internal/gc.dtypesym(0xc2096f9680, 0xc2096f9680)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1304 +0x101c fp=0xc20aec0838 sp=0xc20aec0678
bootstrap/compile/internal/gc.dtypesym(0xc209778140, 0xc20b38fec8)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1292 +0x578 fp=0xc20aec09f8 sp=0xc20aec0838
bootstrap/compile/internal/gc.dtypesym(0xc20aaed630, 0x8)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1185 +0x89c fp=0xc20aec0bb8 sp=0xc20aec09f8
bootstrap/compile/internal/gc.dextratype(0xc20a2587e0, 0x38, 0xc20aaec370, 0x0, 0x38)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:610 +0x1c4 fp=0xc20aec0ca0 sp=0xc20aec0bb8
bootstrap/compile/internal/gc.dtypesym(0xc20aaec370, 0xc20aaec300)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1296 +0x60f fp=0xc20aec0e60 sp=0xc20aec0ca0
bootstrap/compile/internal/gc.dcommontype(0xc208e75500, 0x0, 0xc20967a4b0, 0x7)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:835 +0x9e1 fp=0xc20aec0f70 sp=0xc20aec0e60
bootstrap/compile/internal/gc.dtypesym(0xc20967a4b0, 0xc2092b37a0)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1146 +0x63e fp=0xc20aec1130 sp=0xc20aec0f70
bootstrap/compile/internal/gc.dtypesym(0xc209679d10, 0xc209679d10)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1304 +0x101c fp=0xc20aec12f0 sp=0xc20aec1130
bootstrap/compile/internal/gc.dtypesym(0xc20967abe0, 0xc2096701e0)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1292 +0x578 fp=0xc20aec14b0 sp=0xc20aec12f0
bootstrap/compile/internal/gc.dtypesym(0xc209679c70, 0xc209679c70)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1304 +0x101c fp=0xc20aec1670 sp=0xc20aec14b0
bootstrap/compile/internal/gc.dtypesym(0xc20967a280, 0xc20b75bab0)
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1292 +0x578 fp=0xc20aec1830 sp=0xc20aec1670
bootstrap/compile/internal/gc.dumptypestructs()
    /Users/albert/godev/src/cmd/compile/internal/gc/reflect.go:1386 +0xb85 fp=0xc20aec1a40 sp=0xc20aec1830
bootstrap/compile/internal/gc.dumpobj1(0x7fff5fbfe953, 0x56, 0x3)
    /Users/albert/godev/src/cmd/compile/internal/gc/obj.go:134 +0x7eb fp=0xc20aec1ba0 sp=0xc20aec1a40
bootstrap/compile/internal/gc.dumpobj()
    /Users/albert/godev/src/cmd/compile/internal/gc/obj.go:45 +0x4c fp=0xc20aec1bc0 sp=0xc20aec1ba0
bootstrap/compile/internal/gc.Main()
    /Users/albert/godev/src/cmd/compile/internal/gc/main.go:500 +0x2d73 fp=0xc20aec1eb0 sp=0xc20aec1bc0
bootstrap/compile/internal/amd64.Main()
    /Users/albert/godev/src/cmd/compile/internal/amd64/galign.go:93 +0x662 fp=0xc20aec1ee0 sp=0xc20aec1eb0
main.main()
    /Users/albert/godev/src/cmd/compile/main.go:33 +0x16b fp=0xc20aec1f98 sp=0xc20aec1ee0
runtime.main()
    /usr/local/go/src/runtime/proc.go:63 +0xf3 fp=0xc20aec1fe0 sp=0xc20aec1f98
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc20aec1fe8 sp=0xc20aec1fe0
go tool dist: FAILED: /Users/albert/godev/pkg/tool/darwin_amd64/compile -pack -o /var/folders/wp/sytm29yd1d1dclmf01xgvqbw0000gn/T/go-tool-dist-556222863/runtime/_go_.a -p runtime -+ -asmhdr /var/folders/wp/sytm29yd1d1dclmf01xgvqbw0000gn/T/go-tool-dist-556222863/runtime/go_asm.h /Users/albert/godev/src/runtime/alg.go /Users/albert/godev/src/runtime/atomic_pointer.go /Users/albert/godev/src/runtime/cgo.go /Users/albert/godev/src/runtime/cgocall.go /Users/albert/godev/src/runtime/cgocallback.go /Users/albert/godev/src/runtime/cgocheck.go /Users/albert/godev/src/runtime/chan.go /Users/albert/godev/src/runtime/compiler.go /Users/albert/godev/src/runtime/complex.go /Users/albert/godev/src/runtime/cpuprof.go /Users/albert/godev/src/runtime/cputicks.go /Users/albert/godev/src/runtime/debug.go /Users/albert/godev/src/runtime/defs_darwin_amd64.go /Users/albert/godev/src/runtime/env_posix.go /Users/albert/godev/src/runtime/error.go /Users/albert/godev/src/runtime/extern.go /Users/albert/godev/src/runtime/fastlog2.go /Users/albert/godev/src/runtime/fastlog2table.go /Users/albert/godev/src/runtime/hash64.go /Users/albert/godev/src/runtime/hashmap.go /Users/albert/godev/src/runtime/hashmap_fast.go /Users/albert/godev/src/runtime/heapdump.go /Users/albert/godev/src/runtime/iface.go /Users/albert/godev/src/runtime/lfstack.go /Users/albert/godev/src/runtime/lfstack_64bit.go /Users/albert/godev/src/runtime/lock_sema.go /Users/albert/godev/src/runtime/malloc.go /Users/albert/godev/src/runtime/mbarrier.go /Users/albert/godev/src/runtime/mbitmap.go /Users/albert/godev/src/runtime/mcache.go /Users/albert/godev/src/runtime/mcentral.go /Users/albert/godev/src/runtime/mem_darwin.go /Users/albert/godev/src/runtime/mfinal.go /Users/albert/godev/src/runtime/mfixalloc.go /Users/albert/godev/src/runtime/mgc.go /Users/albert/godev/src/runtime/mgcmark.go /Users/albert/godev/src/runtime/mgcsweep.go /Users/albert/godev/src/runtime/mgcwork.go /Users/albert/godev/src/runtime/mheap.go /Users/albert/godev/src/runtime/mmap.go /Users/albert/godev/src/runtime/mprof.go /Users/albert/godev/src/runtime/msan0.go /Users/albert/godev/src/runtime/msize.go /Users/albert/godev/src/runtime/mstats.go /Users/albert/godev/src/runtime/mstkbar.go /Users/albert/godev/src/runtime/netpoll.go /Users/albert/godev/src/runtime/netpoll_kqueue.go /Users/albert/godev/src/runtime/os_darwin.go /Users/albert/godev/src/runtime/panic.go /Users/albert/godev/src/runtime/print.go /Users/albert/godev/src/runtime/proc.go /Users/albert/godev/src/runtime/race0.go /Users/albert/godev/src/runtime/rdebug.go /Users/albert/godev/src/runtime/rune.go /Users/albert/godev/src/runtime/runtime.go /Users/albert/godev/src/runtime/runtime1.go /Users/albert/godev/src/runtime/runtime2.go /Users/albert/godev/src/runtime/select.go /Users/albert/godev/src/runtime/sema.go /Users/albert/godev/src/runtime/signal1_unix.go /Users/albert/godev/src/runtime/signal2_unix.go /Users/albert/godev/src/runtime/signal_amd64x.go /Users/albert/godev/src/runtime/signal_darwin.go /Users/albert/godev/src/runtime/signal_darwin_amd64.go /Users/albert/godev/src/runtime/signal_unix.go /Users/albert/godev/src/runtime/sigpanic_unix.go /Users/albert/godev/src/runtime/sigqueue.go /Users/albert/godev/src/runtime/slice.go /Users/albert/godev/src/runtime/softfloat64.go /Users/albert/godev/src/runtime/sqrt.go /Users/albert/godev/src/runtime/stack.go /Users/albert/godev/src/runtime/string.go /Users/albert/godev/src/runtime/stubs.go /Users/albert/godev/src/runtime/stubs2.go /Users/albert/godev/src/runtime/stubs_asm.go /Users/albert/godev/src/runtime/symtab.go /Users/albert/godev/src/runtime/sys_nonppc64x.go /Users/albert/godev/src/runtime/sys_x86.go /Users/albert/godev/src/runtime/time.go /Users/albert/godev/src/runtime/trace.go /Users/albert/godev/src/runtime/traceback.go /Users/albert/godev/src/runtime/type.go /Users/albert/godev/src/runtime/typekind.go /Users/albert/godev/src/runtime/unaligned1.go /Users/albert/godev/src/runtime/vdso_none.go /Users/albert/godev/src/runtime/write_err.go: exit status 2

@ianlancetaylor
Copy link
Contributor

I have not seen similar reports from anyone else. Have you tried building on a different machine?

@n10v
Copy link
Contributor Author

n10v commented Sep 21, 2016

Not yet

@n10v
Copy link
Contributor Author

n10v commented Sep 21, 2016

But installation from homebrew works

@Thomasdezeeuw
Copy link
Contributor

@BoGeM I've hit a similar error to your first error, pulling the latest commit fixed it for me. Not sure what commit broke or fixed it though.

@n10v
Copy link
Contributor Author

n10v commented Sep 21, 2016

@Thomasdezeeuw Yes, It's not because of commit. I can't build any version of Go. I see same error, but in different places. This is build of Go 1.4.3:

src ((HEAD detached at go1.4.3) ?) sudo ./all.bash
Password:
# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
liblink
cmd/cc
cmd/gc
cmd/6l
cmd/6a
cmd/6c
/Users/albert/.go1.4/src/cmd/6c/txt.c:995:28: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
/Users/albert/.go1.4/src/cmd/6c/txt.c:1045:28: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
cmd/6g
runtime
errors
sync/atomic
sync
io
unicode
unicode/utf8
unicode/utf16
bytes
math
strings
strconv
bufio
sort
container/heap
encoding/base64
syscall
time
os
reflect
fmt
encoding
encoding/json
flag
path/filepath
path
io/ioutil
log
regexp/syntax
regexp
go/token
go/scanner
go/ast
go/parser
os/exec
os/signal
net/url
text/template/parse
text/template
go/doc
go/build
cmd/go

# Building packages and commands for darwin/amd64.
runtime
errors
sync/atomic
unicode
unicode/utf8
math
sync
sort
io
syscall
hash
container/heap
encoding
unicode/utf16
hash/crc32
container/list
bytes
strings
bufio
text/tabwriter
time
path
crypto/subtle
crypto/cipher
crypto/hmac
html
strconv
math/rand
compress/bzip2
hash/adler32
container/ring
hash/crc64
hash/fnv
image/color
math/cmplx
image/color/palette
reflect
regexp/syntax
os
crypto
crypto/md5
encoding/base64
net/url
path/filepath
regexp
crypto/aes
io/ioutil
os/exec
crypto/rc4
crypto/sha1
fmt
encoding/binary
crypto/sha256
crypto/sha512
encoding/pem
crypto/des
os/signal
cmd/pprof/internal/svg
encoding/ascii85
encoding/base32
image
index/suffixarray
runtime/race
cmd/internal/goobj
cmd/internal/rsc.io/arm/armasm
cmd/internal/rsc.io/x86/x86asm
debug/dwarf
debug/gosym
debug/plan9obj
debug/elf
debug/macho
debug/pe
flag
log
go/token
encoding/json
encoding/xml
go/scanner
cmd/internal/objfile
go/ast
cmd/addr2line
text/template/parse
compress/flate
go/parser
go/printer
text/template
compress/gzip
math/big
encoding/hex
mime
go/doc
cmd/cgo
go/format
cmd/fix
go/build
crypto/elliptic
encoding/asn1
crypto/rand
crypto/rsa
crypto/ecdsa
crypto/dsa
crypto/x509/pkix
net/http/internal
runtime/pprof
cmd/nm
cmd/gofmt
cmd/objdump
cmd/pack
cmd/pprof/internal/profile
runtime/cgo
html/template
cmd/pprof/internal/tempfile
cmd/yacc
cmd/pprof/internal/plugin
cmd/pprof/internal/symbolz
cmd/pprof/internal/report
cmd/pprof/internal/symbolizer
archive/tar
archive/zip
net
cmd/pprof/internal/commands
compress/lzw
cmd/pprof/internal/driver
compress/zlib
database/sql/driver
database/sql
encoding/csv
encoding/gob
image/draw
image/jpeg
image/gif
image/png
os/user
runtime/debug
testing
testing/iotest
testing/quick
text/scanner
crypto/x509
net/textproto
log/syslog
mime/multipart
net/mail
crypto/tls
net/http
net/smtp
cmd/go
cmd/pprof/internal/fetch
expvar
net/http/cgi
cmd/pprof
net/http/cookiejar
net/http/fcgi
net/http/httptest
net/http/httputil
net/http/pprof
net/rpc
net/rpc/jsonrpc

# Testing packages.
failed MSpanList_Insert 0x755bb8 0x1366cfe21c6b 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.MSpanList_Insert(0x6a2730, 0x755bb8)
    /Users/albert/.go1.4/src/runtime/mheap.c:692 +0x8f
runtime.MHeap_Free(0x6a26c0, 0x755bb8, 0x0)
    /Users/albert/.go1.4/src/runtime/mheap.c:500 +0x5b
runtime.MCentral_FreeSpan(0x6ac058, 0x755bb8, 0x2, 0xc2081e2000, 0xc2081e3000, 0x0, 0x64)
    /Users/albert/.go1.4/src/runtime/mcentral.c:181 +0x1bb
runtime.MSpan_Sweep(0x755bb8, 0xe100000000, 0x1)
    /Users/albert/.go1.4/src/runtime/mgc0.c:1099 +0x477
runtime.MHeap_Alloc(0x6a26c0, 0x1, 0x10000000004, 0x791d9)
    /Users/albert/.go1.4/src/runtime/mheap.c:240 +0x66
runtime.MCentral_CacheSpan(0x6a9478, 0x765790)
    /Users/albert/.go1.4/src/runtime/mcentral.c:85 +0x167
runtime.MCache_Refill(0x74e000, 0xc200000004, 0x765790)
    /Users/albert/.go1.4/src/runtime/mcache.c:90 +0xa0

goroutine 1 [running]:
runtime.switchtoM()
    /Users/albert/.go1.4/src/runtime/asm_amd64.s:198 fp=0xc2082a2cc0 sp=0xc2082a2cb8
runtime.mallocgc(0x30, 0x0, 0x3, 0x34eb00)
    /Users/albert/.go1.4/src/runtime/malloc.go:178 +0x849 fp=0xc2082a2d70 sp=0xc2082a2cc0
runtime.rawstring(0x2d, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/albert/.go1.4/src/runtime/string.go:195 +0x93 fp=0xc2082a2da0 sp=0xc2082a2d70
runtime.slicebytetostring(0xc2081bbfb0, 0x2d, 0x2d, 0x0, 0x0)
    /Users/albert/.go1.4/src/runtime/string.go:69 +0x4b fp=0xc2082a2e30 sp=0xc2082a2da0
strings.Join(0xc2082a30e8, 0x2, 0x2, 0x46dd50, 0x1, 0x0, 0x0)
    /Users/albert/.go1.4/src/strings/strings.go:400 +0x3a3 fp=0xc2082a2ef8 sp=0xc2082a2e30
path/filepath.Join(0xc2082a30e8, 0x2, 0x2, 0x0, 0x0)
    /Users/albert/.go1.4/src/path/filepath/path.go:202 +0x10d fp=0xc2082a2f88 sp=0xc2082a2ef8
main.isStale(0xc20810a400, 0xc20815e060, 0x0)
    /Users/albert/.go1.4/src/cmd/go/pkg.go:797 +0xa6c fp=0xc2082a31b0 sp=0xc2082a2f88
main.computeStale(0xc2082a3390, 0x1, 0x1)
    /Users/albert/.go1.4/src/cmd/go/pkg.go:699 +0x185 fp=0xc2082a3248 sp=0xc2082a31b0
main.(*builder).test(0xc20800a230, 0xc20806d400, 0x1bf08eb000, 0x0, 0x0, 0x0, 0x0)
    /Users/albert/.go1.4/src/cmd/go/test.go:783 +0x3e9a fp=0xc2082a3860 sp=0xc2082a3248
main.runTest(0x68e260, 0xc20800a020, 0x5, 0x5)
    /Users/albert/.go1.4/src/cmd/go/test.go:441 +0x19f2 fp=0xc2082a3d98 sp=0xc2082a3860
main.main()
    /Users/albert/.go1.4/src/cmd/go/main.go:163 +0x608 fp=0xc2082a3f98 sp=0xc2082a3d98
runtime.main()
    /Users/albert/.go1.4/src/runtime/proc.go:63 +0xf3 fp=0xc2082a3fe0 sp=0xc2082a3f98
runtime.goexit()
    /Users/albert/.go1.4/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc2082a3fe8 sp=0xc2082a3fe0

goroutine 5 [syscall]:
os/signal.loop()
    /Users/albert/.go1.4/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /Users/albert/.go1.4/src/os/signal/signal_unix.go:27 +0x35

real    0m0,283s
user    0m0,208s
sys 0m0,077s

@n10v
Copy link
Contributor Author

n10v commented Sep 21, 2016

This issue started to occur after the update to macOS Sierra

@vcabbage
Copy link
Member

fwiw, I was able to compile and run tests successgully on macOS Sierra using 1.7.1 to bootstrap. Trying to use 1.4.3 to bootstrap resulted in similar looking errors, which I assume is due to these issues: #16352 (comment). From the paths displayed in the traceback it looks like you're using 1.4 to compile. Have you tried setting GOROOT_BOOTSTRAP?

@n10v
Copy link
Contributor Author

n10v commented Sep 21, 2016

Hm, my GOROOT_BOOTSTRAP set to 1.4.3. I'll try set it to 1.7.1, but later

@n10v
Copy link
Contributor Author

n10v commented Sep 22, 2016

Yes, everything works fine with GOROOT_BOOTSTRAP set to 1.7.1

@shakeel
Copy link

shakeel commented Oct 10, 2016

Fuchsia's ninja build fails with panic "fatal error: MSpanList_Insert". This error occurs when the ninja build is trying to compile mojo clients. The failure occurs consistently after upgrading to MacOS Sierra.

/usr/bin/env ../../mojo/public/tools/bindings/mojom_tool.py gen --src-root-path ../../ -I ../../ -I ../../ --output-dir /Users/shakeel/google/fuchsia/out/debug-x86-64/gen --no-gen-imports --generators legacy,c,go --gen-arg dart_ignore-package-annotations ../../mojo/public/interfaces/bindings/tests/versioning_test_client.mojom
failed MSpanList_Insert 0x4320d0 0x1d9fe141a5ec0 0x0 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.throw(0x2a1af0, 0x10)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/panic.go:530 +0x90
runtime.(_mSpanList).insert(0x3c3ec8, 0x4320d0)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/mheap.go:933 +0x293
runtime.(_mheap).freeSpanLocked(0x3c36c0, 0x4320d0, 0x100, 0x0)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/mheap.go:809 +0x4be
runtime.(_mheap).grow(0x3c36c0, 0x80, 0x0)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/mheap.go:675 +0x2a0
runtime.(_mheap).allocSpanLocked(0x3c36c0, 0x80, 0xc81ffcdc00)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/mheap.go:553 +0x4e3
runtime.(_mheap).alloc_m(0x3c36c0, 0x80, 0x100000000, 0x3c5790)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/mheap.go:437 +0x119
runtime.(_mheap).alloc.func1()
/ssd/fuchsia/buildtools/linux64/go/src/runtime/mheap.go:502 +0x41
runtime.systemstack(0xc820039ee0)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/asm_amd64.s:307 +0xab
runtime.(*mheap).alloc(0x3c36c0, 0x80, 0x10100000000, 0x1ce1c)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/mheap.go:503 +0x63
runtime.largeAlloc(0x100000, 0x1, 0x20)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/malloc.go:766 +0xb3
runtime.mallocgc.func3()
/ssd/fuchsia/buildtools/linux64/go/src/runtime/malloc.go:664 +0x33
runtime.systemstack(0xc8200016c0)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/asm_amd64.s:291 +0x79
runtime.mstart()
/ssd/fuchsia/buildtools/linux64/go/src/runtime/proc.go:1048

goroutine 1 [running]:
runtime.systemstack_switch()
/ssd/fuchsia/buildtools/linux64/go/src/runtime/asm_amd64.s:245 fp=0xc82004c968 sp=0xc82004c960
runtime.mallocgc(0x100000, 0x1c2260, 0x1, 0xc820619590)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/malloc.go:665 +0x9eb fp=0xc82004ca40 sp=0xc82004c968
runtime.newarray(0x1c2260, 0x20000, 0xc820619590)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/malloc.go:798 +0xc9 fp=0xc82004ca80 sp=0xc82004ca40
runtime.makeslice(0x1b8de0, 0x20000, 0x20000, 0x0, 0x0, 0x0)
/ssd/fuchsia/buildtools/linux64/go/src/runtime/slice.go:32 +0x165 fp=0xc82004cad0 sp=0xc82004ca80
compress/flate.(_compressor).init(0xc82061b0e0, 0x485ee8, 0xc820626230, 0x9, 0x0, 0x0)
/ssd/fuchsia/buildtools/linux64/go/src/compress/flate/deflate.go:410 +0x849 fp=0xc82004cc68 sp=0xc82004cad0
compress/flate.NewWriter(0x485ee8, 0xc820626230, 0x9, 0xa, 0x0, 0x0)
/ssd/fuchsia/buildtools/linux64/go/src/compress/flate/deflate.go:487 +0x64 fp=0xc82004cca8 sp=0xc82004cc68
compress/gzip.(_Writer).Write(0xc820644000, 0xc82063e000, 0x28d8, 0x3000, 0x0, 0x0, 0x0)
/ssd/fuchsia/buildtools/linux64/go/src/compress/gzip/gzip.go:211 +0x528 fp=0xc82004cd68 sp=0xc82004cca8
mojom/mojom_tool/serialization.translateMojomFile(0xc820018240, 0xc820612d80, 0xc820064540, 0x60, 0xc820018258, 0xc820612048, 0xc820613520, 0x0, 0xc820613560, 0xc820613580, ...)
/ssd/fuchsia/mojom/src/mojom/mojom_tool/serialization/serialization.go:243 +0x1610 fp=0xc82004d510 sp=0xc82004cd68
mojom/mojom_tool/serialization.translateDescriptor(0xc820062070, 0x1)
/ssd/fuchsia/mojom/src/mojom/mojom_tool/serialization/serialization.go:109 +0x4ca fp=0xc82004d840 sp=0xc82004d510
mojom/mojom_tool/serialization.serialize(0xc820062070, 0x1010100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/ssd/fuchsia/mojom/src/mojom/mojom_tool/serialization/serialization.go:62 +0xc7 fp=0xc82004d8e0 sp=0xc82004d840
mojom/mojom_tool/serialization.Serialize(0xc820062070, 0xc82000a100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/ssd/fuchsia/mojom/src/mojom/mojom_tool/serialization/serialization.go:42 +0x75 fp=0xc82004d930 sp=0xc82004d8e0
main.parse(0xc82000a1f0, 0x1, 0x1, 0xc82000e3e0, 0x2, 0x2, 0xc82004dd80, 0x0, 0x0, 0x0, ...)
/ssd/fuchsia/mojom/src/mojom/mojom_tool/parse_cmd.go:118 +0x5ba fp=0xc82004db70 sp=0xc82004d930
main.genCmd(0xc82000a100, 0x10, 0x10)
/ssd/fuchsia/mojom/src/mojom/mojom_tool/gen_cmd.go:119 +0x614 fp=0xc82004de10 sp=0xc82004db70
main.(*commandSet).RunCommand(0xc82000e140, 0xc82000a100, 0x10, 0x10)
/ssd/fuchsia/mojom/src/mojom/mojom_tool/mojom_main.go:98 +0x514 fp=0xc82004def8 sp=0xc82004de10
main.main()
/ssd/fuchsia/mojom/src/mojom/mojom_tool/mojom_main.go:36 +0x1c7 fp=0xc82004df40 sp=0xc82004def8
runtime.main()
/ssd/fuchsia/buildtools/linux64/go/src/runtime/proc.go:188 +0x2b0 fp=0xc82004df90 sp=0xc82004df40
runtime.goexit()
/ssd/fuchsia/buildtools/linux64/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc82004df98 sp=0xc82004df90
[674/7323] ACTION //mojo/public/interfaces/binding...terfaces__generator(//build/toolchain/fuchsia:x64)
ninja: build stopped: subcommand failed.

@mikioh mikioh changed the title compile: can't build go distribution runtime: can't build go distribution caused by #16272 and #16570 Oct 12, 2016
@hogemon
Copy link

hogemon commented Oct 22, 2016

How to set GOROOT_BOOTSTRAP to 1.7.1?

@dixudx
Copy link

dixudx commented Oct 22, 2016

Just set GOROOT_BOOTSTRAP to your go 1.7.1 GOROOT

export GOROOT_BOOTSTRAP=$GOROOT

@davecheney
Copy link
Contributor

@dixudx that advice is incorrect.

@hogemon Please do not comment on closed issues. We don't the issue tracker to ask questions. Please see https://golang.org/wiki/Questions for good places to ask. Thanks.

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