profile
viewpoint

Ask questionscmd/cgo error: runtime: unknown pc 0x7fff5c805b86

<!-- Please answer these questions before submitting your issue. Thanks! -->

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

<pre> $ go version go version go1.11.4 darwin/amd64 </pre>

Does this issue reproduce with the latest release?

yes

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

<details><summary><code>go env</code> Output</summary><br><pre> $ go env GOARCH="amd64" GOBIN="" GOCACHE="/Users/wolf4j/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/wolf4j/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11.4/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11.4/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qz/g2fh76dx5rj4q_fbkfh1q3th0000gn/T/go-build617776264=/tmp/go-build -gno-record-gcc-switches -fno-common"

</pre></details>

What did you do?

<!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. -->

I am using cgo to call cpp related code logic, the following error occurs.

What did you see instead?

=== RUN   TestClient_ValidationHostName
libc++abi.dylib: terminating with uncaught exception of type 
boost::exception_detail::clone_impl<boost::exception_detail::
error_info_injector<boost::system::system_error> >:
handshake: short read
SIGABRT: abort
PC=0x7fff5c805b86 m=0 sigcode=0

goroutine 0 [idle]:
runtime: unknown pc 0x7fff5c805b86
stack: frame={sp:0x7ffeefbfe898, fp:0x0} stack=[0x7ffeefb80748,0x7ffeefbff7b0)
00007ffeefbfe798:  0000000000000000  0000000000000000 
00007ffeefbfe7a8:  0000000000000000  0000000000000000 
00007ffeefbfe7b8:  0000000000000000  00007ffeefbfe800 
00007ffeefbfe7c8:  0000000000000000  0000000000000000 
00007ffeefbfe7d8:  0000000000000000  0000000000000000 
00007ffeefbfe7e8:  0000000032aaaba2  00007ffeefbfe930 
00007ffeefbfe7f8:  00007fff59e079f0  0000000000000000 
00007ffeefbfe808:  0000000032aaaba2  0000000000000000 
00007ffeefbfe818:  0000000000000000  0000000000000000 
00007ffeefbfe828:  0000000000000000  0000000000000000 
00007ffeefbfe838:  0000000000000000  0000000000000000 
00007ffeefbfe848:  0000000000000003  0000000000000000 
00007ffeefbfe858:  0000000000000000  0000000000000000 
00007ffeefbfe868:  0000000000000000  00007fff8e4d9240 
00007ffeefbfe878:  00007fff8e4d8ca0  00007fff5c74e48c 
00007ffeefbfe888:  0000000000000000  00007ffeefbfe8d0 
00007ffeefbfe898: <00007fff5c8bbc50  00000000059225c0 
00007ffeefbfe8a8:  00007ffeefbfe8e8  00007ffeefbfea40 
00007ffeefbfe8b8:  0000003000000008  00007fff59e079f0 
00007ffeefbfe8c8:  00007fff8e4d99a0  00007ffeefbfe900 
00007ffeefbfe8d8:  00007fff5c76f1c9  00007ffeefbfea40 
00007ffeefbfe8e8:  00000030ffffffdf  ffffffff59e079f0 
00007ffeefbfe8f8:  00007ffeefbfea00  00007ffeefbfea30 
00007ffeefbfe908:  00007fff59dfa231  0000003000000020 
00007ffeefbfe918:  00007ffeefbfea40  00007ffeefbfe950 
00007ffeefbfe928:  0000000000000000  0000003000000020 
00007ffeefbfe938:  00007ffeefbfea40  00007ffeefbfe950 
00007ffeefbfe948:  00007ffeefbfe998  00007ffeefbfe980 
00007ffeefbfe958:  00007fff59e07a78  00007ffeefbfea40 
00007ffeefbfe968:  0000000007612421  646165722074726f 
00007ffeefbfe978:  ffffffff00000000  00007ffeefbfe9b0 
00007ffeefbfe988:  0000000004e09b44  00000000048d6eb0 
runtime: unknown pc 0x7fff5c805b86
stack: frame={sp:0x7ffeefbfe898, fp:0x0} stack=[0x7ffeefb80748,0x7ffeefbff7b0)
00007ffeefbfe798:  0000000000000000  0000000000000000 
00007ffeefbfe7a8:  0000000000000000  0000000000000000 
00007ffeefbfe7b8:  0000000000000000  00007ffeefbfe800 
00007ffeefbfe7c8:  0000000000000000  0000000000000000 
00007ffeefbfe7d8:  0000000000000000  0000000000000000 
00007ffeefbfe7e8:  0000000032aaaba2  00007ffeefbfe930 
00007ffeefbfe7f8:  00007fff59e079f0  0000000000000000 
00007ffeefbfe808:  0000000032aaaba2  0000000000000000 
00007ffeefbfe818:  0000000000000000  0000000000000000 
00007ffeefbfe828:  0000000000000000  0000000000000000 
00007ffeefbfe838:  0000000000000000  0000000000000000 
00007ffeefbfe848:  0000000000000003  0000000000000000 
00007ffeefbfe858:  0000000000000000  0000000000000000 
00007ffeefbfe868:  0000000000000000  00007fff8e4d9240 
00007ffeefbfe878:  00007fff8e4d8ca0  00007fff5c74e48c 
00007ffeefbfe888:  0000000000000000  00007ffeefbfe8d0 
00007ffeefbfe898: <00007fff5c8bbc50  00000000059225c0 
00007ffeefbfe8a8:  00007ffeefbfe8e8  00007ffeefbfea40 
00007ffeefbfe8b8:  0000003000000008  00007fff59e079f0 
00007ffeefbfe8c8:  00007fff8e4d99a0  00007ffeefbfe900 
00007ffeefbfe8d8:  00007fff5c76f1c9  00007ffeefbfea40 
00007ffeefbfe8e8:  00000030ffffffdf  ffffffff59e079f0 
00007ffeefbfe8f8:  00007ffeefbfea00  00007ffeefbfea30 
00007ffeefbfe908:  00007fff59dfa231  0000003000000020 
00007ffeefbfe918:  00007ffeefbfea40  00007ffeefbfe950 
00007ffeefbfe928:  0000000000000000  0000003000000020 
00007ffeefbfe938:  00007ffeefbfea40  00007ffeefbfe950 
00007ffeefbfe948:  00007ffeefbfe998  00007ffeefbfe980 
00007ffeefbfe958:  00007fff59e07a78  00007ffeefbfea40 
00007ffeefbfe968:  0000000007612421  646165722074726f 
00007ffeefbfe978:  ffffffff00000000  00007ffeefbfe9b0 
00007ffeefbfe988:  0000000004e09b44  00000000048d6eb0 

goroutine 5 [syscall]:
runtime.cgocall(0x42938e0, 0xc000055b48, 0x36a1096a455c2d6b)
	/usr/local/Cellar/go/1.11.4/libexec/src/runtime/cgocall.go:128 +0x5e fp=0xc000055b18 sp=0xc000055ae0 pc=0x4004b1e
github.com/apache/pulsar/pulsar-client-go/pulsar._Cfunc__pulsar_client_create_producer_async(0x7415dd0, 0x7611210, 0x74037f0, 0x76111f0)
	_cgo_gotypes.go:199 +0x45 fp=0xc000055b48 sp=0xc000055b18 pc=0x427d685
github.com/apache/pulsar/pulsar-client-go/pulsar.createProducerAsync.func23(0x7415dd0, 0x7611210, 0x74037f0, 0x76111f0)
	/Users/wolf4j/github.com/apache/pulsar/pulsar-client-go/pulsar/c_producer.go:143 +0xce fp=0xc000055b80 sp=0xc000055b48 pc=0x428d30e
github.com/apache/pulsar/pulsar-client-go/pulsar.createProducerAsync(0xc000058fc0, 0x433db4c, 0x16, 0x0, 0x0, 0xc00008d110, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/wolf4j/github.com/apache/pulsar/pulsar-client-go/pulsar/c_producer.go:143 +0x347 fp=0xc000055c78 sp=0xc000055b80 pc=0x42870d7
github.com/apache/pulsar/pulsar-client-go/pulsar.(*client).CreateProducerAsync(0xc000058fc0, 0x433db4c, 0x16, 0x0, 0x0, 0xc00008d110, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/wolf4j/github.com/apache/pulsar/pulsar-client-go/pulsar/c_client.go:212 +0x6c fp=0xc000055d18 sp=0xc000055c78 pc=0x428387c
github.com/apache/pulsar/pulsar-client-go/pulsar.(*client).CreateProducer(0xc000058fc0, 0x433db4c, 0x16, 0x0, 0x0, 0xc00008d110, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/wolf4j/github.com/apache/pulsar/pulsar-client-go/pulsar/c_client.go:199 +0xc6 fp=0xc000055de0 sp=0xc000055d18 pc=0x4283766
github.com/apache/pulsar/pulsar-client-go/pulsar.TestClient_ValidationHostName(0xc000104100)
	/Users/wolf4j/github.com/apache/pulsar/pulsar-client-go/pulsar/client_test.go:151 +0x31f fp=0xc000055fa8 sp=0xc000055de0 pc=0x427417f
testing.tRunner(0xc000104100, 0x434d3a8)
	/usr/local/Cellar/go/1.11.4/libexec/src/testing/testing.go:827 +0xbf fp=0xc000055fd0 sp=0xc000055fa8 pc=0x40d3c2f
runtime.goexit()
	/usr/local/Cellar/go/1.11.4/libexec/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc000055fd8 sp=0xc000055fd0 pc=0x405cd01
created by testing.(*T).Run
	/usr/local/Cellar/go/1.11.4/libexec/src/testing/testing.go:878 +0x35c

goroutine 1 [chan receive]:
testing.(*T).Run(0xc000104100, 0x433ffef, 0x1d, 0x434d3a8, 0x4076d01)
	/usr/local/Cellar/go/1.11.4/libexec/src/testing/testing.go:879 +0x383
testing.runTests.func1(0xc000104000)
	/usr/local/Cellar/go/1.11.4/libexec/src/testing/testing.go:1119 +0x78
testing.tRunner(0xc000104000, 0xc0000a9e08)
	/usr/local/Cellar/go/1.11.4/libexec/src/testing/testing.go:827 +0xbf
testing.runTests(0xc00000c4c0, 0x45905e0, 0x16, 0x16, 0x400d96f)
	/usr/local/Cellar/go/1.11.4/libexec/src/testing/testing.go:1117 +0x2aa
testing.(*M).Run(0xc000100000, 0x0)
	/usr/local/Cellar/go/1.11.4/libexec/src/testing/testing.go:1034 +0x165
main.main()
	_testmain.go:84 +0x13d

rax    0x0
rbx    0x59225c0
rcx    0x7ffeefbfe898
rdx    0x0
rdi    0x307
rsi    0x6
rbp    0x7ffeefbfe8d0
rsp    0x7ffeefbfe898
r8     0x7ffeefbfe758
r9     0x7500000
r10    0x0
r11    0x206
r12    0x307
r13    0x3000000008
r14    0x6
r15    0x2d
rip    0x7fff5c805b86
rflags 0x206
cs     0x7
fs     0x0
gs     0x0

Process finished with exit code 1

golang/go

Answer questions ALTree

@neal1991 this issue is closed, please open a new one with all your system details. Thanks!

useful!

Related questions

cmd/link: segmentation fault during mach-o linking hot 6
cmd/vet: potential false positive in the "suspect or" check hot 3
cmd/go: cannot find module providing package error stops `go get` processing hot 3
vendor/golang.org/x/xerrors/adaptor_go1_13.go:16:14: undefined: errors.Frame ... hot 2
internal/poll: transparently support new linux io_uring interface hot 2
Plis fixit! Its not good!!! hot 2
cmd/go: needs a better error than "missing dot in first path element" when GOROOT is set incorrectly hot 2
x/mobile: gomobile bind is failing with latest version [+cafc553] of gomobile hot 2
cmd/go: "found, but does not contain package" error refers to replaced version instead of its replacement hot 2
x/xerrors: fails to compile on tip hot 1
cmd/go: `go clean <package>` downloads modules hot 1
runtime: crash with "invalid pc-encoded table" hot 1
cmd/link: showing many ld warnings of "building for macOS, but linking in object file" hot 1
runtime: go program crach, it seems fall into infinite loop hot 1
cmd/go: major version without preceding tag must be v0, not v1 - breaks build of github.com/go-check hot 1
Github User Rank List