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
goroutine 18 gp=0xc000102380 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/usr/local/go/src/runtime/proc.go:424 +0xc8 fp=0xc000080790
sp=0xc000080770 pc=0x1001e3c78
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:430
runtime.forcegchelper()
/usr/local/go/src/runtime/proc.go:337 +0xb8 fp=0xc0000807d0
sp=0xc000080790 pc=0x1001aa1b8
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1223 +0x4 fp=0xc0000807d0
sp=0xc0000807d0 pc=0x1001ec9b4
created by runtime.init.7 in goroutine 1
/usr/local/go/src/runtime/proc.go:325 +0x24
goroutine 19 gp=0xc000102540 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/usr/local/go/src/runtime/proc.go:424 +0xc8 fp=0xc000096f60
sp=0xc000096f40 pc=0x1001e3c78
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:430
runtime.bgsweep(0xc000112000)
/usr/local/go/src/runtime/mgcsweep.go:277 +0xa0 fp=0xc000096fb0
sp=0xc000096f60 pc=0x100191ea0
runtime.gcenable.gowrap1()
/usr/local/go/src/runtime/mgc.go:204 +0x28 fp=0xc000096fd0
sp=0xc000096fb0 pc=0x100185df8
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1223 +0x4 fp=0xc000096fd0
sp=0xc000096fd0 pc=0x1001ec9b4
created by runtime.gcenable in goroutine 1
/usr/local/go/src/runtime/mgc.go:204 +0x6c
goroutine 20 gp=0xc000102700 m=nil [GC scavenge wait]:
runtime.gopark(0xc000112000?, 0x101cb09d8?, 0x1?, 0x0?, 0xc000102700?)
/usr/local/go/src/runtime/proc.go:424 +0xc8 fp=0xc000090f60
sp=0xc000090f40 pc=0x1001e3c78
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:430
runtime.(*scavengerState).park(0x102ce6000)
/usr/local/go/src/runtime/mgcscavenge.go:425 +0x5c fp=0xc000090f90
sp=0xc000090f60 pc=0x10018f89c
runtime.bgscavenge(0xc000112000)
/usr/local/go/src/runtime/mgcscavenge.go:653 +0x44 fp=0xc000090fb0
sp=0xc000090f90 pc=0x10018fde4
runtime.gcenable.gowrap2()
/usr/local/go/src/runtime/mgc.go:205 +0x28 fp=0xc000090fd0
sp=0xc000090fb0 pc=0x100185d98
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1223 +0x4 fp=0xc000090fd0
sp=0xc000090fd0 pc=0x1001ec9b4
created by runtime.gcenable in goroutine 1
/usr/local/go/src/runtime/mgc.go:205 +0xac
r0 0x0
r1 0x10182f3f0
r2 0xc000095ef0
r3 0x102ce6a80
r4 0x110
r5 0xc000095000
r6 0x1
r7 0x0
r8 0x102ce76e0
r9 0x10012c22c
r10 0x102ce76e0
r11 0x102ce6a80
r12 0x1000000000000000
r13 0x16fcd5e70
r14 0xffffff0000000000
r15 0x4
r16 0xc0000956c0
r17 0x206536cc0
r18 0x0
r19 0x10182f3f0
r20 0x0
r21 0x16fcd5e50
r22 0x102d1a604
r23 0x16fcd5fd8
r24 0x19429e000
r25 0x0
r26 0x102009c88
r27 0x102d1a000
r28 0x102ce6a80
r29 0x16fcd5de8
lr 0x1001ed7b8
sp 0x16fcd5dc0
pc 0x10012c23c
fault 0x10
My environment:
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/jdoak/Library/Caches/go-build'
GOENV='/Users/jdoak/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/jdoak/go/pkg/mod'
GONOPROXY='none'
GONOSUMDB='[keeping private]'
GOOS='darwin'
GOPATH='[keeping private]'
GOPRIVATE='[keeping private]'
GOPROXY='[keeping private]|https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.23.4'
GODEBUG=''
GOTELEMETRY='on'
GOTELEMETRYDIR='/Users/jdoak/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='0'
GOMOD='[keeping private]'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -fno-caret-diagnostics -Qunused-arguments
-Wl,--no-gc-sections -fmessage-length=0
-ffile-prefix-map=/var/folders/rd/hbhb8s197633_f8ncy6fmpqr0000gn/T/go-build3846121577=/tmp/go-build
-gno-record-gcc-switches -fno-common'
Any help on where to start debugging this is appreciated.
--
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/golang-nuts/aa630136-628b-4b70-aac8-ca2f0a9069a0n%40googlegroups.com.