Triple bidi stream, client panic
Closed this issue · 2 comments
zhangcunli commented
Environment
- Server: Dubbo-go, v3.2.0-rc2
- Client: Dubbo-go, v3.3.0
- Protocol: Triple
- Registry: zk
Issue description
client panic
Logs
Click me to check logs
name = 127.0.0.1:2181, zkAddress = 127.0.0.1:2181, timeout = 5s
fatal error: concurrent map writes
goroutine 4642 [running]:
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceDiscoveryRegistry).findMappedServices(0xc001515680, 0xc00d912ee0, {0x1032b4f08, 0xc00d56c780})
/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/registry/servicediscovery/service_discovery_registry.go:345 +0xc9
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceDiscoveryRegistry).getServices(0xc001515680, 0xc00d912ee0, {0x1032b4f08, 0xc00d56c780})
/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/registry/servicediscovery/service_discovery_registry.go:329 +0xbe
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceDiscoveryRegistry).Subscribe(0xc001515680, 0xc00d912ee0, {0x1032b4698, 0xc0119e7250})
/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/registry/servicediscovery/service_discovery_registry.go:217 +0x2c6
dubbo.apache.org/dubbo-go/v3/registry/directory.(*ServiceDiscoveryRegistryDirectory).Subscribe(0xc0119e7250, 0xc00d912ee0)
/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/registry/directory/directory.go:614 +0x49
dubbo.apache.org/dubbo-go/v3/registry/protocol.(*registryProtocol).Refer(0x102e3daa0?, 0xc00d912fc0)
/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/registry/protocol/protocol.go:158 +0x1f8
dubbo.apache.org/dubbo-go/v3/client.buildInvoker({0xc001465bc0, 0x1, 0xc00d912ee0?}, 0xc01ad96780)
/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/client/action.go:229 +0x17b
dubbo.apache.org/dubbo-go/v3/client.(*ReferenceOptions).refer(0xc00d4d4a00, {0x0, 0x0}, 0xc00d56c640)
/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/client/action.go:150 +0x4a5
dubbo.apache.org/dubbo-go/v3/client.(*ReferenceOptions).ReferWithInfo(...)
/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/client/action.go:93
dubbo.apache.org/dubbo-go/v3/client.(*Client).dial(0xc001465ba0, {0x1027707d7, 0x2a}, 0xc00d56c640, {0x0, 0x0, 0x0?})
/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/client/client.go:136 +0x5d0
dubbo.apache.org/dubbo-go/v3/client.(*Client).DialWithInfo(...)
FoghostCn commented
how to reproduce ?
zhangcunli commented
how to reproduce ?
- triple server
- gateway: Every request, New one triple client by dubbo.NewInstance().
- client: client --> gateway-->triple request
- And I write a shell to send request:
for i in {1..200}; do
echo "Iteration $i"
nohup ./myclient &
done
- run the shell