So I'm receiving a fault when running go test --race my/package/ya
. The output looks like this:
unexpected fault address 0x200015a490e0
fatal error: fault
[signal 0xb code=0x1 addr=0x200015a490e0 pc=0x47399ac]
goroutine 1 [running, locked to thread]:
runtime.throw(0x0, 0xc820000180)
/opt/go1.6/src/runtime/panic.go:530 +0x90 fp=0x7fff5fbfeb80 sp=0x7fff5fbfeb68
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/opt/go1.6/src/runtime/asm_amd64.s:1998 +0x1
I've tried catching this fault in a TestMain, but apparently my TestMain doesn't get called. I've tried using -trace to generate a trace file, but the file never is written although the testing file pkg.out is written. I'm not entirely sure where to go from here since the output doesn't really provide many hints. I suppose I can attempt gdb and delve, but haven't had luck with either of those in the past.
I'm wondering if there is something else to consider?
Additional notes: this fault only occurs when the --race flag is present. Go 1.6 darwin/amd64.