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 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)
  • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误
  • ¥30 3天&7天&&15天&销量如何统计同一行
  • ¥30 帮我写一段可以读取LD2450数据并计算距离的Arduino代码
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
  • ¥15 vs2019中数据导出问题
  • ¥20 云服务Linux系统TCP-MSS值修改?
  • ¥20 关于#单片机#的问题:项目:使用模拟iic与ov2640通讯环境:F407问题:读取的ID号总是0xff,自己调了调发现在读从机数据时,SDA线上并未有信号变化(语言-c语言)