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

Triple bidi stream, client panic #2758

Open
zhangcunli opened this issue Dec 4, 2024 · 2 comments
Open

Triple bidi stream, client panic #2758

zhangcunli opened this issue Dec 4, 2024 · 2 comments

Comments

@zhangcunli
Copy link

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
Copy link
Contributor

how to reproduce ?

@zhangcunli
Copy link
Author

zhangcunli commented Dec 4, 2024

how to reproduce ?

  1. triple server
  2. gateway: Every request, New one triple client by dubbo.NewInstance().
  3. client: client --> gateway-->triple request
  4. And I write a shell to send request:
for i in {1..200}; do
    echo "Iteration $i"
    nohup ./myclient &
done
  1. run the shell

zhangcunli pushed a commit to zhangcunli/dubbo-go that referenced this issue Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants