zfkun opened a new issue #1014:
URL: https://github.com/apache/dubbo-go/issues/1014
**What happened**:
consumer (go) 运行调用时若 provider (java) 服务重启 会出现空指针错误引起 panic
**What you expected to happen**:
不产生 panic, 返回 error 即可
**How to reproduce it (as minimally and precisely as possible)**:
- consumer (golang 1.15 & dubbo-go 1.5.5) 单例
- provider (java 11) 单例
- zookeeper (3.6.0)
- server (centos 7.7)
consumer 正常调用 provider 之后,手工仅重启 provider 服务 (kill 进程),
若此时 consumer 继续调用 provider 大概率出现 panic
**Anything else we need to know?**:
错误日志 (部分)
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1c pc=0xa334fb]
goroutine 27 [running]:
github.com/apache/dubbo-go/remoting/getty.(*gettyRPCClientPool).get(0x0,
0x0, 0x0, 0x0)
/Users/zfkun/go/pkg/mod/github.com/apache/[email protected]/remoting/getty/pool.go:377
+0x9b
github.com/apache/dubbo-go/remoting/getty.(*gettyRPCClientPool).getGettyRpcClient(0x0,
0xc00022c008, 0x14, 0xc000bdf518, 0x9c3275, 0xc0004c0480)
/Users/zfkun/go/pkg/mod/github.com/apache/[email protected]/remoting/getty/pool.go:362
+0x2f
github.com/apache/dubbo-go/remoting/getty.(*Client).selectSession(0xc0002ae840,
0xc00022c008, 0x14, 0xc000000000, 0xc000bdf578, 0x9c2899, 0xc0000981e0, 0x2)
/Users/zfkun/go/pkg/mod/github.com/apache/[email protected]/remoting/getty/getty_client.go:212
+0x4a
github.com/apache/dubbo-go/remoting/getty.(*Client).IsAvailable(0xc0002ae840,
0x10000c000e805e8)
/Users/zfkun/go/pkg/mod/github.com/apache/[email protected]/remoting/getty/getty_client.go:205
+0x3c
github.com/apache/dubbo-go/remoting.(*ExchangeClient).IsAvailable(...)
/Users/zfkun/go/pkg/mod/github.com/apache/[email protected]/remoting/exchange_client.go:175
github.com/apache/dubbo-go/protocol/dubbo.(*DubboInvoker).IsAvailable(0xc000172180,
0xc00016a560)
/Users/zfkun/go/pkg/mod/github.com/apache/[email protected]/protocol/dubbo/dubbo_invoker.go:165
+0x38
github.com/apache/dubbo-go/protocol/protocolwrapper.(*FilterInvoker).IsAvailable(0xc000f32480,
0xc000154600)
/Users/zfkun/go/pkg/mod/github.com/apache/[email protected]/protocol/protocolwrapper/protocol_filter_wrapper.go:110
+0x34
github.com/apache/dubbo-go/cluster/cluster_impl.(*baseClusterInvoker).doSelectInvoker(0xc000172280,
0xd36ce0, 0x11eaa68, 0xd4c300, 0xc000c22580, 0xc000154600, 0x2, 0x2, 0x0, 0x0,
...)
/Users/zfkun/go/pkg/mod/github.com/apache/[email protected]/cluster/cluster_impl/base_cluster_invoker.go:135
+0xc4
github.com/apache/dubbo-go/cluster/cluster_impl.(*baseClusterInvoker).doSelect(0xc000172280,
0xd36ce0, 0x11eaa68, 0xd4c300, 0xc000c22580, 0xc000154600, 0x2, 0x2, 0x0, 0x0,
...)
/Users/zfkun/go/pkg/mod/github.com/apache/[email protected]/cluster/cluster_impl/base_cluster_invoker.go:115
+0x239
github.com/apache/dubbo-go/cluster/cluster_impl.(*failoverClusterInvoker).Invoke(0xc000172280,
0xd45fa0, 0xc0000b6038, 0xd4c300, 0xc000c22580, 0xc0002127a0, 0x74)
/Users/zfkun/go/pkg/mod/github.com/apache/[email protected]/cluster/cluster_impl/failover_cluster_invoker.go:79
+0x2f4
github.com/apache/dubbo-go/common/proxy.(*Proxy).Implement.func1.1(0xc0007a9e60,
0x4, 0x4, 0xc0007a9e60, 0x0, 0xc000e80ca0)
/Users/zfkun/go/pkg/mod/github.com/apache/[email protected]/common/proxy/proxy.go:161
+0x556
reflect.callReflect(0xc0001f4ed0, 0xc000bdfdb8, 0xc000bdfda0)
/usr/local/go/src/reflect/value.go:564 +0x32a
reflect.makeFuncStub(0xd45fa0, 0xc0000b6038, 0xc69930, 0x1, 0xc001098df8,
0x4, 0xc001098e20, 0x6, 0xc00021c300, 0x4, ...)
/usr/local/go/src/reflect/asm_amd64.s:20 +0x42
```
----------------------------------------------------------------
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]