docker-archive / deploykit

A toolkit for creating and managing declarative, self-healing infrastructure.
Apache License 2.0
2.25k stars 262 forks source link

Fails to build with Go 1.6 on MacOS Sierra #205

Closed alexellis closed 8 years ago

alexellis commented 8 years ago
go version go1.6.2 darwin/amd64
make -k infrakit
+ clean
mkdir -p ./infrakit
rm -rf ./infrakit/*
+ vendor-sync
+ build
+ infrakit
# github.com/docker/infrakit/vendor/golang.org/x/text/unicode/norm
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x1f41ead02f9e pc=0xf0eb]

runtime stack:
runtime.throw(0x4971e0, 0x2a)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/panic.go:547 +0x90
runtime.sigpanic()
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/sigpanic_unix.go:12 +0x5a
runtime.unlock(0x984540)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/lock_sema.go:107 +0x14b
runtime.(*mheap).alloc_m(0x984540, 0x1, 0xf, 0xc820000180)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/mheap.go:492 +0x314
runtime.(*mheap).alloc.func1()
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/mheap.go:502 +0x41
runtime.systemstack(0xc820453e58)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/asm_amd64.s:307 +0xab
runtime.(*mheap).alloc(0x984540, 0x1, 0x1000000000f, 0xed8f)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/mheap.go:503 +0x63
runtime.(*mcentral).grow(0x985ea0, 0x0)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/mcentral.go:209 +0x93
runtime.(*mcentral).cacheSpan(0x985ea0, 0xc820442000)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/mcentral.go:89 +0x47d
runtime.(*mcache).refill(0xaf6e10, 0xc80000000f, 0xdf3070)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/mcache.go:119 +0xcc
runtime.mallocgc.func2()
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/malloc.go:642 +0x2b
runtime.systemstack(0xc820020000)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/asm_amd64.s:291 +0x79
runtime.mstart()
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/proc.go:1051

goroutine 1 [running]:
runtime.systemstack_switch()
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/asm_amd64.s:245 fp=0xc822bb50f8 sp=0xc822bb50f0
runtime.mallocgc(0xe0, 0x425e40, 0x1, 0xc8230d9ea0)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/malloc.go:643 +0x869 fp=0xc822bb51d0 sp=0xc822bb50f8
runtime.newobject(0x425e40, 0xc8230d9ea0)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/malloc.go:781 +0x42 fp=0xc822bb51f8 sp=0xc822bb51d0
cmd/compile/internal/gc.regopt.func1(0x0, 0x0)
    /usr/local/Cellar/go/1.6.2/libexec/src/cmd/compile/internal/gc/reg.go:1064 +0x2f fp=0xc822bb5210 sp=0xc822bb51f8
cmd/compile/internal/gc.Flowstart(0xc8230e59e0, 0x4c4778, 0x20)
    /usr/local/Cellar/go/1.6.2/libexec/src/cmd/compile/internal/gc/popt.go:288 +0x90c fp=0xc822bb5320 sp=0xc822bb5210
cmd/compile/internal/gc.regopt(0xc8230e59e0)
    /usr/local/Cellar/go/1.6.2/libexec/src/cmd/compile/internal/gc/reg.go:1064 +0x3d0 fp=0xc822bb57d8 sp=0xc822bb5320
cmd/compile/internal/gc.compile(0xc8202eb710)
    /usr/local/Cellar/go/1.6.2/libexec/src/cmd/compile/internal/gc/pgen.go:521 +0xe6d fp=0xc822bb5a48 sp=0xc822bb57d8
cmd/compile/internal/gc.funccompile(0xc8202eb710)
    /usr/local/Cellar/go/1.6.2/libexec/src/cmd/compile/internal/gc/dcl.go:1450 +0x1c0 fp=0xc822bb5ac0 sp=0xc822bb5a48
cmd/compile/internal/gc.Main()
    /usr/local/Cellar/go/1.6.2/libexec/src/cmd/compile/internal/gc/lex.go:472 +0x2116 fp=0xc822bb5de0 sp=0xc822bb5ac0
cmd/compile/internal/amd64.Main()
    /usr/local/Cellar/go/1.6.2/libexec/src/cmd/compile/internal/amd64/galign.go:127 +0x58d fp=0xc822bb5e48 sp=0xc822bb5de0
main.main()
    /usr/local/Cellar/go/1.6.2/libexec/src/cmd/compile/main.go:32 +0x395 fp=0xc822bb5f20 sp=0xc822bb5e48
runtime.main()
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/proc.go:188 +0x2b0 fp=0xc822bb5f70 sp=0xc822bb5f20
runtime.goexit()
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc822bb5f78 sp=0xc822bb5f70
make: *** [infrakit] Error 1
wfarner commented 8 years ago

Is this result repeatable for you? This appears to be a build toolchain issue, i'm also wondering if it recurs on go 1.7.

annismckenzie commented 8 years ago

Go 1.6.2 simply does not work correctly on Sierra – see the note here: https://golang.org/doc/go1.7#ports. If you upgraded to Sierra, you need to upgrade to Go 1.7.1 and you also need to delete your old binaries in $GOPATH/bin. There's multiple problems with Go binaries built on pre-Sierra systems; inconsistent mutex states, segfaults, and others. Unfortunately, nothing the op can do here.

alexellis commented 8 years ago

Hi guys - like I mentioned, the Go 1.7.1 binaries fixed everything. Happy to close the issue - but it may be worth updating the docs.

wfarner commented 8 years ago

Thanks, folks! I've added a doc line to warn others, feel free to comment on the PR if you'd like to massage the wording.