You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/09/20 09:23:49 UTC

[GitHub] carryxyh edited a comment on issue #2539: When adding @Referenc in Multicast registry, deadlock happened.

carryxyh edited a comment on issue #2539: When adding @Referenc in Multicast registry, deadlock happened.
URL: https://github.com/apache/incubator-dubbo/issues/2539#issuecomment-423105964
 
 
   The log is already obvious.
   When the main thread initializes the spring container, it locks org.springframework.beans.factory.support.DefaultSingletonBeanRegistry#singletonObjects and then tries to lock a RegistryDirectory when executing MulticastRegistry.doSubscribe.
   
   The DubboMulticastRegistryReceiver thread locks the RegistryDirectory when it is in MulticastRegistry.receive. When it gets the bean, it tries to lock org.springframework.beans.factory.support.DefaultSingletonBeanRegistry#singletonObjects and deadlock.
   
   So it seems that we need to synchronize the execution of MulticastRegistry.this.receive in the MulticastRegistry contructor to eliminate deadlock.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org