Title:
Bug 86893:(Watson Migration Closure)Memory grows as new structure keys are added
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): / Matthew Lesko (orangepips)
Created: 05/05/2011
Components: Language, Datastructure
Versions: 9.0.1
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Major / Unknown
Locale/System: English / Platforms All
Vote Count: 5
Problem:
Memory grows as new structure keys are added.
Method:
Consistently, I am able to generate a Java Heap Space OutOfMemory exception with the following code on ColdFusion 9.01 (haven't tried earlier versions): <cfset uuidGenerator = createObject("java", "java.util.UUID")> <cfset transient = structNew()> <cfloop from="1" to="100000" index="index"> <cfset transient[uuidGenerator.randomUUID().toString()] = true> </cfloop>The code above uses the Java UUID class because its faster than ColdFusion's. The structure itself does not exist after the request (i.e. it's not in some persistent scope such as `application`). As a test, I generate a heap dump just after initializing the server. Then I run this code several times and see the tenured generation fill through jConsole. After, I run another heap dump. Using Eclipse Memory Analysis Tool's Leak report I can see one large object rooted on `coldfusion.util.Key`.
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3043808
External Customer Info:
External Company:
External Customer Name: Matthew Lesko
External Customer Email: 4AA7507C445A5477992016B6
External Test Config: 05/05/2011
Attachments:
Comments: