Description
pramod p opened SPR-9910 and commented
Our application was working fine on spring 2.5 and Websphere-6.X .We upgraded to Spring 3.1.1 and WAS-8.X recently.After that we having server crashed due to out of memory error,due to the LinkedCaseInsensitiveMap are not getting garbage collected.I mean it not gettin de-referenced even after use.Below is the response from IBM.
After several attempts at analyzing the heapdump, I think I finally
succeeded. There is a 5 million element array containing only
org.springframework objects, and it's also holding onto approximately 6
GB of the heap.
========================================================================
Class_Name@Address Shallow_Heap Retained_Heap
java.util.ArrayList @ 0x9d503d50 24 5,897,305,288 bytes
java.lang.Object[6463408] @ 0x1628fc220 25,853,648 5,897,305,264 bytes
org.springframework.util.LinkedCaseInsensitiveMap @ 0x4d61c968 64 1,152
org.springframework.util.LinkedCaseInsensitiveMap @ 0xf6b8c050 64 1,152
org.springframework.util.LinkedCaseInsensitiveMap @ 0xecfcd938 64 1,152
org.springframework.util.LinkedCaseInsensitiveMap @ 0xdaa35b00 64 1,152
org.springframework.util.LinkedCaseInsensitiveMap @ 0xf1c64ea8 64 1,152
...
...
...
========================================================================
I'm not familiar with this array or what SpringFramework uses it for,
but it's the root cause of the out of memory. So far looking inside
the objects I've found primitive variables as well as hashmaps.
Looking up the API for SpringFramework, it seem this is simply a
hashmap that stores String keys and preserves the original order. The
javacores that we have for this PMR does not show direct access to
these objects, but I know SpringFramework is being used behind the
scenes in your application.
Talk to your application developers or contact your vendor concerning
these calls, as something has to release data from this hashmap, but it
appears not to be doing that.
Affects: 3.1.1