Description
What version of Go are you using (go version
)?
go version go1.17 darwin/amd64
What operating system and processor architecture are you using (go env
)?
Darwin Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64
macOS Monterey 12.0.1
What did you do?
go build -race -o main main.go
./main
// main.go
package main
import (
"fmt"
"net/http"
"sync"
)
var wg sync.WaitGroup
func main() {
n := 10
wg.Add(n)
for i := 0; i < n; i++ {
go run()
}
wg.Wait()
}
func run() {
defer wg.Done()
req, err := http.NewRequest("GET", "https://www.google.com", nil)
if err != nil {
fmt.Println(err.Error())
return
}
_, err = http.DefaultClient.Do(req)
if err != nil {
fmt.Println(err.Error())
return
}
}
objc[12720]: Attempt to use unknown class 0x7ff858038360.
SIGABRT: abort
PC=0x7ff816804dfe m=5 sigcode=0
goroutine 0 [idle]:
runtime: unknown pc 0x7ff816804dfe
stack: frame={sp:0x70000b1a8e58, fp:0x0} stack=[0x70000b12a338,0x70000b1a9f38)
0x000070000b1a8d58: 0x0000000000000002 0x0000000000000002
0x000070000b1a8d68: 0x000000000207b000 0x000000000207b400
0x000070000b1a8d78: 0x0000000000000002 0x000070000b1a8de0
0x000070000b1a8d88: 0x00007ff81663a639 0x0000000000000000
0x000070000b1a8d98: 0xf68f0000c0001002 0x000000000000ffff
0x000070000b1a8da8: 0x0000000000000030 0x0000000000000000
0x000070000b1a8db8: 0x000000000000002d 0x000000000000002d
0x000070000b1a8dc8: 0x0000000000000000 0x000000000207b000
0x000070000b1a8dd8: 0x00007ff85804c000 0x000070000b1a8e10
0x000070000b1a8de8: 0x00007ff81663a566 0x00007ff81663a52e
0x000070000b1a8df8: 0x000000000000002d 0x0000000000000001
0x000070000b1a8e08: 0x00007ff85804c000 0x000070000b1a8e50
0x000070000b1a8e18: 0x00007ff816656ad6 0x000000000000002c
0x000070000b1a8e28: 0x000000000000002d 0x0000600003300000
0x000070000b1a8e38: 0x0000000000000003 0x0000600002c00000
0x000070000b1a8e48: 0x0000000000000000 0x000070000b1a8e80
0x000070000b1a8e58: <0x00007ff816806893 0x0000000000000000
0x000070000b1a8e68: 0x000000200b1a8ec0 0x0000600002c00000
0x000070000b1a8e78: 0x000070000b1a8ec0 0x0000600003300000
0x000070000b1a8e88: 0x0000000000000003 0x0000000000000080
0x000070000b1a8e98: 0x0000000000000001 0x000070000b1a8eb0
0x000070000b1a8ea8: 0x00007ff816806843 0x000070000b1a8ef0
0x000070000b1a8eb8: 0x00007ff8166d2bce 0x0000600002c00080
0x000070000b1a8ec8: 0x0000000000000000 0x0000600002c00000
0x000070000b1a8ed8: 0x00007ffffffffff8 0x00007ff858038360
0x000070000b1a8ee8: 0x0000000080080001 0x000070000b1a8fd0
0x000070000b1a8ef8: 0x00007ff8166d2b5c 0x0000003000000010
0x000070000b1a8f08: 0x000070000b1a8fe0 0x000070000b1a8f20
0x000070000b1a8f18: 0x0000000000000000 0x0000000000000000
0x000070000b1a8f28: 0x00007ff858038360 0x00007ff858038360
0x000070000b1a8f38: 0x0000000000000001 0x00000000ffffffff
0x000070000b1a8f48: 0x0000000000000000 0x0000000000000000
runtime: unknown pc 0x7ff816804dfe
stack: frame={sp:0x70000b1a8e58, fp:0x0} stack=[0x70000b12a338,0x70000b1a9f38)
0x000070000b1a8d58: 0x0000000000000002 0x0000000000000002
0x000070000b1a8d68: 0x000000000207b000 0x000000000207b400
0x000070000b1a8d78: 0x0000000000000002 0x000070000b1a8de0
0x000070000b1a8d88: 0x00007ff81663a639 0x0000000000000000
0x000070000b1a8d98: 0xf68f0000c0001002 0x000000000000ffff
0x000070000b1a8da8: 0x0000000000000030 0x0000000000000000
0x000070000b1a8db8: 0x000000000000002d 0x000000000000002d
0x000070000b1a8dc8: 0x0000000000000000 0x000000000207b000
0x000070000b1a8dd8: 0x00007ff85804c000 0x000070000b1a8e10
0x000070000b1a8de8: 0x00007ff81663a566 0x00007ff81663a52e
0x000070000b1a8df8: 0x000000000000002d 0x0000000000000001
0x000070000b1a8e08: 0x00007ff85804c000 0x000070000b1a8e50
0x000070000b1a8e18: 0x00007ff816656ad6 0x000000000000002c
0x000070000b1a8e28: 0x000000000000002d 0x0000600003300000
0x000070000b1a8e38: 0x0000000000000003 0x0000600002c00000
0x000070000b1a8e48: 0x0000000000000000 0x000070000b1a8e80
0x000070000b1a8e58: <0x00007ff816806893 0x0000000000000000
0x000070000b1a8e68: 0x000000200b1a8ec0 0x0000600002c00000
0x000070000b1a8e78: 0x000070000b1a8ec0 0x0000600003300000
0x000070000b1a8e88: 0x0000000000000003 0x0000000000000080
0x000070000b1a8e98: 0x0000000000000001 0x000070000b1a8eb0
0x000070000b1a8ea8: 0x00007ff816806843 0x000070000b1a8ef0
0x000070000b1a8eb8: 0x00007ff8166d2bce 0x0000600002c00080
0x000070000b1a8ec8: 0x0000000000000000 0x0000600002c00000
0x000070000b1a8ed8: 0x00007ffffffffff8 0x00007ff858038360
0x000070000b1a8ee8: 0x0000000080080001 0x000070000b1a8fd0
0x000070000b1a8ef8: 0x00007ff8166d2b5c 0x0000003000000010
0x000070000b1a8f08: 0x000070000b1a8fe0 0x000070000b1a8f20
0x000070000b1a8f18: 0x0000000000000000 0x0000000000000000
0x000070000b1a8f28: 0x00007ff858038360 0x00007ff858038360
0x000070000b1a8f38: 0x0000000000000001 0x00000000ffffffff
0x000070000b1a8f48: 0x0000000000000000 0x0000000000000000
goroutine 22 [syscall]:
runtime.cgocall(0x1001080, 0xc000099ca0)
/usr/local/opt/go/libexec/src/runtime/cgocall.go:156 +0x6e fp=0xc000099c78 sp=0xc000099c40 pc=0x10441ee
net._C2func_getaddrinfo(0xc0000ca001, 0x0, 0xc00009e270, 0xc0000a2038)
_cgo_gotypes.go:97 +0x8b fp=0xc000099ca0 sp=0xc000099c78 pc=0x120126b
net.cgoLookupIPCNAME.func1({0xc0000ca001, 0xf, 0xc0000ae018}, 0x0, 0x15b54e0)
/usr/local/opt/go/libexec/src/net/cgo_unix.go:163 +0xb2 fp=0xc000099d10 sp=0xc000099ca0 pc=0x1203932
net.cgoLookupIPCNAME({0x1389b95, 0x3}, {0xc0000ae018, 0xc00001e0e8})
/usr/local/opt/go/libexec/src/net/cgo_unix.go:163 +0x26e fp=0xc000099f10 sp=0xc000099d10 pc=0x1202e2e
net.cgoIPLookup(0x15b54f0, {0x1389b95, 0x3}, {0xc0000ae018, 0xe})
/usr/local/opt/go/libexec/src/net/cgo_unix.go:220 +0x67 fp=0xc000099f80 sp=0xc000099f10 pc=0x1203a47
net.cgoLookupIP·dwrap·22()
/usr/local/opt/go/libexec/src/net/cgo_unix.go:230 +0x72 fp=0xc000099fe0 sp=0xc000099f80 pc=0x12040f2
runtime.goexit()
/usr/local/opt/go/libexec/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000099fe8 sp=0xc000099fe0 pc=0x10a5441
created by net.cgoLookupIP
/usr/local/opt/go/libexec/src/net/cgo_unix.go:230 +0x1ba