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: pointer 0xc100000000 to unallocated span span.base()=0xc02cdc6000 span.limit=0xc02cdc7fe0 span.state=0 fatal error: found bad pointer in Go heap #1005

Open
huangyt39 opened this issue Jun 28, 2023 · 3 comments

Comments

@huangyt39
Copy link

huangyt39 commented Jun 28, 2023

Describe the bug

runtime: pointer 0xc100000000 to unallocated span span.base()=0xc02cdc6000 span.limit=0xc02cdc7fe0 span.state=0
fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)
runtime stack:
runtime.throw({0x11ae87e3?, 0x136ce410?})
/usr/local/go/src/runtime/panic.go:1047 +0x5d fp=0x7faabe12dc10 sp=0x7faabe12dbe0 pc=0x5fdeffd
runtime.badPointer(0x7faabd8240f0, 0x7faabe12dc88?, 0x0, 0x20?)
/usr/local/go/src/runtime/mbitmap.go:373 +0x150 fp=0x7faabe12dc60 sp=0x7faabe12dc10 pc=0x5fb3f50
runtime.findObject(0xc01d70e5a0?, 0x100000006?, 0xc010cce2b0?)
/usr/local/go/src/runtime/mbitmap.go:416 +0xa9 fp=0x7faabe12dc98 sp=0x7faabe12dc60 pc=0x5fb40e9
runtime.wbBufFlush1(0xc0000de000)
/usr/local/go/src/runtime/mwbbuf.go:260 +0xe5 fp=0x7faabe12dcf8 sp=0x7faabe12dc98 pc=0x5fd9b85
runtime.wbBufFlush.func1()
/usr/local/go/src/runtime/mwbbuf.go:201 +0x25 fp=0x7faabe12dd10 sp=0x7faabe12dcf8 pc=0x5fd99c5
runtime.systemstack()
/usr/local/go/src/runtime/asm_amd64.s:492 +0x49 fp=0x7faabe12dd18 sp=0x7faabe12dd10 pc=0x6014d09

goroutine 54050411 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:459 fp=0xc010ccdb10 sp=0xc010ccdb08 pc=0x6014ca0
runtime.wbBufFlush(0xc010ccdb60?, 0x600e5da?)
/usr/local/go/src/runtime/mwbbuf.go:200 +0x6c fp=0xc010ccdb30 sp=0xc010ccdb10 pc=0x5fd9a4c
runtime.wbBufFlush(0xc018497118, 0x117eb954)
:1 +0x2a fp=0xc010ccdb50 sp=0xc010ccdb30 pc=0x601942a
runtime.gcWriteBarrier()
/usr/local/go/src/runtime/asm_amd64.s:1692 +0xa3 fp=0xc010ccdbd0 sp=0xc010ccdb50 pc=0x6016fa3
runtime.gcWriteBarrierR9()
/usr/local/go/src/runtime/asm_amd64.s:1760 +0x7 fp=0xc010ccdbd8 sp=0xc010ccdbd0 pc=0x60170a7
runtime.mapassign_faststr(0x10693260, 0xc02d0a1080, {0x117eb954, 0x4})
/usr/local/go/src/runtime/map_faststr.go:296 +0x3d1 fp=0xc010ccdc50 sp=0xc010ccdbd8 pc=0x5fb2bf1
github.com/cloudwego/kitex/pkg/rpcinfo.NewMutableEndpointInfo({0xc0000c0091, 0xc}, {0x0, 0x0}, {0x0?, 0x0}, 0x10?)
/opt/tiger/compile_path/pkg/mod/github.com/cloudwego/[email protected]/pkg/rpcinfo/endpointInfo.go:143 +0x197 fp=0xc010ccdd08 sp=0xc010ccdc50 pc=0x6c7ca77
github.com/cloudwego/kitex/pkg/rpcinfo.NewEndpointInfo({0xc0000c0091?, 0x1183bc59?}, {0x0?, 0x12830720?}, {0x0?, 0x0?}, 0xc02763b800?)
/opt/tiger/compile_path/pkg/mod/github.com/cloudwego/[email protected]/pkg/rpcinfo/endpointInfo.go:150 +0x2d fp=0xc010ccdd50 sp=0xc010ccdd08 pc=0x6c7cb6d
github.com/cloudwego/kitex/pkg/rpcinfo.FromBasicInfo(...)
/opt/tiger/compile_path/pkg/mod/github.com/cloudwego/[email protected]/pkg/rpcinfo/endpointInfo.go:155
github.com/cloudwego/kitex/client.(*kClient).initRPCInfo(0xc01b7f8d20, {0x12808af8, 0xc028e565a0}, {0x1183bc59, 0x10})
/opt/tiger/compile_path/pkg/mod/github.com/cloudwego/[email protected]/client/client.go:321 +0x1de fp=0xc010ccde60 sp=0xc010ccdd50 pc=0x7b65d1e
github.com/cloudwego/kitex/client.(*kClient).Call(0xc01b7f8d20, {0x12808af8?, 0xc028e565a0?}, {0x1183bc59, 0x10}, {0x112bf980?, 0xc065e34d88}, {0x112bfb00?, 0xc065e34d90})
/opt/tiger/compile_path/pkg/mod/github.com/cloudwego/[email protected]/client/client.go:368 +0xb8 fp=0xc010ccdf50 sp=0xc010ccde60 pc=0x7b66378
github.com/cloudwego/kitex/client.(*kcFinalizerClient).Call(0x101aae20?, {0x12808af8?, 0xc028e565a0?}, {0x1183bc59?, 0x7b7a1ec?}, {0x112bf980?, 0xc065e34d88?}, {0x112bfb00?, 0xc065e34d90?})
/opt/tiger/compile_path/pkg/mod/github.com/cloudwego/[email protected]/client/client.go:88 +0xb8 fp=0xc010ccdfe0 sp=0xc010ccdf50 pc=0x7b63ab8
【biz code】...

Kitex version:

[email protected]

It looks like something wrong in this code:
image

@felix021
Copy link
Contributor

Did you use client.WithClientBasicInfo(...) or manually change the client.Options.Cli field in your business code?

The bad pointer error did happen on this line, but it doesn't mean that it's definitely caused by this code.

@longsizhuo
Copy link

I find the same problem on Windows, but I didn't use kitex in this project. It may not a error happend in kitex.

@Marina-Sakai
Copy link
Contributor

@huangyt39 Do you still have this problem when using kitex?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants