Go build和go测试仍然有效。
在更新到macOS beta之前,我使用测试覆盖率工具没有任何问题。
如果有人知道如何解决这个问题,我真的很感激!
$ go test -cover
go build github.com/hunteramericano/ErrorQuiver: /usr/local/Cellar/go/1.6.3/libexec/pkg/tool/darwin_amd64/cover: signal:
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x57060029ec pc=0x17cc70]
goroutine 9 [running]:
runtime.throw(0x689a00, 0x2a)
/usr/local/Cellar/go/1.6.3/libexec/src/runtime/panic.go:547 +0x90 fp=0xc820037870 sp=0xc820037858
runtime.sigpanic()
/usr/local/Cellar/go/1.6.3/libexec/src/runtime/sigpanic_unix.go:12 +0x5a fp=0xc8200378c0 sp=0xc820037870
sync.(*Pool).Get(0x882700, 0x0, 0x0)
/usr/local/Cellar/go/1.6.3/libexec/src/sync/pool.go:102 +0x40 fp=0xc820037910 sp=0xc8200378c0
fmt.newPrinter(0x10)
/usr/local/Cellar/go/1.6.3/libexec/src/fmt/print.go:133 +0x27 fp=0xc820037950 sp=0xc820037910
fmt.Fprintf(0xde5230, 0xc82017a150, 0x638380, 0x17, 0xc820037af0, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.6.3/libexec/src/fmt/print.go:187 +0x30 fp=0xc820037998 sp=0xc820037950
main.(*builder).runTest(0xc82017aaf0, 0xc82005e410, 0x0, 0x0)
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/test.go:1070 +0x463 fp=0xc820037e00 sp=0xc820037998
main.(*builder).do.func1(0xc82005e410)
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/build.go:1257 +0x3b2 fp=0xc820037ec0 sp=0xc820037e00
main.(*builder).do.func2(0xc82038ae20, 0xc82017aaf0, 0xc820428400)
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/build.go:1314 +0x156 fp=0xc820037f98 sp=0xc820037ec0
runtime.goexit()
/usr/local/Cellar/go/1.6.3/libexec/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc820037fa0 sp=0xc820037f98
created by main.(*builder).do
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/build.go:1320 +0x39e
goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc82038ae2c)
/usr/local/Cellar/go/1.6.3/libexec/src/runtime/sema.go:47 +0x26
sync.(*WaitGroup).Wait(0xc82038ae20)
/usr/local/Cellar/go/1.6.3/libexec/src/sync/waitgroup.go:127 +0xb4
main.(*builder).do(0xc82017aaf0, 0xc82005e680)
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/build.go:1323 +0x3c6
main.runTest(0x889620, 0xc82000a230, 0x1, 0x1)
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/test.go:595 +0x2836
main.main()
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/main.go:181 +0x783
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/Cellar/go/1.6.3/libexec/src/runtime/asm_amd64.s:1998 +0x1
goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
/usr/local/Cellar/go/1.6.3/libexec/src/runtime/sigqueue.go:116 +0x132
os/signal.loop()
/usr/local/Cellar/go/1.6.3/libexec/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
/usr/local/Cellar/go/1.6.3/libexec/src/os/signal/signal_unix.go:28 +0x37
goroutine 7 [select]:
main.(*builder).do.func2(0xc82038ae20, 0xc82017aaf0, 0xc820428400)
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/build.go:1304 +0x1cf
created by main.(*builder).do
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/build.go:1320 +0x39e
goroutine 8 [select]:
main.(*builder).do.func2(0xc82038ae20, 0xc82017aaf0, 0xc820428400)
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/build.go:1304 +0x1cf
created by main.(*builder).do
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/build.go:1320 +0x39e
goroutine 10 [select]:
main.(*builder).do.func2(0xc82038ae20, 0xc82017aaf0, 0xc820428400)
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/build.go:1304 +0x1cf
created by main.(*builder).do
/usr/local/Cellar/go/1.6.3/libexec/src/cmd/go/build.go:1320 +0x39e
$
答案 0 :(得分:0)
是的,go运行时存在一些问题。升级到Sierra macOS版本后,我遇到了这个问题。
关于这个link;
的原因,有一个冗长的讨论基本上,只是更改“延迟”语句的位置就解决了这个问题。更改的更多细节是here。
我通过安装Go的“go1.8beta2.darwin-amd64.pkg”测试版解决了这个问题。我不再面对这个问题了。
注意:根据this discussion,此问题未在1.7中修复。