Closed
Description
LiangFei opened SPR-9199 and commented
- init BeanX (a RPC bean)
- RPC -> BeanX -> getBean() // get bean thread
- init BeanY // init context thread
The "get bean thread" and the "init context thread" deadlock.
-
get bean thread:
(a) DefaultSingletonBeanRegistry.getSingleton(): synchronized(singletonObjects)
(b) -> getObject() -> DefaultListableBeanFactory.getBeanNames(): synchronized(beanDefinitionMap) -
init context thread:
(a) DefaultListableBeanFactory.preInstantiateSingletons(): synchronized(beanDefinitionMap)
(b) -> getBean() -> DefaultSingletonBeanRegistry.getSingleton(): synchronized(singletonObjects)
Affects: 2.5.6
Attachments:
- lock-get-bean.jpg (107.23 kB)
- lock-init-context.jpg (38.31 kB)
Issue Links:
- Performance bottleneck and potential thread deadlock in DefaultSingletonBeanRegistry [SPR-8471] #13117 Performance bottleneck and potential thread deadlock in DefaultSingletonBeanRegistry ("duplicates")