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 client panic, CacheListener.AddListener #2759

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

Triple client panic, CacheListener.AddListener #2759

zhangcunli opened this issue Dec 4, 2024 · 0 comments

Comments

@zhangcunli
Copy link

Environment

  • Server: Dubbo Java v3.3.0
  • Client: dubbo-go v3.2.0-rc2
  • Protocol: triple bidi stream
  • Registry: zk

Issue description

CacheListener.AddListener panic

Logs

fatal error: concurrent map writes
fatal error: concurrent map writes

goroutine 1201 [running]:
dubbo.apache.org/dubbo-go/v3/metadata/report/zookeeper.(*CacheListener).AddListener(0xc011eaf900, {0xc0137ef440, 0x39}, {0x10369bf08, 0xc0157db780})
	/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/metadata/report/zookeeper/listener.go:61 +0xbf
dubbo.apache.org/dubbo-go/v3/metadata/report/zookeeper.(*zookeeperMetadataReport).GetServiceAppMapping(0xc0121cfbc0, {0x102b577d7?, 0x102b577d7?}, {0x102ae9242?, 0x100fb9a60?}, {0x10369bf08, 0xc0157db780})
	/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/metadata/report/zookeeper/report.go:186 +0xa5
dubbo.apache.org/dubbo-go/v3/metadata/mapping/metadata.(*MetadataServiceNameMapping).Get(0x30?, 0x682d08?, {0x10369bf08, 0xc0157db780})
	/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/metadata/mapping/metadata/service_name_mapping.go:83 +0xfe
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceDiscoveryRegistry).findMappedServices(0xc0139b57a0, 0xc015cceb60, {0x10369bf08, 0xc0157db780})
	/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/registry/servicediscovery/service_discovery_registry.go:338 +0x48
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceDiscoveryRegistry).getServices(0xc0139b57a0, 0xc015cceb60, {0x10369bf08, 0xc0157db780})
	/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(0xc0139b57a0, 0xc015cceb60, {0x10369b698, 0xc00df43ac0})
	/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(0xc00df43ac0, 0xc015cceb60)
	/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(0x103224aa0?, 0xc015ccec40)
	/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({0xc010f209e0, 0x1, 0xc015cceb60?}, 0xc008cd4000)
	/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(0xc01588b220, {0x0, 0x0}, 0xc0157db640)
	/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(0xc010f209c0, {0x102b577d7, 0x2a}, 0xc0157db640, {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(...)
	/Users/zhangcunli/Documents/work/src/proxy/fusion-gateway.dev/vendor/dubbo.apache.org/dubbo-go/v3/client/client.go:103
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

1 participant