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

Memory Leak in AbstractBeanFactory, alreadyCreated HashSet not cleaned on failure in doGetBean [SPR-10896] #15524

spring-issuemaster opened this issue Sep 5, 2013 · 0 comments


Copy link

@spring-issuemaster spring-issuemaster commented Sep 5, 2013

Paul Anderson opened SPR-10896 and commented

In the doGetMethod the bean name to alreadyCreated HashSet but if there is a failure in creation this entry is not removed leading to a leak.

In our particular case the bean is a redirect with a name containing all of the unique parameters. getMergedLocalBeanDefinition, which is not in a try-catch block, throws a NoSuchBeanException therefore doGetBean throws without removing the entry from alreadyCreated.

And it would appear that at no other failure point in the method is the entry removed from Already created.

This has also be noted by CXF and worked around in their code (

Which also lead to the same local fix in Mule (mulesoft/mule#21)

Affects: 3.2.4, 4.0 M3

Referenced from: commits 13a68c6, e213561

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.