Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: race detector SIGABRT or SIGSEGV on macOS Monterey #49138

Open
zchee opened this issue Oct 24, 2021 · 33 comments
Open

runtime: race detector SIGABRT or SIGSEGV on macOS Monterey #49138

zchee opened this issue Oct 24, 2021 · 33 comments

Comments

@zchee
Copy link
Contributor

@zchee zchee commented Oct 24, 2021

First, I know macOS Monterey is still beta.
But this problem started after Monterey beta 2 21A5268h (beta 1 21A5248p works), and Apple has been released RC2, so posted (share) this issue.
Note that the bellow output is in the macOS Monterey RC2 21A559, real MacBook Pro, not VM.

The issue template generated go bug command with go1.17.2, but occurred in all of the Go versions.


What version of Go are you using (go version)?

$ go version
go version go1.17.2 darwin/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/zchee/.cache/go/go-build"
GOENV="/Users/zchee/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/zchee/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/zchee/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/zchee/go1.17.2"
GOSUMDB="sum.golang.org"
GOTMPDIR="/tmp/go"
GOTOOLDIR="/Users/zchee/go1.17.2/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17.2"
GCCGO="gccgo"
AR="/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar"
CC="/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
CXX="/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go/go-build3783056389=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version devel go1.18-16318df4a2 Sat Oct 23 16:18:19 2021 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.17.2
uname -v: Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64
ProductName:	macOS
ProductVersion:	12.0.1
BuildVersion:	21A559
gdb --version: GNU gdb (GDB) 11.1

external info:

sw_vers
$ sw_vers
ProductName:	macOS
ProductVersion:	12.0.1
BuildVersion:	21A559
xcodebuild -version
$ xcodebuild -version
Xcode 13.0
Build version 13A5212g

What did you do?

Bootstrapped Go toolchain will same error, but here is reproducible setup:

$ pwd
/tmp
$ curl -LO https://golang.org/dl/go1.17.2.darwin-amd64.tar.gz
$ tar xf go1.17.2.darwin-amd64.tar.gz
$ mv go ~/go1.17.2
$ export PATH="$HOME/go1.17.2/bin:$PATH"
$ go version
go version go1.17.2 darwin/amd64
# cleanup
$ go clean -v -x -cache -testcache -modcache

Run some tests (snip passes testcase):
Copy and paste with ... 2>&1 | pbcopy.

go test -v -race -count=1 -run=TestCurrent os/user
=== RUN   TestCurrent
objc[9765]: Attempt to use unknown class 0x7ff84f9ba360.
SIGABRT: abort
PC=0x7ff80e186dfe m=0 sigcode=0

goroutine 0 [idle]:
runtime: unknown pc 0x7ff80e186dfe
stack: frame={sp:0x7ff7bfef97a8, fp:0x0} stack=[0x7ff7bfe7b848,0x7ff7bfefa8b0)
0x00007ff7bfef96a8:  0x0000000000000002  0x0000000000000002 
0x00007ff7bfef96b8:  0x0000000001d78000  0x0000000001d78400 
0x00007ff7bfef96c8:  0x0000000000000003  0x00007ff7bfef9730 
0x00007ff7bfef96d8:  0x00007ff80dfbc639  0x0000000000000000 
0x00007ff7bfef96e8:  0xf6814000c0001003  0x000000000000ffff 
0x00007ff7bfef96f8:  0x0000000000000030  0x0000000000000000 
0x00007ff7bfef9708:  0x000000000000002d  0x000000000000002d 
0x00007ff7bfef9718:  0x0000000000000000  0x0000000001d78000 
0x00007ff7bfef9728:  0x00007ff84f9ce000  0x00007ff7bfef9760 
0x00007ff7bfef9738:  0x00007ff80dfbc566  0x00007ff80dfbc52e 
0x00007ff7bfef9748:  0x000000000000002d  0x0000000000000001 
0x00007ff7bfef9758:  0x00007ff84f9ce000  0x00007ff7bfef97a0 
0x00007ff7bfef9768:  0x00007ff80dfd8ad6  0x000000000000002c 
0x00007ff7bfef9778:  0x000000000000002d  0x0000600003300000 
0x00007ff7bfef9788:  0x0000000000000003  0x0000600002c00000 
0x00007ff7bfef9798:  0x0000000000000000  0x00007ff7bfef97d0 
0x00007ff7bfef97a8: <0x00007ff80e188893  0x0000000000000000 
0x00007ff7bfef97b8:  0x00000020bfef9810  0x0000600002c00000 
0x00007ff7bfef97c8:  0x00007ff7bfef9810  0x0000600003300000 
0x00007ff7bfef97d8:  0x0000000000000003  0x0000000000000080 
0x00007ff7bfef97e8:  0x0000000000000001  0x00007ff7bfef9800 
0x00007ff7bfef97f8:  0x00007ff80e188843  0x00007ff7bfef9840 
0x00007ff7bfef9808:  0x00007ff80e054bce  0x0000600002c00080 
0x00007ff7bfef9818:  0x0000000001000000  0x0000600002c00000 
0x00007ff7bfef9828:  0x00007ffffffffff8  0x00007ff84f9ba360 
0x00007ff7bfef9838:  0x0000000080080001  0x00007ff7bfef9920 
0x00007ff7bfef9848:  0x00007ff80e054b5c  0x0000003000000010 
0x00007ff7bfef9858:  0x00007ff7bfef9930  0x00007ff7bfef9870 
0x00007ff7bfef9868:  0x0000000042000000  0x000000000e235e98 
0x00007ff7bfef9878:  0x00007ff84f9ba360  0x00007ff84f9ba360 
0x00007ff7bfef9888:  0x0000000000000001  0x00000000ffffffff 
0x00007ff7bfef9898:  0x0000000000000000  0x00007ff7bfef98c0 
runtime: unknown pc 0x7ff80e186dfe
stack: frame={sp:0x7ff7bfef97a8, fp:0x0} stack=[0x7ff7bfe7b848,0x7ff7bfefa8b0)
0x00007ff7bfef96a8:  0x0000000000000002  0x0000000000000002 
0x00007ff7bfef96b8:  0x0000000001d78000  0x0000000001d78400 
0x00007ff7bfef96c8:  0x0000000000000003  0x00007ff7bfef9730 
0x00007ff7bfef96d8:  0x00007ff80dfbc639  0x0000000000000000 
0x00007ff7bfef96e8:  0xf6814000c0001003  0x000000000000ffff 
0x00007ff7bfef96f8:  0x0000000000000030  0x0000000000000000 
0x00007ff7bfef9708:  0x000000000000002d  0x000000000000002d 
0x00007ff7bfef9718:  0x0000000000000000  0x0000000001d78000 
0x00007ff7bfef9728:  0x00007ff84f9ce000  0x00007ff7bfef9760 
0x00007ff7bfef9738:  0x00007ff80dfbc566  0x00007ff80dfbc52e 
0x00007ff7bfef9748:  0x000000000000002d  0x0000000000000001 
0x00007ff7bfef9758:  0x00007ff84f9ce000  0x00007ff7bfef97a0 
0x00007ff7bfef9768:  0x00007ff80dfd8ad6  0x000000000000002c 
0x00007ff7bfef9778:  0x000000000000002d  0x0000600003300000 
0x00007ff7bfef9788:  0x0000000000000003  0x0000600002c00000 
0x00007ff7bfef9798:  0x0000000000000000  0x00007ff7bfef97d0 
0x00007ff7bfef97a8: <0x00007ff80e188893  0x0000000000000000 
0x00007ff7bfef97b8:  0x00000020bfef9810  0x0000600002c00000 
0x00007ff7bfef97c8:  0x00007ff7bfef9810  0x0000600003300000 
0x00007ff7bfef97d8:  0x0000000000000003  0x0000000000000080 
0x00007ff7bfef97e8:  0x0000000000000001  0x00007ff7bfef9800 
0x00007ff7bfef97f8:  0x00007ff80e188843  0x00007ff7bfef9840 
0x00007ff7bfef9808:  0x00007ff80e054bce  0x0000600002c00080 
0x00007ff7bfef9818:  0x0000000001000000  0x0000600002c00000 
0x00007ff7bfef9828:  0x00007ffffffffff8  0x00007ff84f9ba360 
0x00007ff7bfef9838:  0x0000000080080001  0x00007ff7bfef9920 
0x00007ff7bfef9848:  0x00007ff80e054b5c  0x0000003000000010 
0x00007ff7bfef9858:  0x00007ff7bfef9930  0x00007ff7bfef9870 
0x00007ff7bfef9868:  0x0000000042000000  0x000000000e235e98 
0x00007ff7bfef9878:  0x00007ff84f9ba360  0x00007ff84f9ba360 
0x00007ff7bfef9888:  0x0000000000000001  0x00000000ffffffff 
0x00007ff7bfef9898:  0x0000000000000000  0x00007ff7bfef98c0 

goroutine 19 [syscall]:
runtime.cgocall(0x10011c0, 0xc000060a10)
	/Users/zchee/go1.17.2/src/runtime/cgocall.go:156 +0x6e fp=0xc0000609e8 sp=0xc0000609b0 pc=0x10445ce
os/user._Cfunc_mygetpwuid_r(0x1f6, 0xc000116140, 0xa008200, 0x1000, 0xc000130030)
	_cgo_gotypes.go:181 +0x85 fp=0xc000060a10 sp=0xc0000609e8 pc=0x117ea65
os/user.lookupUnixUid.func1.1(0x1f6, 0x1d94a68, 0xc000122510, 0x12cd440)
	/Users/zchee/go1.17.2/src/os/user/cgo_lookup_unix.go:105 +0xdc fp=0xc000060a78 sp=0xc000060a10 pc=0x117fd3c
os/user.lookupUnixUid.func1()
	/Users/zchee/go1.17.2/src/os/user/cgo_lookup_unix.go:105 +0x5e fp=0xc000060ad0 sp=0xc000060a78 pc=0x117fc3e
os/user.retryWithBuffer(0xc000122510, 0xc000060c28)
	/Users/zchee/go1.17.2/src/os/user/cgo_lookup_unix.go:249 +0x42 fp=0xc000060b30 sp=0xc000060ad0 pc=0x1181602
os/user.lookupUnixUid(0x1f6)
	/Users/zchee/go1.17.2/src/os/user/cgo_lookup_unix.go:98 +0x1de fp=0xc000060c60 sp=0xc000060b30 pc=0x117f95e
os/user.current()
	/Users/zchee/go1.17.2/src/os/user/cgo_lookup_unix.go:51 +0x2a fp=0xc000060c90 sp=0xc000060c60 pc=0x117eeca
os/user.Current.func1()
	/Users/zchee/go1.17.2/src/os/user/lookup.go:15 +0x2a fp=0xc000060cc0 sp=0xc000060c90 pc=0x118206a
sync.(*Once).doSlow(0x12cce60, 0x11bca40)
	/Users/zchee/go1.17.2/src/sync/once.go:68 +0x128 fp=0xc000060da8 sp=0xc000060cc0 pc=0x10afae8
sync.(*Once).Do(0x12cce60, 0xea53f76)
	/Users/zchee/go1.17.2/src/sync/once.go:59 +0x47 fp=0xc000060dd0 sp=0xc000060da8 pc=0x10af987
os/user.Current()
	/Users/zchee/go1.17.2/src/os/user/lookup.go:15 +0x38 fp=0xc000060e18 sp=0xc000060dd0 pc=0x117c478
os/user.TestCurrent(0xc00010b6c0)
	/Users/zchee/go1.17.2/src/os/user/user_test.go:20 +0x2f fp=0xc000060e98 sp=0xc000060e18 pc=0x117cd4f
testing.tRunner(0xc00010b6c0, 0x11bca48)
	/Users/zchee/go1.17.2/src/testing/testing.go:1259 +0x230 fp=0xc000060fb0 sp=0xc000060e98 pc=0x111ecb0
testing.(*T).Run·dwrap·21()
	/Users/zchee/go1.17.2/src/testing/testing.go:1306 +0x48 fp=0xc000060fe0 sp=0xc000060fb0 pc=0x1120248
runtime.goexit()
	/Users/zchee/go1.17.2/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000060fe8 sp=0xc000060fe0 pc=0x10a7881
created by testing.(*T).Run
	/Users/zchee/go1.17.2/src/testing/testing.go:1306 +0x727

goroutine 1 [chan receive]:
testing.(*T).Run(0xc00010b520, {0x11b3a3e, 0xb}, 0x11bca48)
	/Users/zchee/go1.17.2/src/testing/testing.go:1307 +0x752
testing.runTests.func1(0x0)
	/Users/zchee/go1.17.2/src/testing/testing.go:1598 +0x9a
testing.tRunner(0xc00010b520, 0xc000155bf8)
	/Users/zchee/go1.17.2/src/testing/testing.go:1259 +0x230
testing.runTests(0xc000170000, {0x12c9700, 0x6, 0x6}, {0x0, 0x96fffff, 0x12cd020})
	/Users/zchee/go1.17.2/src/testing/testing.go:1596 +0x7cb
testing.(*M).Run(0xc000170000)
	/Users/zchee/go1.17.2/src/testing/testing.go:1504 +0x9d2
main.main()
	_testmain.go:55 +0x22c

rax    0x2000209
rbx    0x80
rcx    0x7ff7bfef97a8
rdx    0x0
rdi    0x8
rsi    0x1
rbp    0x7ff7bfef97f0
rsp    0x7ff7bfef97a8
r8     0x600002c00000
r9     0x80
r10    0x0
r11    0x246
r12    0x0
r13    0x0
r14    0x1
r15    0x8
rip    0x7ff80e186dfe
rflags 0x246
cs     0x7
fs     0x0
gs     0x0
FAIL	os/user	0.013s
FAIL
go test -v -race -count=1 -run=TestClientInsecureTransport net/http
=== RUN   TestClientInsecureTransport
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7ff80e031c1e]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7ff80e031c1e
stack: frame={sp:0x70001015e920, fp:0x70001015e970} stack=[0x7000100df338,0x70001015ef38)
0x000070001015e820:  0x010070001015e840  0x0000000000000004 
0x000070001015e830:  0x000000000000001f  0x00007ff80e031c1e 
0x000070001015e840:  0x0000000000000000  0x0000000000000001 
0x000070001015e850:  0x0000000001077231 <runtime.throw+0x0000000000000071>  0x000070001015e8f0 
0x000070001015e860:  0x00000000016d952a  0x000070001015e8a8 
0x000070001015e870:  0x00000000010774e8 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000c000001520 
0x000070001015e880:  0x0000000000000001  0x0000000000000001 
0x000070001015e890:  0x000070001015e8f0  0x0000000001077231 <runtime.throw+0x0000000000000071> 
0x000070001015e8a0:  0x000000c000001520  0x000070001015e8e0 
0x000070001015e8b0:  0x0000000001077470 <runtime.fatalthrow+0x0000000000000050>  0x000070001015e8c0 
0x000070001015e8c0:  0x00000000010774a0 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000c000001520 
0x000070001015e8d0:  0x0000000001077231 <runtime.throw+0x0000000000000071>  0x000070001015e8f0 
0x000070001015e8e0:  0x000070001015e910  0x0000000001077231 <runtime.throw+0x0000000000000071> 
0x000070001015e8f0:  0x000070001015e8f8  0x0000000001077260 <runtime.throw.func1+0x0000000000000000> 
0x000070001015e900:  0x00000000016e3faa  0x000000000000002a 
0x000070001015e910:  0x000070001015e960  0x000000000108efd6 <runtime.sigpanic+0x0000000000000396> 
0x000070001015e920: <0x00000000016e3faa  0x0000000000000000 
0x000070001015e930:  0x0000000000000000  0x0000000000000000 
0x000070001015e940:  0x0000000000000000  0x0000000000000000 
0x000070001015e950:  0x0000000000000000  0x0000000000000000 
0x000070001015e960:  0x000070001015e9b0 !0x00007ff80e031c1e 
0x000070001015e970: >0x000070001015e9c0  0x0000000000000000 
0x000070001015e980:  0x0000000000000000  0x00007ff80e5ac8cf 
0x000070001015e990:  0x00007ff850f4ee78  0x0000000000000000 
0x000070001015e9a0:  0x00007ff80e5ac8cf  0x00007ff80e5ac8cf 
0x000070001015e9b0:  0x000070001015ea00  0x00007ff80e0383b0 
0x000070001015e9c0:  0x0000000000000000  0x0000000000000001 
0x000070001015e9d0:  0x000070001015ea80  0x00007ff80dfbcdc3 
0x000070001015e9e0:  0x0000000000000000  0x00000000025f0000 
0x000070001015e9f0:  0x00007ff84f815ec8  0x00007ff80e5ac8cf 
0x000070001015ea00:  0x000070001015ea20  0x00007ff80e038354 
0x000070001015ea10:  0x00007ff84f815ec8  0x0000000000000000 
0x000070001015ea20:  0x000070001015ea70  0x00007ff80e038212 
0x000070001015ea30:  0x00000000025f3034  0x0000600004000000 
0x000070001015ea40:  0x000000140000000a  0x00007ff84f815ec8 
0x000070001015ea50:  0x00007ff850f4ee78  0x0000000000000000 
0x000070001015ea60:  0x0000000000000000  0x0000000000000000 
runtime.throw({0x16e3faa, 0x0})
	/Users/zchee/go1.17.2/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7ff80e031c1e
stack: frame={sp:0x70001015e920, fp:0x70001015e970} stack=[0x7000100df338,0x70001015ef38)
0x000070001015e820:  0x010070001015e840  0x0000000000000004 
0x000070001015e830:  0x000000000000001f  0x00007ff80e031c1e 
0x000070001015e840:  0x0000000000000000  0x0000000000000001 
0x000070001015e850:  0x0000000001077231 <runtime.throw+0x0000000000000071>  0x000070001015e8f0 
0x000070001015e860:  0x00000000016d952a  0x000070001015e8a8 
0x000070001015e870:  0x00000000010774e8 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000c000001520 
0x000070001015e880:  0x0000000000000001  0x0000000000000001 
0x000070001015e890:  0x000070001015e8f0  0x0000000001077231 <runtime.throw+0x0000000000000071> 
0x000070001015e8a0:  0x000000c000001520  0x000070001015e8e0 
0x000070001015e8b0:  0x0000000001077470 <runtime.fatalthrow+0x0000000000000050>  0x000070001015e8c0 
0x000070001015e8c0:  0x00000000010774a0 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000c000001520 
0x000070001015e8d0:  0x0000000001077231 <runtime.throw+0x0000000000000071>  0x000070001015e8f0 
0x000070001015e8e0:  0x000070001015e910  0x0000000001077231 <runtime.throw+0x0000000000000071> 
0x000070001015e8f0:  0x000070001015e8f8  0x0000000001077260 <runtime.throw.func1+0x0000000000000000> 
0x000070001015e900:  0x00000000016e3faa  0x000000000000002a 
0x000070001015e910:  0x000070001015e960  0x000000000108efd6 <runtime.sigpanic+0x0000000000000396> 
0x000070001015e920: <0x00000000016e3faa  0x0000000000000000 
0x000070001015e930:  0x0000000000000000  0x0000000000000000 
0x000070001015e940:  0x0000000000000000  0x0000000000000000 
0x000070001015e950:  0x0000000000000000  0x0000000000000000 
0x000070001015e960:  0x000070001015e9b0 !0x00007ff80e031c1e 
0x000070001015e970: >0x000070001015e9c0  0x0000000000000000 
0x000070001015e980:  0x0000000000000000  0x00007ff80e5ac8cf 
0x000070001015e990:  0x00007ff850f4ee78  0x0000000000000000 
0x000070001015e9a0:  0x00007ff80e5ac8cf  0x00007ff80e5ac8cf 
0x000070001015e9b0:  0x000070001015ea00  0x00007ff80e0383b0 
0x000070001015e9c0:  0x0000000000000000  0x0000000000000001 
0x000070001015e9d0:  0x000070001015ea80  0x00007ff80dfbcdc3 
0x000070001015e9e0:  0x0000000000000000  0x00000000025f0000 
0x000070001015e9f0:  0x00007ff84f815ec8  0x00007ff80e5ac8cf 
0x000070001015ea00:  0x000070001015ea20  0x00007ff80e038354 
0x000070001015ea10:  0x00007ff84f815ec8  0x0000000000000000 
0x000070001015ea20:  0x000070001015ea70  0x00007ff80e038212 
0x000070001015ea30:  0x00000000025f3034  0x0000600004000000 
0x000070001015ea40:  0x000000140000000a  0x00007ff84f815ec8 
0x000070001015ea50:  0x00007ff850f4ee78  0x0000000000000000 
0x000070001015ea60:  0x0000000000000000  0x0000000000000000 
runtime.sigpanic()
	/Users/zchee/go1.17.2/src/runtime/signal_unix.go:719 +0x396

goroutine 27 [syscall]:
crypto/x509/internal/macos.syscall(0x12deec0, 0x0, 0xc000150b30, 0x0, 0x0, 0x0, 0x0)
	/Users/zchee/go1.17.2/src/runtime/sys_darwin.go:95 +0x29 fp=0xc000150aa8 sp=0xc000150a88 pc=0x10a8d69
crypto/x509/internal/macos.syscall(0xc0001bd3a0, 0xc0001bd39e, 0xc0001bd39e, 0xc0001bd39e, 0xc0001bd3a1, 0x0, 0x9f)
	<autogenerated>:1 +0x35 fp=0xc000150af8 sp=0xc000150aa8 pc=0x10af755
crypto/x509/internal/macos.SecTrustSettingsCopyCertificates(0x0)
	/Users/zchee/go1.17.2/src/crypto/x509/internal/macos/security.go:71 +0x6e fp=0xc000150b88 sp=0xc000150af8 pc=0x12de78e
crypto/x509.loadSystemRoots()
	/Users/zchee/go1.17.2/src/crypto/x509/root_darwin.go:36 +0x150 fp=0xc000150e18 sp=0xc000150b88 pc=0x12ec210
crypto/x509.initSystemRoots()
	/Users/zchee/go1.17.2/src/crypto/x509/root.go:27 +0x2a fp=0xc000150e48 sp=0xc000150e18 pc=0x12ebfca
sync.(*Once).doSlow(0x1af47b8, 0x16f96e8)
	/Users/zchee/go1.17.2/src/sync/once.go:68 +0x128 fp=0xc000150f30 sp=0xc000150e48 pc=0x10b6648
sync.(*Once).Do(0x1af47b8, 0xc0001bd237)
	/Users/zchee/go1.17.2/src/sync/once.go:59 +0x47 fp=0xc000150f58 sp=0xc000150f30 pc=0x10b64e7
crypto/x509.systemRootsPool(...)
	/Users/zchee/go1.17.2/src/crypto/x509/root.go:22
crypto/x509.(*Certificate).Verify(0xc00018b600, {{0xc000280051, 0x9}, 0xc0001a3110, 0x0, {0xc05584a5918c2830, 0xadd731, 0x1ac4380}, {0x0, 0x0, ...}, ...})
	/Users/zchee/go1.17.2/src/crypto/x509/verify.go:750 +0x2ea fp=0xc000151128 sp=0xc000150f58 pc=0x12f284a
crypto/tls.(*Conn).verifyServerCertificate(0xc0001fa000, {0xc000138a20, 0x1, 0x1})
	/Users/zchee/go1.17.2/src/crypto/tls/handshake_client.go:868 +0x938 fp=0xc0001514e0 sp=0xc000151128 pc=0x131f858
crypto/tls.(*clientHandshakeStateTLS13).readServerCertificate(0xc000151c18)
	/Users/zchee/go1.17.2/src/crypto/tls/handshake_client_tls13.go:457 +0x5b9 fp=0xc000151860 sp=0xc0001514e0 pc=0x1324b19
crypto/tls.(*clientHandshakeStateTLS13).handshake(0xc000151c18)
	/Users/zchee/go1.17.2/src/crypto/tls/handshake_client_tls13.go:87 +0x505 fp=0xc0001519d8 sp=0xc000151860 pc=0x1320c85
crypto/tls.(*Conn).clientHandshake(0xc0001fa000, {0x17a8df8, 0xc000110b00})
	/Users/zchee/go1.17.2/src/crypto/tls/handshake_client.go:219 +0x8ec fp=0xc000151cf0 sp=0xc0001519d8 pc=0x1317cec
crypto/tls.(*Conn).clientHandshake-fm({0x17a8df8, 0xc000110b00})
	/Users/zchee/go1.17.2/src/crypto/tls/handshake_client.go:145 +0x4e fp=0xc000151d30 sp=0xc000151cf0 pc=0x136f9ee
crypto/tls.(*Conn).handshakeContext(0xc0001fa000, {0x17a8e30, 0xc00012e018})
	/Users/zchee/go1.17.2/src/crypto/tls/conn.go:1445 +0x43d fp=0xc000151f60 sp=0xc000151d30 pc=0x1314f9d
crypto/tls.(*Conn).HandshakeContext(...)
	/Users/zchee/go1.17.2/src/crypto/tls/conn.go:1395
net/http.(*persistConn).addTLS.func2()
	/Users/zchee/go1.17.2/src/net/http/transport.go:1534 +0xac fp=0xc000151fe0 sp=0xc000151f60 pc=0x1464a0c
runtime.goexit()
	/Users/zchee/go1.17.2/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000151fe8 sp=0xc000151fe0 pc=0x10ac181
created by net/http.(*persistConn).addTLS
	/Users/zchee/go1.17.2/src/net/http/transport.go:1530 +0x6d5

goroutine 1 [chan receive]:
testing.(*T).Run(0xc0001ac000, {0x16d527a, 0x1b}, 0x16fa150)
	/Users/zchee/go1.17.2/src/testing/testing.go:1307 +0x752
testing.runTests.func1(0x0)
	/Users/zchee/go1.17.2/src/testing/testing.go:1598 +0x9a
testing.tRunner(0xc0001ac000, 0xc00014fb78)
	/Users/zchee/go1.17.2/src/testing/testing.go:1259 +0x230
testing.runTests(0xc0001a8000, {0x1abec00, 0x21f, 0x21f}, {0x38, 0xc00014fc68, 0x1ac4380})
	/Users/zchee/go1.17.2/src/testing/testing.go:1596 +0x7cb
testing.(*M).Run(0xc0001a8000)
	/Users/zchee/go1.17.2/src/testing/testing.go:1504 +0x9d2
net/http_test.TestMain(0x480)
	/Users/zchee/go1.17.2/src/net/http/main_test.go:23 +0x2f
main.main()
	_testmain.go:1197 +0x265

goroutine 21 [select]:
net/http.(*Transport).getConn(0xc000188640, 0xc00028a100, {{}, 0x0, {0xc0001720c0, 0x5}, {0xc000280051, 0xf}, 0x0})
	/Users/zchee/go1.17.2/src/net/http/transport.go:1372 +0xa45
net/http.(*Transport).roundTrip(0xc000188640, 0xc0002ae100)
	/Users/zchee/go1.17.2/src/net/http/transport.go:581 +0xcdf
net/http.(*Transport).RoundTrip(0xc0002ae100, 0x179cf60)
	/Users/zchee/go1.17.2/src/net/http/roundtrip.go:18 +0x37
net/http.send(0xc0002ae100, {0x179cf60, 0xc000188640}, {0x0, 0x108ffa0, 0x0})
	/Users/zchee/go1.17.2/src/net/http/client.go:252 +0x93f
net/http.(*Client).send(0xc0001a21e0, 0xc0002ae100, {0x12d85ee, 0x14, 0x0})
	/Users/zchee/go1.17.2/src/net/http/client.go:176 +0x158
net/http.(*Client).do(0xc0001a21e0, 0xc0002ae100)
	/Users/zchee/go1.17.2/src/net/http/client.go:725 +0x1087
net/http.(*Client).Do(...)
	/Users/zchee/go1.17.2/src/net/http/client.go:593
net/http.(*Client).Get(0xc000046100, {0xc0001720c0, 0x17})
	/Users/zchee/go1.17.2/src/net/http/client.go:480 +0xb1
net/http_test.TestClientInsecureTransport(0xc0001ac1a0)
	/Users/zchee/go1.17.2/src/net/http/client_test.go:862 +0x4b3
testing.tRunner(0xc0001ac1a0, 0x16fa150)
	/Users/zchee/go1.17.2/src/testing/testing.go:1259 +0x230
created by testing.(*T).Run
	/Users/zchee/go1.17.2/src/testing/testing.go:1306 +0x727

goroutine 22 [IO wait]:
internal/poll.runtime_pollWait(0xa3031d8, 0x72)
	/Users/zchee/go1.17.2/src/runtime/netpoll.go:229 +0x89
internal/poll.(*pollDesc).wait(0xc0001a8098, 0xc000294101, 0x0)
	/Users/zchee/go1.17.2/src/internal/poll/fd_poll_runtime.go:84 +0xbd
internal/poll.(*pollDesc).waitRead(...)
	/Users/zchee/go1.17.2/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc0001a8080)
	/Users/zchee/go1.17.2/src/internal/poll/fd_unix.go:402 +0x425
net.(*netFD).accept(0xc0001a8080)
	/Users/zchee/go1.17.2/src/net/fd_unix.go:173 +0x4a
net.(*TCPListener).accept(0xc000138180)
	/Users/zchee/go1.17.2/src/net/tcpsock_posix.go:140 +0x45
net.(*TCPListener).Accept(0xc000138180)
	/Users/zchee/go1.17.2/src/net/tcpsock.go:262 +0x68
crypto/tls.(*listener).Accept(0xc000138300)
	/Users/zchee/go1.17.2/src/crypto/tls/tls.go:66 +0x45
net/http.(*Server).Serve(0xc0001ba000, {0x17a7610, 0xc000138300})
	/Users/zchee/go1.17.2/src/net/http/server.go:3001 +0x5cf
net/http/httptest.(*Server).goServe.func1()
	/Users/zchee/go1.17.2/src/net/http/httptest/server.go:308 +0xc5
created by net/http/httptest.(*Server).goServe
	/Users/zchee/go1.17.2/src/net/http/httptest/server.go:306 +0xa5

goroutine 51 [chan receive]:
net/http.(*persistConn).addTLS(0xc0002b6000, {0x17a8e30, 0xc00012e018}, {0xc000280051, 0x9}, 0x0)
	/Users/zchee/go1.17.2/src/net/http/transport.go:1540 +0x6f3
net/http.(*Transport).dialConn(0xc000188640, {0x17a8e30, 0xc00012e018}, {{}, 0x0, {0xc0001720c0, 0x5}, {0xc000280051, 0xf}, 0x0})
	/Users/zchee/go1.17.2/src/net/http/transport.go:1614 +0x1250
net/http.(*Transport).dialConnFor(0x0, 0xc0002b4000)
	/Users/zchee/go1.17.2/src/net/http/transport.go:1446 +0x13b
created by net/http.(*Transport).queueForDial
	/Users/zchee/go1.17.2/src/net/http/transport.go:1415 +0x175

goroutine 52 [IO wait]:
internal/poll.runtime_pollWait(0xa3030f0, 0x72)
	/Users/zchee/go1.17.2/src/runtime/netpoll.go:229 +0x89
internal/poll.(*pollDesc).wait(0xc000294198, 0xc0002c8000, 0x0)
	/Users/zchee/go1.17.2/src/internal/poll/fd_poll_runtime.go:84 +0xbd
internal/poll.(*pollDesc).waitRead(...)
	/Users/zchee/go1.17.2/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000294180, {0xc0002c8000, 0x205, 0x205})
	/Users/zchee/go1.17.2/src/internal/poll/fd_unix.go:167 +0x419
net.(*netFD).Read(0xc000294180, {0xc0002c8000, 0x205, 0x205})
	/Users/zchee/go1.17.2/src/net/fd_posix.go:56 +0x51
net.(*conn).Read(0xc0002b2018, {0xc0002c8000, 0x205, 0x205})
	/Users/zchee/go1.17.2/src/net/net.go:183 +0xb1
crypto/tls.(*atLeastReader).Read(0xc0001389f0, {0xc0002c8000, 0x205, 0x205})
	/Users/zchee/go1.17.2/src/crypto/tls/conn.go:777 +0x86
bytes.(*Buffer).ReadFrom(0xc0002c2278, {0x179cb40, 0xc0001389f0})
	/Users/zchee/go1.17.2/src/bytes/buffer.go:204 +0x113
crypto/tls.(*Conn).readFromUntil(0xc0002c2000, {0xa35d0d0, 0xc0002b2018}, 0x5)
	/Users/zchee/go1.17.2/src/crypto/tls/conn.go:799 +0x1df
crypto/tls.(*Conn).readRecordOrCCS(0xc0002c2000, 0x0)
	/Users/zchee/go1.17.2/src/crypto/tls/conn.go:606 +0x3fe
crypto/tls.(*Conn).readRecord(...)
	/Users/zchee/go1.17.2/src/crypto/tls/conn.go:574
crypto/tls.(*Conn).readHandshake(0xc0002c2000)
	/Users/zchee/go1.17.2/src/crypto/tls/conn.go:1009 +0xad
crypto/tls.(*serverHandshakeStateTLS13).readClientFinished(0xc0001c36c0)
	/Users/zchee/go1.17.2/src/crypto/tls/handshake_server_tls13.go:839 +0x5f
crypto/tls.(*serverHandshakeStateTLS13).handshake(0xc0001c36c0)
	/Users/zchee/go1.17.2/src/crypto/tls/handshake_server_tls13.go:76 +0x13e
crypto/tls.(*Conn).serverHandshake(0xc0002c2000, {0x17a8df8, 0xc00028a140})
	/Users/zchee/go1.17.2/src/crypto/tls/handshake_server.go:54 +0x115
crypto/tls.(*Conn).handshakeContext(0xc0002c2000, {0x17a8ea0, 0xc000284270})
	/Users/zchee/go1.17.2/src/crypto/tls/conn.go:1445 +0x43d
crypto/tls.(*Conn).HandshakeContext(...)
	/Users/zchee/go1.17.2/src/crypto/tls/conn.go:1395
net/http.(*conn).serve(0xc0002c4000, {0x17a8ea0, 0xc00020a0c0})
	/Users/zchee/go1.17.2/src/net/http/server.go:1817 +0x3a9
created by net/http.(*Server).Serve
	/Users/zchee/go1.17.2/src/net/http/server.go:3033 +0x848
FAIL	net/http	0.027s
FAIL
go test -v -race -count=1 -run=TestCgoLookupIP net
=== RUN   TestCgoLookupIP
objc[10258]: Attempt to use unknown class 0x7ff84f9ba360.
SIGABRT: abort
PC=0x7ff80e186dfe m=0 sigcode=0

goroutine 0 [idle]:
runtime: unknown pc 0x7ff80e186dfe
stack: frame={sp:0x7ff7bfef97a8, fp:0x0} stack=[0x7ff7bfe7b848,0x7ff7bfefa8b0)
0x00007ff7bfef96a8:  0x0000000000000002  0x0000000000000002 
0x00007ff7bfef96b8:  0x0000000002050000  0x0000000002050400 
0x00007ff7bfef96c8:  0x0000000000000001  0x00007ff7bfef9730 
0x00007ff7bfef96d8:  0x00007ff80dfbc639  0x0000000000000000 
0x00007ff7bfef96e8:  0xf6814000c0001001  0x000000000000ffff 
0x00007ff7bfef96f8:  0x0000000000000030  0x0000000000000000 
0x00007ff7bfef9708:  0x000000000000002d  0x000000000000002d 
0x00007ff7bfef9718:  0x0000000000000000  0x0000000002050000 
0x00007ff7bfef9728:  0x00007ff84f9ce000  0x00007ff7bfef9760 
0x00007ff7bfef9738:  0x00007ff80dfbc566  0x00007ff80dfbc52e 
0x00007ff7bfef9748:  0x000000000000002d  0x0000000000000001 
0x00007ff7bfef9758:  0x00007ff84f9ce000  0x00007ff7bfef97a0 
0x00007ff7bfef9768:  0x00007ff80dfd8ad6  0x000000000000002c 
0x00007ff7bfef9778:  0x000000000000002d  0x0000600003300000 
0x00007ff7bfef9788:  0x0000000000000003  0x0000600002c00000 
0x00007ff7bfef9798:  0x0000000000000000  0x00007ff7bfef97d0 
0x00007ff7bfef97a8: <0x00007ff80e188893  0x0000000000000000 
0x00007ff7bfef97b8:  0x00000020bfef9810  0x0000600002c00000 
0x00007ff7bfef97c8:  0x00007ff7bfef9810  0x0000600003300000 
0x00007ff7bfef97d8:  0x0000000000000003  0x0000000000000080 
0x00007ff7bfef97e8:  0x0000000000000001  0x00007ff7bfef9800 
0x00007ff7bfef97f8:  0x00007ff80e188843  0x00007ff7bfef9840 
0x00007ff7bfef9808:  0x00007ff80e054bce  0x0000600002c00080 
0x00007ff7bfef9818:  0x0000000000000000  0x0000600002c00000 
0x00007ff7bfef9828:  0x00007ffffffffff8  0x00007ff84f9ba360 
0x00007ff7bfef9838:  0x0000000080080001  0x00007ff7bfef9920 
0x00007ff7bfef9848:  0x00007ff80e054b5c  0x0000003000000010 
0x00007ff7bfef9858:  0x00007ff7bfef9930  0x00007ff7bfef9870 
0x00007ff7bfef9868:  0x00007ff7bfef99a0  0x00000000093873a0 
0x00007ff7bfef9878:  0x00007ff84f9ba360  0x00007ff84f9ba360 
0x00007ff7bfef9888:  0x0000000000000001  0x00000000ffffffff 
0x00007ff7bfef9898:  0x0000000000000000  0x00007ff7bfef98c0 
runtime: unknown pc 0x7ff80e186dfe
stack: frame={sp:0x7ff7bfef97a8, fp:0x0} stack=[0x7ff7bfe7b848,0x7ff7bfefa8b0)
0x00007ff7bfef96a8:  0x0000000000000002  0x0000000000000002 
0x00007ff7bfef96b8:  0x0000000002050000  0x0000000002050400 
0x00007ff7bfef96c8:  0x0000000000000001  0x00007ff7bfef9730 
0x00007ff7bfef96d8:  0x00007ff80dfbc639  0x0000000000000000 
0x00007ff7bfef96e8:  0xf6814000c0001001  0x000000000000ffff 
0x00007ff7bfef96f8:  0x0000000000000030  0x0000000000000000 
0x00007ff7bfef9708:  0x000000000000002d  0x000000000000002d 
0x00007ff7bfef9718:  0x0000000000000000  0x0000000002050000 
0x00007ff7bfef9728:  0x00007ff84f9ce000  0x00007ff7bfef9760 
0x00007ff7bfef9738:  0x00007ff80dfbc566  0x00007ff80dfbc52e 
0x00007ff7bfef9748:  0x000000000000002d  0x0000000000000001 
0x00007ff7bfef9758:  0x00007ff84f9ce000  0x00007ff7bfef97a0 
0x00007ff7bfef9768:  0x00007ff80dfd8ad6  0x000000000000002c 
0x00007ff7bfef9778:  0x000000000000002d  0x0000600003300000 
0x00007ff7bfef9788:  0x0000000000000003  0x0000600002c00000 
0x00007ff7bfef9798:  0x0000000000000000  0x00007ff7bfef97d0 
0x00007ff7bfef97a8: <0x00007ff80e188893  0x0000000000000000 
0x00007ff7bfef97b8:  0x00000020bfef9810  0x0000600002c00000 
0x00007ff7bfef97c8:  0x00007ff7bfef9810  0x0000600003300000 
0x00007ff7bfef97d8:  0x0000000000000003  0x0000000000000080 
0x00007ff7bfef97e8:  0x0000000000000001  0x00007ff7bfef9800 
0x00007ff7bfef97f8:  0x00007ff80e188843  0x00007ff7bfef9840 
0x00007ff7bfef9808:  0x00007ff80e054bce  0x0000600002c00080 
0x00007ff7bfef9818:  0x0000000000000000  0x0000600002c00000 
0x00007ff7bfef9828:  0x00007ffffffffff8  0x00007ff84f9ba360 
0x00007ff7bfef9838:  0x0000000080080001  0x00007ff7bfef9920 
0x00007ff7bfef9848:  0x00007ff80e054b5c  0x0000003000000010 
0x00007ff7bfef9858:  0x00007ff7bfef9930  0x00007ff7bfef9870 
0x00007ff7bfef9868:  0x00007ff7bfef99a0  0x00000000093873a0 
0x00007ff7bfef9878:  0x00007ff84f9ba360  0x00007ff84f9ba360 
0x00007ff7bfef9888:  0x0000000000000001  0x00000000ffffffff 
0x00007ff7bfef9898:  0x0000000000000000  0x00007ff7bfef98c0 

goroutine 21 [syscall]:
runtime.cgocall(0x1001140, 0xc0000609f8)
	/Users/zchee/go1.17.2/src/runtime/cgocall.go:156 +0x6e fp=0xc0000609d0 sp=0xc000060998 pc=0x10445ae
net._C2func_getaddrinfo(0xc0000b7b66, 0x0, 0xc0000ad050, 0xc0000b2070)
	_cgo_gotypes.go:97 +0x8b fp=0xc0000609f8 sp=0xc0000609d0 pc=0x12ed04b
net.cgoLookupIPCNAME.func1({0xc0000b7b66, 0xa, 0x1382888}, 0xc000060ab0, 0x1000000010a669b)
	/Users/zchee/go1.17.2/src/net/cgo_unix.go:163 +0xb2 fp=0xc000060a68 sp=0xc0000609f8 pc=0x12efd12
net.cgoLookupIPCNAME({0x1381069, 0x2}, {0x1382888, 0xd0})
	/Users/zchee/go1.17.2/src/net/cgo_unix.go:163 +0x26e fp=0xc000060c68 sp=0xc000060a68 pc=0x12ef20e
net.cgoLookupIP({0x13e94f0, 0xc0000b6018}, {0x1381069, 0xc000060e18}, {0x1382888, 0x1517a80})
	/Users/zchee/go1.17.2/src/net/cgo_unix.go:226 +0x4c8 fp=0xc000060dd0 sp=0xc000060c68 pc=0x12f03a8
net.TestCgoLookupIP(0xc00008ba00)
	/Users/zchee/go1.17.2/src/net/cgo_unix_test.go:20 +0xc6 fp=0xc000060e98 sp=0xc000060dd0 pc=0x12315c6
testing.tRunner(0xc00008ba00, 0x1394cc8)
	/Users/zchee/go1.17.2/src/testing/testing.go:1259 +0x230 fp=0xc000060fb0 sp=0xc000060e98 pc=0x114a150
testing.(*T).Run·dwrap·21()
	/Users/zchee/go1.17.2/src/testing/testing.go:1306 +0x48 fp=0xc000060fe0 sp=0xc000060fb0 pc=0x114b6e8
runtime.goexit()
	/Users/zchee/go1.17.2/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000060fe8 sp=0xc000060fe0 pc=0x10ab201
created by testing.(*T).Run
	/Users/zchee/go1.17.2/src/testing/testing.go:1306 +0x727

goroutine 1 [chan receive]:
testing.(*T).Run(0xc00008b860, {0x1384b60, 0xf}, 0x1394cc8)
	/Users/zchee/go1.17.2/src/testing/testing.go:1307 +0x752
testing.runTests.func1(0x0)
	/Users/zchee/go1.17.2/src/testing/testing.go:1598 +0x9a
testing.tRunner(0xc00008b860, 0xc0000d9b60)
	/Users/zchee/go1.17.2/src/testing/testing.go:1259 +0x230
testing.runTests(0xc000104000, {0x1580ae0, 0xee, 0xee}, {0x6, 0xc0000ac810, 0x15842e0})
	/Users/zchee/go1.17.2/src/testing/testing.go:1596 +0x7cb
testing.(*M).Run(0xc000104000)
	/Users/zchee/go1.17.2/src/testing/testing.go:1504 +0x9d2
net.TestMain(0x480)
	/Users/zchee/go1.17.2/src/net/main_test.go:53 +0x3b
main.main()
	_testmain.go:589 +0x265

rax    0x2000209
rbx    0x80
rcx    0x7ff7bfef97a8
rdx    0x0
rdi    0x8
rsi    0x1
rbp    0x7ff7bfef97f0
rsp    0x7ff7bfef97a8
r8     0x600002c00000
r9     0x80
r10    0x0
r11    0x246
r12    0x0
r13    0x0
r14    0x1
r15    0x8
rip    0x7ff80e186dfe
rflags 0x246
cs     0x7
fs     0x0
gs     0x0
FAIL	net	0.015s
FAIL
go test -v -race -count=1 -run=TestLinkerGC math/big
=== RUN   TestLinkerGC
=== PAUSE TestLinkerGC
=== CONT  TestLinkerGC
SIGABRT: abort
PC=0x7ff80e16a112 m=5 sigcode=0

goroutine 0 [idle]:
syscall.rawSyscall(0x10bb880, 0x0, 0x0, 0x0)
	/Users/zchee/go1.17.2/src/runtime/sys_darwin.go:77 +0x47 fp=0xc0000cf570 sp=0xc0000cf550 pc=0x10a6a27
syscall.rawSyscall(0x10ac985, 0x0, 0x0, 0x1)
	<autogenerated>:1 +0x26 fp=0xc0000cf5b8 sp=0xc0000cf570 pc=0x10ad186
syscall.forkAndExecInChild(0xc000480180, {0xc0000a4870, 0x6, 0x1}, {0xc00049a000, 0x159, 0x0}, 0x0, 0xc0004b6000, 0xc0000cf8c0, ...)
	/Users/zchee/go1.17.2/src/syscall/exec_libc2.go:80 +0xed fp=0xc0000cf648 sp=0xc0000cf5b8 pc=0x10b64ad
syscall.forkExec({0xc000480140, 0x1c}, {0xc00007c190, 0x5, 0x5}, 0xc0000608c0)
	/Users/zchee/go1.17.2/src/syscall/exec_unix.go:212 +0x5a7 fp=0xc0000cf7e0 sp=0xc0000cf648 pc=0x10b7547
syscall.StartProcess(...)
	/Users/zchee/go1.17.2/src/syscall/exec_unix.go:264
os.startProcess({0xc000480140, 0x1c}, {0xc00007c190, 0x5, 0x5}, 0xc0000cfb50)
	/Users/zchee/go1.17.2/src/os/exec_posix.go:55 +0x526 fp=0xc0000cf918 sp=0xc0000cf7e0 pc=0x10e0586
os.StartProcess({0xc000480140, 0x1c}, {0xc00007c190, 0x5, 0x5}, 0x375f200)
	/Users/zchee/go1.17.2/src/os/exec.go:109 +0x7a fp=0xc0000cf978 sp=0xc0000cf918 pc=0x10dff5a
os/exec.(*Cmd).Start(0xc0003e4000)
	/Users/zchee/go1.17.2/src/os/exec/exec.go:422 +0x9d4 fp=0xc0000cfba8 sp=0xc0000cf978 pc=0x11bdb34
os/exec.(*Cmd).Run(0xc000060e48)
	/Users/zchee/go1.17.2/src/os/exec/exec.go:338 +0x31 fp=0xc0000cfbe8 sp=0xc0000cfba8 pc=0x11bd0f1
os/exec.(*Cmd).CombinedOutput(0xc0003e4000)
	/Users/zchee/go1.17.2/src/os/exec/exec.go:567 +0x20a fp=0xc0000cfc58 sp=0xc0000cfbe8 pc=0x11bea4a
math/big.TestLinkerGC(0xc000482ea0)
	/Users/zchee/go1.17.2/src/math/big/link_test.go:35 +0x40a fp=0xc0000cfe98 sp=0xc0000cfc58 pc=0x12a190a
testing.tRunner(0xc000482ea0, 0x132b5d0)
	/Users/zchee/go1.17.2/src/testing/testing.go:1259 +0x230 fp=0xc0000cffb0 sp=0xc0000cfe98 pc=0x1159f90
testing.(*T).Run·dwrap·21()
	/Users/zchee/go1.17.2/src/testing/testing.go:1306 +0x48 fp=0xc0000cffe0 sp=0xc0000cffb0 pc=0x115b528
runtime.goexit()
	/Users/zchee/go1.17.2/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0000cffe8 sp=0xc0000cffe0 pc=0x10a9e01
created by testing.(*T).Run
	/Users/zchee/go1.17.2/src/testing/testing.go:1306 +0x727

goroutine 5 [running]:
runtime.systemstack_switch()
	/Users/zchee/go1.17.2/src/runtime/asm_amd64.s:350 fp=0xc0000cf520 sp=0xc0000cf518 pc=0x10a7bc0
runtime.libcCall(0x18, 0xc000080000)
	/Users/zchee/go1.17.2/src/runtime/sys_libc.go:49 +0x66 fp=0xc0000cf550 sp=0xc0000cf520 pc=0x1096d26
syscall.rawSyscall(0x10bb880, 0x0, 0x0, 0x0)
	/Users/zchee/go1.17.2/src/runtime/sys_darwin.go:77 +0x47 fp=0xc0000cf570 sp=0xc0000cf550 pc=0x10a6a27
syscall.rawSyscall(0x10ac985, 0x0, 0x0, 0x1)
	<autogenerated>:1 +0x26 fp=0xc0000cf5b8 sp=0xc0000cf570 pc=0x10ad186
syscall.forkAndExecInChild(0xc000480180, {0xc0000a4870, 0x6, 0x1}, {0xc00049a000, 0x159, 0x0}, 0x0, 0xc0004b6000, 0xc0000cf8c0, ...)
	/Users/zchee/go1.17.2/src/syscall/exec_libc2.go:80 +0xed fp=0xc0000cf648 sp=0xc0000cf5b8 pc=0x10b64ad
syscall.forkExec({0xc000480140, 0x1c}, {0xc00007c190, 0x5, 0x5}, 0xc0000608c0)
	/Users/zchee/go1.17.2/src/syscall/exec_unix.go:212 +0x5a7 fp=0xc0000cf7e0 sp=0xc0000cf648 pc=0x10b7547
syscall.StartProcess(...)
	/Users/zchee/go1.17.2/src/syscall/exec_unix.go:264
os.startProcess({0xc000480140, 0x1c}, {0xc00007c190, 0x5, 0x5}, 0xc0000cfb50)
	/Users/zchee/go1.17.2/src/os/exec_posix.go:55 +0x526 fp=0xc0000cf918 sp=0xc0000cf7e0 pc=0x10e0586
os.StartProcess({0xc000480140, 0x1c}, {0xc00007c190, 0x5, 0x5}, 0x375f200)
	/Users/zchee/go1.17.2/src/os/exec.go:109 +0x7a fp=0xc0000cf978 sp=0xc0000cf918 pc=0x10dff5a
os/exec.(*Cmd).Start(0xc0003e4000)
	/Users/zchee/go1.17.2/src/os/exec/exec.go:422 +0x9d4 fp=0xc0000cfba8 sp=0xc0000cf978 pc=0x11bdb34
os/exec.(*Cmd).Run(0xc000060e48)
	/Users/zchee/go1.17.2/src/os/exec/exec.go:338 +0x31 fp=0xc0000cfbe8 sp=0xc0000cfba8 pc=0x11bd0f1
os/exec.(*Cmd).CombinedOutput(0xc0003e4000)
	/Users/zchee/go1.17.2/src/os/exec/exec.go:567 +0x20a fp=0xc0000cfc58 sp=0xc0000cfbe8 pc=0x11bea4a
math/big.TestLinkerGC(0xc000482ea0)
	/Users/zchee/go1.17.2/src/math/big/link_test.go:35 +0x40a fp=0xc0000cfe98 sp=0xc0000cfc58 pc=0x12a190a
testing.tRunner(0xc000482ea0, 0x132b5d0)
	/Users/zchee/go1.17.2/src/testing/testing.go:1259 +0x230 fp=0xc0000cffb0 sp=0xc0000cfe98 pc=0x1159f90
testing.(*T).Run·dwrap·21()
	/Users/zchee/go1.17.2/src/testing/testing.go:1306 +0x48 fp=0xc0000cffe0 sp=0xc0000cffb0 pc=0x115b528
runtime.goexit()
	/Users/zchee/go1.17.2/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0000cffe8 sp=0xc0000cffe0 pc=0x10a9e01
created by testing.(*T).Run
	/Users/zchee/go1.17.2/src/testing/testing.go:1306 +0x727

goroutine 1 [chan receive]:
testing.tRunner.func1()
	/Users/zchee/go1.17.2/src/testing/testing.go:1225 +0x635
testing.tRunner(0xc000482d00, 0xc0000cbbf8)
	/Users/zchee/go1.17.2/src/testing/testing.go:1265 +0x269
testing.runTests(0xc00045e080, {0x14f6c80, 0xb0, 0xb0}, {0xc0000b2588, 0xc0000cbc80, 0x14fcbe0})
	/Users/zchee/go1.17.2/src/testing/testing.go:1596 +0x7cb
testing.(*M).Run(0xc00045e080)
	/Users/zchee/go1.17.2/src/testing/testing.go:1504 +0x9d2
main.main()
	_testmain.go:547 +0x22c

rax    0x0
rbx    0x700000576000
rcx    0x700000575c78
rdx    0x0
rdi    0x303
rsi    0x6
rbp    0x700000575ca0
rsp    0x700000575c78
r8     0x0
r9     0x0
r10    0x0
r11    0x246
r12    0x303
r13    0x50
r14    0x6
r15    0x16
rip    0x7ff80e16a112
rflags 0x246
cs     0x7
fs     0x0
gs     0x0
    link_test.go:36: compile: exit status 2, 
--- FAIL: TestLinkerGC (0.01s)
FAIL
FAIL	math/big	0.064s
FAIL

What did you expect to see?

Pass all testcase with the -race flag.

What did you see instead?

SIGABRT or SIGSEGV.

Note that if no -race flag, passes at least above testcases.


That might be a hint ...?

On the release-branch.go1.4 branch (I know no longer support go1.4 for darwin via https://github.com/golang/build/blob/af7dff60846ec9cb2e4cbbf7a12ad25058a8743b/env/darwin/macstadium/image-setup-notes.txt#L15):

CGO_ENABLED=0 ./make.bash -a=true -d=true -v=99 -no-banner
# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
liblink
cmd/cc
cmd/gc
cmd/6l
/Users/zchee/sdk/go1.4-release-branch/src/cmd/6l/../ld/dwarf.c:1479:15: warning: implicit conversion from 'int' to 'char' changes value from 156 to -100 [-Wconstant-conversion]
/Users/zchee/sdk/go1.4-release-branch/src/cmd/6l/../ld/dwarf.c:1763:21: warning: implicit conversion from 'int' to 'char' changes value from 144 to -112 [-Wconstant-conversion]
/Users/zchee/sdk/go1.4-release-branch/src/cmd/6l/../ld/lib.h:168:13: note: expanded from macro 'cput'
cmd/6a
cmd/6c
/Users/zchee/sdk/go1.4-release-branch/src/cmd/6c/txt.c:995:28: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
/Users/zchee/sdk/go1.4-release-branch/src/cmd/6c/txt.c:1045:28: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
cmd/6g
/Users/zchee/sdk/go1.4-release-branch/src/cmd/6g/peep.c:771:13: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
runtime
errors
sync/atomic
sync
io
unicode
unicode/utf8
unicode/utf16
bytes
math
strings
strconv
bufio
sort
container/heap
encoding/base64
syscall
time
os
reflect
fmt
encoding
encoding/json
flag
path/filepath
path
io/ioutil
log
regexp/syntax
regexp
go/token
go/scanner
go/ast
go/parser
os/exec
os/signal
net/url
text/template/parse
text/template
go/doc
go/build
cmd/go
fatal error: runtime: bsdthread_register error

runtime stack:
runtime.throw(0x3eb895)
	/Users/zchee/sdk/go1.4-release-branch/src/runtime/panic.go:491 +0xad fp=0x7ff7bfefa810 sp=0x7ff7bfefa7e0
runtime.goenvs()
	/Users/zchee/sdk/go1.4-release-branch/src/runtime/os_darwin.c:104 +0x70 fp=0x7ff7bfefa828 sp=0x7ff7bfefa810
runtime.schedinit()
	/Users/zchee/sdk/go1.4-release-branch/src/runtime/proc.c:141 +0x5f fp=0x7ff7bfefa850 sp=0x7ff7bfefa828
runtime.rt0_go(0x7ff7bfefa880, 0x4, 0x7ff7bfefa880, 0x1000, 0x4, 0x7ff7bfefb430, 0x7ff7bfefb479, 0x7ff7bfefb47f, 0x7ff7bfefb482, 0x0, ...)
	/Users/zchee/sdk/go1.4-release-branch/src/runtime/asm_amd64.s:95 +0x116 fp=0x7ff7bfefa858 sp=0x7ff7bfefa850

I have all InstallAssistant.pkg for Monterey betas except RC (Apple will remove past versions in sequence, so it's no longer officially available).
Actually, I've also tested under the VM. So I can provide anything if the Go team wants assembly information, etc.

What is InstallAssistant.pkg: ttp://mrmacintosh.com/macos-12-monterey-full-installer-database-download-directly-from-apple/

@zchee zchee changed the title race detector occurred SIGABRT or SIGSEGV on some syscall with macOS Monterey race detector occurred SIGABRT or SIGSEGV in macOS Monterey Oct 24, 2021
@zchee
Copy link
Contributor Author

@zchee zchee commented Oct 24, 2021

cc: @cuonglm

Loading

@seankhliao seankhliao changed the title race detector occurred SIGABRT or SIGSEGV in macOS Monterey runtime: race detector occurred SIGABRT or SIGSEGV in macOS Monterey Oct 24, 2021
@randall77
Copy link
Contributor

@randall77 randall77 commented Oct 25, 2021

Does it work without the race detector?

It may be that the race detector .syso (in src/runtime/race/race_darwin_amd64.syso) needs to be rebuilt.

But if I was a betting man I'd blame the OS, not the syso.
Does running the race detector for a C program work? objective-c/swift?

Loading

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Oct 25, 2021

Try setting environment variable MallocNanoZone=0 ?

@zchee are you running natively on an Intel Mac or running on an ARM64 Mac under Rosetta 2? Thanks.

Loading

@TwoDCube
Copy link

@TwoDCube TwoDCube commented Oct 25, 2021

@cherrymui I experienced the same problem on our project (and I was able to reproduce the author's original tests). I'm running natively on an Intel Mac, just upgraded to macOS 12.0.1.

The env var MallocNanoZone=0 solves the problem.

Also yes, without the race detector everything runs fine.

Loading

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Oct 25, 2021

@TwoDCube thanks for confirming.

I think this looks like a macOS bug, perhaps in their malloc implementation.

cc @Developer-Ecosystem-Engineering

Loading

@Developer-Ecosystem-Engineering

Thanks @cherrymui, taking a look to see whats up!

Loading

@bmhatfield
Copy link

@bmhatfield bmhatfield commented Oct 27, 2021

A note here that we bumped into this on Monterey and MallocNanoZone=0 or turning off the race detector did the trick. We like the race detector so MallocNanoZone=0 is our current workaround of choice.

Loading

@zchee
Copy link
Contributor Author

@zchee zchee commented Oct 27, 2021

@cherrymui fixed MallocNanoZone=0 for now!
and I'm intel, not repro on M1.

Loading

@zchee
Copy link
Contributor Author

@zchee zchee commented Oct 27, 2021

@cherrymui I'll try to nvram boot-args using 0, v1 and v2.

Loading

@zchee
Copy link
Contributor Author

@zchee zchee commented Oct 27, 2021

@randall77 I was try to rebuild src/runtime/race/race_darwin_amd64.syso with current head of llvm, but same result.

Does running the race detector for a C program work? objective-c/swift?

I didn't try yet.

@cherrymui I tried nanov2_mode=forced nvram boot-args for force using v2 libmalloc, but same result. still need to MallocNanoZone=0. Just FYI.
see also https://github.com/apple-opensource/libmalloc/blob/317.140.5/src/nano_malloc_common.c#L42 (this user(mirroring) maintaining by me. so safe to reference.

Loading

@EclesioMeloJunior
Copy link

@EclesioMeloJunior EclesioMeloJunior commented Nov 1, 2021

I got the same (or similar) problem running on an M1 apple processor

> go test -run ^Test_ext_trie_blake2_256_verify_proof_version_1$ github.com/ChainSafe/gossamer/lib/runtime/wasmer -race

objc[46754]: Attempt to use unknown class 0x7ff848325500.
SIGABRT: abort
PC=0x7ff806b63dfe m=0 sigcode=0

goroutine 0 [idle]:
runtime: unknown pc 0x7ff806b63dfe
stack: frame={sp:0x209de7168, fp:0x0} stack=[0x209d69208,0x209de8270)
0x0000000209de7068:  0x0000000000000002  0x0000000006d80428
0x0000000209de7078:  0x0000000000000000  0x0000000006d7c000
0x0000000209de7088:  0x0000000006d82214  0x0000000209de70f0
0x0000000209de7098:  0x00007ff8069966ee  0xa11fcec0b6ce9b9a
0x0000000209de70a8:  0x0000000000000005  0xa11fcec0b6ce0000
...

The env var MallocNanoZone=0 solves the problem.

> MallocNanoZone=0 go test -timeout 30s -run ^Test_ext_trie_blake2_256_verify_proof_version_1$ github.com/ChainSafe/gossamer/lib/runtime/wasmer -race

ok  	github.com/ChainSafe/gossamer/lib/runtime/wasmer	8.624s

Loading

@pior
Copy link

@pior pior commented Nov 1, 2021

We got the same error on Monterey / x86 / 1.17.1.
Removing -race or adding MallocNanoZone=0 both works as previously reported.

In our case, it looks related to dns lookups, GODEBUG=netdns=go is also fixing the issue.

goroutine 83 [syscall]:
runtime.cgocall(0x1001140, 0xc0000b7ca0)
	/Users/pior/.dev/go/1.17.1/src/runtime/cgocall.go:156 +0x6e fp=0xc0000b7c78 sp=0xc0000b7c40 pc=0x104486e
net._C2func_getaddrinfo(0xc000627b90, 0x0, 0xc00049c1b0, 0xc000010178)
	_cgo_gotypes.go:97 +0x8b fp=0xc0000b7ca0 sp=0xc0000b7c78 pc=0x12cbdcb
net.cgoLookupIPCNAME.func1({0xc000627b90, 0x10, 0xc000270149}, 0x60, 0x100000000000000)
	/Users/pior/.dev/go/1.17.1/src/net/cgo_unix.go:163 +0xb2 fp=0xc0000b7d10 sp=0xc0000b7ca0 pc=0x12cea92
net.cgoLookupIPCNAME({0xc000270145, 0x3}, {0xc000270149, 0x0})
	/Users/pior/.dev/go/1.17.1/src/net/cgo_unix.go:163 +0x26e fp=0xc0000b7f10 sp=0xc0000b7d10 pc=0x12cdf8e
net.cgoIPLookup(0x2a5653d, {0xc000270145, 0x3}, {0xc000270149, 0xf})
	/Users/pior/.dev/go/1.17.1/src/net/cgo_unix.go:220 +0x67 fp=0xc0000b7f80 sp=0xc0000b7f10 pc=0x12ceba7
net.cgoLookupIP·dwrap·22()
	/Users/pior/.dev/go/1.17.1/src/net/cgo_unix.go:230 +0x72 fp=0xc0000b7fe0 sp=0xc0000b7f80 pc=0x12cf252
runtime.goexit()
	/Users/pior/.dev/go/1.17.1/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0000b7fe8 sp=0xc0000b7fe0 pc=0x10ab8e1
created by net.cgoLookupIP
	/Users/pior/.dev/go/1.17.1/src/net/cgo_unix.go:230 +0x1ba

EDIT: an old issue about it: #41572

Loading

@andig
Copy link
Contributor

@andig andig commented Nov 2, 2021

There are reports about memory leaks on Monterey: https://www.macrumors.com/2021/11/01/macos-monterey-memory-leak-user-reports/. Maybe common root cause?

Loading

@zchee
Copy link
Contributor Author

@zchee zchee commented Nov 2, 2021

@cherrymui @Developer-Ecosystem-Engineering

What do you have plan? We wait for Apple side fix? or, planned fix on Go side...?

Loading

@Developer-Ecosystem-Engineering

@cherrymui @Developer-Ecosystem-Engineering

What do you have plan?

Still looking at it =)

Loading

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Nov 2, 2021

Yeah, I think we'll wait for the Apple fix. In the mean time, you can use the workaround with MallocNanoZone=0.

Loading

@zchee
Copy link
Contributor Author

@zchee zchee commented Nov 2, 2021

@cherrymui @Developer-Ecosystem-Engineering I see, Thanks for details and quickly reply.

Loading

gfanton added a commit to gfanton/berty that referenced this issue Nov 3, 2021
see golang/go#49138

hotfix until apple fix this

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@landryzhi
Copy link

@landryzhi landryzhi commented Nov 4, 2021

I got the similar problem running on macOS monterey.

protoc -I ../ --plugin=../bin/osx/protoc-gen-go --go_out=./out/golang/ *.proto

fatal error: runtime: bsdthread_register error

runtime stack:
runtime.throw(0x1a96a6, 0x21)
        /usr/local/go/src/runtime/panic.go:566 +0x95 fp=0x7ff7bfeff6b0 sp=0x7ff7bfeff690
runtime.goenvs()
        /usr/local/go/src/runtime/os_darwin.go:88 +0xa0 fp=0x7ff7bfeff6e0 sp=0x7ff7bfeff6b0
runtime.schedinit()
        /usr/local/go/src/runtime/proc.go:450 +0x9c fp=0x7ff7bfeff720 sp=0x7ff7bfeff6e0
runtime.rt0_go(0x7ff7bfeff758, 0x1, 0x7ff7bfeff758, 0x0, 0x1000, 0x1, 0x7ff7bfeff908, 0x0, 0x7ff7bfeff921, 0x7ff7bfeff952, ...)
        /usr/local/go/src/runtime/asm_amd64.s:145 +0x14f fp=0x7ff7bfeff728 sp=0x7ff7bfeff720
--go_out: protoc-gen-go: Plugin failed with status code 2.

Loading

@randall77
Copy link
Contributor

@randall77 randall77 commented Nov 4, 2021

@landryzhi That looks like a different bug. Please open a new issue.

Loading

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Nov 5, 2021

@landryzhi what version of Go are you using? We saw some similar errors with old versions of Go (which are no longer supported). (As @randall77 said, this looks different.)

Loading

@landryzhi
Copy link

@landryzhi landryzhi commented Nov 5, 2021

@randall77 @cherrymui Thanks for quick reply.

go version go1.15.15 darwin/amd64

Loading

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Nov 5, 2021

@landryzhi Go 1.15 is no longer supported. Could you try Go 1.16, 1.17, or the master branch? Thanks.

/usr/local/go/src/runtime/os_darwin.go:88

It is also weird that in Go 1.15.15 that line is just a comment.

Loading

@owenthereal
Copy link

@owenthereal owenthereal commented Nov 6, 2021

Just verified that Go 1.16.10 has the same issue on Monterey.

$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/owen/Library/Caches/go-build"
GOENV="/Users/owen/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/owen/code/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/owen/code"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/owen/.go/current"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/owen/.go/current/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.16.10"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/owen/code/src/github.com/owenthereal/test_go/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/x7/w9jndbs96w5_vj5d7w1hnsk40000gn/T/go-build932645598=/tmp/go-build -gno-record-gcc-switches -fno-common"

A very simple test case is:

package main

import (
	"os"
	"os/exec"
	"testing"
)

func TestExec(t *testing.T) {
	cmd := exec.Command("echo", "hello")
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	if err := cmd.Run(); err != nil {
		t.Fatal(err)
	}
}
$ go test ./... -v -race -count=1
=== RUN   TestExec
SIGABRT: abort
PC=0x7ff813714112 m=0 sigcode=0

goroutine 0 [idle]:
syscall.rawSyscall(0x10c7920, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /Users/owen/.go/current/src/runtime/sys_darwin.go:74 +0x4c fp=0xc0000687e8 sp=0xc0000687c0 pc=0x10aea8c
syscall.forkAndExecInChild(0xc0000b41b0, 0xc0000d2048, 0x3, 0x3, 0xc0000b8d00, 0x31, 0x31, 0x0, 0x0, 0xc000068b38, ...)
        /Users/owen/.go/current/src/syscall/exec_libc2.go:78 +0xeb fp=0xc0000688a8 sp=0xc0000687e8 pc=0x10c256b
syscall.forkExec(0xc0000b4150, 0x2c, 0xc0000ee000, 0x2, 0x2, 0xc000068b38, 0x20, 0x1, 0x2f0)
        /Users/owen/.go/current/src/syscall/exec_unix.go:211 +0x487 fp=0xc000068a50 sp=0xc0000688a8 pc=0x10c39c7
syscall.StartProcess(...)
        /Users/owen/.go/current/src/syscall/exec_unix.go:263
os.startProcess(0xc0000b4150, 0x2c, 0xc0000ee000, 0x2, 0x2, 0xc000068db0, 0x30, 0x0, 0x0)
        /Users/owen/.go/current/src/os/exec_posix.go:53 +0x44a fp=0xc000068b90 sp=0xc000068a50 pc=0x10e364a
os.StartProcess(0xc0000b4150, 0x2c, 0xc0000ee000, 0x2, 0x2, 0xc000068db0, 0x30, 0x10e852c, 0xc0000b4150)
        /Users/owen/.go/current/src/os/exec.go:106 +0x93 fp=0xc000068c00 sp=0xc000068b90 pc=0x10e30f3
os/exec.(*Cmd).Start(0xc0000f0000, 0x109a325, 0xc0000b4150)
        /Users/owen/.go/current/src/os/exec/exec.go:422 +0x8a9 fp=0xc000068e08 sp=0xc000068c00 pc=0x11c2d29
os/exec.(*Cmd).Run(0xc0000f0000, 0x4, 0xc000068eb0)
        /Users/owen/.go/current/src/os/exec/exec.go:338 +0x3d fp=0xc000068e48 sp=0xc000068e08 pc=0x11c23dd
github.com/owenthereal/test_go.TestExec(0xc000092c00)
        /Users/owen/code/src/github.com/owenthereal/test_go/main_test.go:13 +0x145 fp=0xc000068ed0 sp=0xc000068e48 pc=0x11c55c5
testing.tRunner(0xc000092c00, 0x1212800)
        /Users/owen/.go/current/src/testing/testing.go:1193 +0x203 fp=0xc000068fd0 sp=0xc000068ed0 pc=0x1152403
runtime.goexit()
        /Users/owen/.go/current/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc000068fd8 sp=0xc000068fd0 pc=0x10b1b41
created by testing.(*T).Run
        /Users/owen/.go/current/src/testing/testing.go:1238 +0x5d8

goroutine 21 [running]:
runtime.asmcgocall(0x10b3f60, 0xc0000687e8)
        /Users/owen/.go/current/src/runtime/asm_amd64.s:652 +0x42 fp=0xc000068790 sp=0xc000068788 pc=0x10b17a2
runtime.libcCall(0x10b3f60, 0xc0000687e8, 0x1212ff8)
        /Users/owen/.go/current/src/runtime/sys_libc.go:48 +0x6c fp=0xc0000687c0 sp=0xc000068790 pc=0x109aa4c
syscall.rawSyscall(0x10c7920, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /Users/owen/.go/current/src/runtime/sys_darwin.go:74 +0x4c fp=0xc0000687e8 sp=0xc0000687c0 pc=0x10aea8c
syscall.forkAndExecInChild(0xc0000b41b0, 0xc0000d2048, 0x3, 0x3, 0xc0000b8d00, 0x31, 0x31, 0x0, 0x0, 0xc000068b38, ...)
        /Users/owen/.go/current/src/syscall/exec_libc2.go:78 +0xeb fp=0xc0000688a8 sp=0xc0000687e8 pc=0x10c256b
syscall.forkExec(0xc0000b4150, 0x2c, 0xc0000ee000, 0x2, 0x2, 0xc000068b38, 0x20, 0x1, 0x2f0)
        /Users/owen/.go/current/src/syscall/exec_unix.go:211 +0x487 fp=0xc000068a50 sp=0xc0000688a8 pc=0x10c39c7
syscall.StartProcess(...)
        /Users/owen/.go/current/src/syscall/exec_unix.go:263
os.startProcess(0xc0000b4150, 0x2c, 0xc0000ee000, 0x2, 0x2, 0xc000068db0, 0x30, 0x0, 0x0)
        /Users/owen/.go/current/src/os/exec_posix.go:53 +0x44a fp=0xc000068b90 sp=0xc000068a50 pc=0x10e364a
os.StartProcess(0xc0000b4150, 0x2c, 0xc0000ee000, 0x2, 0x2, 0xc000068db0, 0x30, 0x10e852c, 0xc0000b4150)
        /Users/owen/.go/current/src/os/exec.go:106 +0x93 fp=0xc000068c00 sp=0xc000068b90 pc=0x10e30f3
os/exec.(*Cmd).Start(0xc0000f0000, 0x109a325, 0xc0000b4150)
        /Users/owen/.go/current/src/os/exec/exec.go:422 +0x8a9 fp=0xc000068e08 sp=0xc000068c00 pc=0x11c2d29
os/exec.(*Cmd).Run(0xc0000f0000, 0x4, 0xc000068eb0)
        /Users/owen/.go/current/src/os/exec/exec.go:338 +0x3d fp=0xc000068e48 sp=0xc000068e08 pc=0x11c23dd
github.com/owenthereal/test_go.TestExec(0xc000092c00)
        /Users/owen/code/src/github.com/owenthereal/test_go/main_test.go:13 +0x145 fp=0xc000068ed0 sp=0xc000068e48 pc=0x11c55c5
testing.tRunner(0xc000092c00, 0x1212800)
        /Users/owen/.go/current/src/testing/testing.go:1193 +0x203 fp=0xc000068fd0 sp=0xc000068ed0 pc=0x1152403
runtime.goexit()
        /Users/owen/.go/current/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc000068fd8 sp=0xc000068fd0 pc=0x10b1b41
created by testing.(*T).Run
        /Users/owen/.go/current/src/testing/testing.go:1238 +0x5d8

goroutine 1 [chan receive]:
testing.(*T).Run(0xc000092a80, 0x1209122, 0x8, 0x1212800, 0x0)
        /Users/owen/.go/current/src/testing/testing.go:1239 +0x610
testing.runTests.func1(0xc000092a80)
        /Users/owen/.go/current/src/testing/testing.go:1511 +0xa7
testing.tRunner(0xc000092a80, 0xc0000cdce0)
        /Users/owen/.go/current/src/testing/testing.go:1193 +0x203
testing.runTests(0xc0000d2018, 0x13179f0, 0x1, 0x1, 0xc059cdb18b403bd8, 0x8bb2d46c67, 0x131fae0, 0xc0000cdda0)
        /Users/owen/.go/current/src/testing/testing.go:1509 +0x613
testing.(*M).Run(0xc0000e6000, 0x0)
        /Users/owen/.go/current/src/testing/testing.go:1417 +0x3b4
main.main()
        _testmain.go:43 +0x237

rax    0x0
rbx    0xc867600
rcx    0x7ff7bfefe1c8
rdx    0x0
rdi    0x303
rsi    0x6
rbp    0x7ff7bfefe1f0
rsp    0x7ff7bfefe1c8
r8     0x0
r9     0x0
r10    0x0
r11    0x246
r12    0x303
r13    0x50
r14    0x6
r15    0x16
rip    0x7ff813714112
rflags 0x246
cs     0x7
fs     0x0
gs     0x0
    main_test.go:14: exit status 2
--- FAIL: TestExec (0.01s)
FAIL
FAIL    github.com/owenthereal/test_go  0.016s
FAIL

Loading

@zchee
Copy link
Contributor Author

@zchee zchee commented Nov 6, 2021

@owenthereal yeah, this issue basically occurs related to fork/exec. but actually, AFAIK root cause seems to be libcCall or asmcgocall. (therefore, I chose a related testcase when bug report)
Mysteriously, it also happened with runtime·systemstack_switch, even if this routine calls only RET.

Might to the root cause is kernel thread or scheduler with malloc.

Loading

@radutopala
Copy link

@radutopala radutopala commented Nov 9, 2021

The issue happens on Intel chips with Monterey as well, and using MallocNanoZone=0 fixes it.

Loading

@sethvargo
Copy link
Contributor

@sethvargo sethvargo commented Nov 9, 2021

I've also come across this on 12.0.1 (21A559) and can confirm that MallocNanoZone=0 fixes the issue.

@cherrymui - have you had a chance to dig in whether this is a problem with Go or a problem with Apple? Is there anything I can do to help?

Loading

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Nov 9, 2021

@sethvargo I think it is a problem with Apple, and Apple is looking into it.

Loading

@andig
Copy link
Contributor

@andig andig commented Nov 12, 2021

Noticed more of these in #49543 (comment)

Loading

@josharian josharian pinned this issue Nov 17, 2021
@bcmills bcmills changed the title runtime: race detector occurred SIGABRT or SIGSEGV in macOS Monterey runtime: race detector SIGABRT or SIGSEGV on macOS Monterey Nov 18, 2021
@Baha-sk
Copy link

@Baha-sk Baha-sk commented Nov 20, 2021

@sethvargo I think it is a problem with Apple, and Apple is looking into it.

@cherrymui is there a public issue that Apple is tracking? or is it internal to them?

Loading

@bcmills

This comment has been hidden.

@gopherbot
Copy link

@gopherbot gopherbot commented Nov 22, 2021

Change https://golang.org/cl/366254 mentions this issue: cmd/go: forward the MallocNanoZone variable to script tests

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented Nov 22, 2021

Change https://golang.org/cl/366257 mentions this issue: [release-branch.go1.17] cmd/go: forward the MallocNanoZone variable to script tests

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented Nov 22, 2021

Change https://golang.org/cl/366258 mentions this issue: [release-branch.go1.16] cmd/go: forward the MallocNanoZone variable to script tests

Loading

gopherbot pushed a commit that referenced this issue Nov 22, 2021
For #49138
Fixes #49723

Change-Id: Ia93130fdc042a1e2107be95cccd7e7eeaa909a87
Reviewed-on: https://go-review.googlesource.com/c/go/+/366254
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
gopherbot pushed a commit that referenced this issue Nov 22, 2021
…o script tests

For #49138
Updates #49723
Fixes #49728

Change-Id: Ia93130fdc042a1e2107be95cccd7e7eeaa909a87
Reviewed-on: https://go-review.googlesource.com/c/go/+/366254
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 189b4a2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/366258
TryBot-Result: Go Bot <gobot@golang.org>
gopherbot pushed a commit that referenced this issue Nov 22, 2021
…o script tests

For #49138
Updates #49723
Fixes #49729

Change-Id: Ia93130fdc042a1e2107be95cccd7e7eeaa909a87
Reviewed-on: https://go-review.googlesource.com/c/go/+/366254
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 189b4a2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/366257
TryBot-Result: Go Bot <gobot@golang.org>
@zpavlinovic zpavlinovic unpinned this issue Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet