Skip to content

Deadlock in DefaultListableBeanFactory/DefaultSingletonBeanRegistry [SPR-10020] #14654

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

Closed
spring-projects-issues opened this issue Nov 23, 2012 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Nov 23, 2012

Glyn Normington opened SPR-10020 and commented

A user of Gemini Blueprint (nee Spring DM) has raised a bug ([1]) about a deadlock which appears to be caused by the combination of DefaultListableBeanFactory and DefaultSingletonBeanRegistry. I'm not sure which version of Spring framework they were using, but I checked the code at HEAD and the deadlock still appears to be possible.

The deadlock is easy to see in the bug description and involves two threads.

  1. The thread "EclipseGeminiBlueprintExtenderThread-20" has synchronised on ConcurrentHashMap@3b38bbfa in DefaultListableBeanFactory.resetBeanDefinition while calling destroySingleton which then blocks waiting for LinkedHashMap@9c772ae.

  2. The thread "Gemini Blueprint context shutdown thread" has synchronised on LinkedHashMap@9c772ae in DefaultSingletonBeanRegistry.destroySingletons while calling destroySingleton which results in a call to removeSingleton which then blocks waiting for ConcurrentHashMap@3b38bbfa.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=384080


Affects: 3.1.3, 3.2 RC1

Reference URL: https://bugs.eclipse.org/bugs/show_bug.cgi?id=384080

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

Glyn Normington commented

Thanks Juergen!

Also, from the user who raised the Blueprint bug:

(In reply to comment #4)

(In reply to comment #3)

A fix has been scheduled for Spring framework 3.2 RC2 and 3.1.4.

Perfect - thanks a lot for the effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants