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

zipkin tracing filter cause deadlock #5955

Closed
YoKv opened this issue Apr 1, 2020 · 2 comments
Closed

zipkin tracing filter cause deadlock #5955

YoKv opened this issue Apr 1, 2020 · 2 comments
Assignees
Milestone

Comments

@YoKv
Copy link

YoKv commented Apr 1, 2020

Environment

  • Dubbo version: 2.7.6
  • spring boot : 2.2.6
  • Java version: 1.8

Steps to reproduce this issue

            <dependency>
                <groupId>io.zipkin.brave</groupId>
                <artifactId>brave-instrumentation-dubbo</artifactId>
                <version>5.10.1</version>
            </dependency>

        consumerConfig.setFilter("tracing");
"main@1" prio=5 tid=0x1 nid=NA waiting for monitor entry
  java.lang.Thread.State: BLOCKED
	 blocks com.alibaba.nacos.naming.client.listener@10585
	 waiting for com.alibaba.nacos.naming.client.listener@10585 to release lock on <0x2a6a> (a org.apache.dubbo.registry.integration.RegistryDirectory)
	  at org.apache.dubbo.registry.integration.RegistryDirectory.notify(RegistryDirectory.java:230)
	  at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:426)
	  at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:373)
	  at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:364)
	  at org.apache.dubbo.registry.nacos.NacosRegistry.notifySubscriber(NacosRegistry.java:445)
	  at org.apache.dubbo.registry.nacos.NacosRegistry.lambda$doSubscribe$3(NacosRegistry.java:175)
	  at org.apache.dubbo.registry.nacos.NacosRegistry$$Lambda$918.846919473.callback(Unknown Source:-1)
	  at org.apache.dubbo.registry.nacos.NacosRegistry.execute(NacosRegistry.java:499)
	  at org.apache.dubbo.registry.nacos.NacosRegistry.doSubscribe(NacosRegistry.java:169)
	  at org.apache.dubbo.registry.nacos.NacosRegistry.doSubscribe(NacosRegistry.java:165)
	  at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:299)
	  at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
	  at org.apache.dubbo.registry.integration.RegistryDirectory.subscribe(RegistryDirectory.java:185)
	  at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:429)
	  at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:410)
	  at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:159)
	  at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:73)
	  at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:70)
	  at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java:-1)
	  at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:318)
	  at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:258)
	  - locked <0x2ad5> (a org.apache.dubbo.config.spring.ReferenceBean)
	  at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:158)
	  at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.getOrCreateProxy(ReferenceAnnotationBeanPostProcessor.java:274)
	  at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:143)
	  at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.getInjectedObject(AbstractAnnotationBeanPostProcessor.java:359)
	  at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor$AnnotatedFieldElement.inject(AbstractAnnotationBeanPostProcessor.java:539)
	  at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
	  at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:142)
	  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1427)
	  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
	  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
	  at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
	  at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$187.80756779.getObject(Unknown Source:-1)
	  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	  - locked <0x2a6b> (a java.util.concurrent.ConcurrentHashMap)
	  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
	  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	  at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	  at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1290)
	  at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1210)
	  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
	  at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
	  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
	  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422)
	  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
	  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
	  at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
	  at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$187.80756779.getObject(Unknown Source:-1)
	  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
	  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882)
	  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
	  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
	  - locked <0x2ad6> (a java.lang.Object)
	  at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
	  at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
	  at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
	  at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
	  at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
	  at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
	  at com.xxx.form.Application.main(Application.java:24)

"com.alibaba.nacos.naming.client.listener@10585" daemon prio=5 tid=0x57 nid=NA waiting for monitor entry
  java.lang.Thread.State: BLOCKED
	 blocks main@1
	 waiting for main@1 to release lock on <0x2a6b> (a java.util.concurrent.ConcurrentHashMap)
	  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:179)
	  at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:517)
	  at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:530)
	  at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:502)
	  at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:488)
	  at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1230)
	  at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:228)
	  at com.alibaba.spring.util.BeanFactoryUtils.getBeans(BeanFactoryUtils.java:80)
	  at com.alibaba.spring.util.BeanFactoryUtils.getOptionalBean(BeanFactoryUtils.java:59)
	  at org.apache.dubbo.config.spring.extension.SpringExtensionFactory.getExtension(SpringExtensionFactory.java:69)
	  at org.apache.dubbo.common.extension.factory.AdaptiveExtensionFactory.getExtension(AdaptiveExtensionFactory.java:47)
	  at org.apache.dubbo.common.extension.ExtensionLoader.injectExtension(ExtensionLoader.java:657)
	  at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:614)
	  at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:405)
	  - locked <0x2a69> (a org.apache.dubbo.common.utils.Holder)
	  at org.apache.dubbo.common.extension.ExtensionLoader.getActivateExtension(ExtensionLoader.java:280)
	  at org.apache.dubbo.common.extension.ExtensionLoader.getActivateExtension(ExtensionLoader.java:228)
	  at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.buildInvokerChain(ProtocolFilterWrapper.java:54)
	  at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:161)
	  at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:75)
	  at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:72)
	  at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java:-1)
	  at org.apache.dubbo.registry.integration.RegistryDirectory.toInvokers(RegistryDirectory.java:455)
	  at org.apache.dubbo.registry.integration.RegistryDirectory.refreshInvoker(RegistryDirectory.java:312)
	  at org.apache.dubbo.registry.integration.RegistryDirectory.refreshOverrideAndInvoker(RegistryDirectory.java:271)
	  at org.apache.dubbo.registry.integration.RegistryDirectory.notify(RegistryDirectory.java:254)
	  - locked <0x2a6a> (a org.apache.dubbo.registry.integration.RegistryDirectory)
	  at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:426)
	  at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:373)
	  at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:364)
	  at org.apache.dubbo.registry.nacos.NacosRegistry.notifySubscriber(NacosRegistry.java:445)
	  at org.apache.dubbo.registry.nacos.NacosRegistry.lambda$subscribeEventListener$10(NacosRegistry.java:425)
	  at org.apache.dubbo.registry.nacos.NacosRegistry$$Lambda$919.2074544955.onEvent(Unknown Source:-1)
	  at com.alibaba.nacos.client.naming.core.EventDispatcher$Notifier.run(EventDispatcher.java:128)
	  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	  at java.lang.Thread.run(Thread.java:745)

maybe SpringExtensionFactory Extension will cuase this issues

@chickenlj chickenlj added this to the 2.7.7 milestone Apr 2, 2020
@mercyblitz
Copy link
Contributor

Please refer this issue to resolve : #5956

@YoKv
Copy link
Author

YoKv commented Apr 3, 2020

thanks a lot

@YoKv YoKv closed this as completed Apr 3, 2020
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

3 participants