dongzhu6900 2016-08-02 20:27
浏览 67
已采纳

更新到macOS beta 4后,进行测试-cover会抛出“致命错误:运行时执行期间出现意外信号”

Go build and go test are still working.

Before updating to macOS beta I had no problems using the test coverage tools.

"go test" is working fine; however, all of the coverage test commands are throwing this error (go test -coverprofile=coverage.out throws the same issue).

If anyone has any idea how to fix this, I would really appreciate it!

$ 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
$
  • 写回答

1条回答 默认 最新

  • douyong1885 2017-01-06 13:08
    关注

    Yes, there is some issue with the go runtime. I was getting this issue after upgrading to Sierra macOS version.

    There is a lengthy discussion on what was the cause at this link;

    Basically, just changing the position of the "defer" statement resolved this issue.More details on change is here.

    I resolved this issue by installing "go1.8beta2.darwin-amd64.pkg" beta version of Go. I am not facing this issue anymore.

    NOTE: this issue is not fixed in 1.7 as per this discussion.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于#flink#的问题:关于docker部署flink集成hadoop的yarn,请教个问题flink启动yarn-session.sh连不上hadoop
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题