On Wed, Jan 15, 2025 at 6:49 PM John <johnsiil...@gmail.com> wrote: > > I'm running into a fault now when trying to run `go test -race`/ > > I get the same when I disable CGO (because it lists a CGO signal in the > fault): > `CGO_ENABLED=0 go test -c -race` > > I've attempted to build a binary out of it and run it, with the same results. > This is not happening on all tests I attempt, just some tests. > > I don' know of any C code I'm using, but I am importing various OTEL > packages, which might have CGO somewhere. > > I'm not sure where to start debugging this, the internet has pointed to other > issues similar to this, not exact and none with circumstances that are the > same. > > Here is the fault: > > SIGSEGV: segmentation violation > PC=0x10012c23c m=0 sigcode=2 addr=0x10 > signal arrived during cgo execution > > goroutine 1 gp=0xc0000021c0 m=0 mp=0x102ce76e0 [syscall, locked to thread]: > runtime.cgocall(0x10182f3e0, 0x0) > /usr/local/go/src/runtime/cgocall.go:167 +0x58 fp=0xc000095f40 > sp=0xc000095f00 pc=0x1001dd068 > runtime.main() > /usr/local/go/src/runtime/proc.go:243 +0x210 fp=0xc000095fd0 > sp=0xc000095f40 pc=0x1001a9dd0 > runtime.goexit({}) > /usr/local/go/src/runtime/asm_arm64.s:1223 +0x4 fp=0xc000095fd0 > sp=0xc000095fd0 pc=0x1001ec9b4
For what it's worth, this is a cgo call made by the Go runtime at startup time for a program that uses cgo. I don't know how it could happen if CGO_ENABLED=0. It's a simple call that is made after all init functions are run. It's hard to see how it could crash. It might help to run the program under the debugger and look at the instructions and stack at the point of the crash. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVfvBAu1oMenahOBdXswKvS2k6BLSkRkRo8Nj3rO9tp%3Dg%40mail.gmail.com.