Closed
Description
Tommy Becker opened SPR-8008 and commented
We are having issues with OOM errors during unit test runs. The runs setup and subsequently tear down a lot of Spring contexts, and we're noticing the BeanFactory instances are not getting cleaned up. Analysis of heap dumps shows that the Cglib2AopProxy.ProxyCallbackFilter, which is cached by cglib, maintains a chain of strong references back to the BeanFactory. Did some searching and it looks like the same type of problem as described in this older issue:
https://jira.springsource.org/browse/SPR-3620
Attached is a graphic showing the reference chain.
Affects: 3.0.3
Reference URL: http://forum.springsource.org/showthread.php?t=104193
Attachments:
- References.png (36.56 kB)
Issue Links:
- Cglib2AopProxy weak reference causes perm space to fill up [SPR-4004] #8684 Cglib2AopProxy weak reference causes perm space to fill up
- ProxyFactory memory leak using cglib [SPR-3620] #8302 ProxyFactory memory leak using cglib
- ConfigurationClassEnhancer prevents BeanFactory from being GCd [SPR-7901] #12556 ConfigurationClassEnhancer prevents BeanFactory from being GCd
- Inconsistent hashCode/equals implementation in AbstractPointcutAdvisor results in CGLIB-related memory leak [SPR-12556] #17158 Inconsistent hashCode/equals implementation in AbstractPointcutAdvisor results in CGLIB-related memory leak
- Prevent memory leaks with @Configuration beans [SPR-9851] #14484 Prevent memory leaks with
@Configuration
beans - Method injection causes memory leak [SPR-10785] #15411 Method injection causes memory leak
- @Async with cglib based proxy causes memory leak in permgen [SPR-11276] #15900
@Async
with cglib based proxy causes memory leak in permgen
Backported to: 3.1.4
8 votes, 6 watchers