whitekeyboard opened a new issue #1100:
URL: https://github.com/apache/dubbo-go/issues/1100
注册中心为nacos,provider频繁上线时,consumer会出现以下异常:
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x9edf17]
goroutine 278 [running]:
github.com/apache/dubbo-go/protocol/protocolwrapper.buildInvokerChain(0x0,
0x0, 0x103ff2f, 0x10, 0xc00020d000, 0xc000010201)
src/github.com/apache/dubbo-go/protocol/protocolwrapper/protocol_filter_wrapper.go:71
+0x37
github.com/apache/dubbo-go/protocol/protocolwrapper.(*ProtocolFilterWrapper).Refer(0xc000436ed0,
0xc00016cd80, 0x1036eac, 0x6)
src/github.com/apache/dubbo-go/protocol/protocolwrapper/protocol_filter_wrapper.go:62
+0x74
github.com/apache/dubbo-go/registry/directory.(*RegistryDirectory).cacheInvoker(0xc00016ca80,
0xc00016ccc0, 0x1c, 0xc000509b00)
src/github.com/apache/dubbo-go/registry/directory/directory.go:299
+0x562
github.com/apache/dubbo-go/registry/directory.(*RegistryDirectory).cacheInvokerByEvent(0xc00016ca80,
0xc0005099e0, 0x1b, 0xc000509a80, 0x1, 0x1)
src/github.com/apache/dubbo-go/registry/directory/directory.go:185
+0x11d
github.com/apache/dubbo-go/registry/directory.(*RegistryDirectory).refreshInvokers(0xc00016ca80,
0xc000308020, 0x1, 0x1)
src/github.com/apache/dubbo-go/registry/directory/directory.go:133
+0x11a
created by
github.com/apache/dubbo-go/registry/directory.(*RegistryDirectory).Notify
src/github.com/apache/dubbo-go/registry/directory/directory.go:107
+0x5d
```
初步定位了一下:
```
// Notify monitor changes from registry,and update the cacheServices
func (dir *RegistryDirectory) Notify(event *registry.ServiceEvent) {
if event == nil {
return
}
go dir.refreshInvokers(event)
}
```
provider上下线时,此处是go协程处理,同一个interface的下线处理和上线处理可能并行处理invoker, 导致panic。
出现概率:偶现
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]