Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK Previous
-
None
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Browser: Firefox 2.x
Language Found: English
Description
Steps to reproduce:
1. Deploy the LCDS samples.war on WebLogic in exploded format.
2. Use the webtier compiler to compile a few mxml pages.
3. Undeploy the war but leave WL up
Repeat steps to continuously increase size of memory leak
Actual Results:
With a memory profiler attached to the server, you can see that about 20 MB are leaked per mxml page that is compiled. If steps above are repeated enough times, the server will crash with an OutOfMemory error. The backtrace that is responsible for the leak is:
swc of flex2.compiler.swc.SwcFile
value of java.util.HashMap$Entry
[15] of java.util.HashMap$Entry[17]
table of java.util.HashMap
value of java.lang.ThreadLocal$ThreadLocalMap$Entry
[23] of java.lang.ThreadLocal$ThreadLocalMap$Entry[65]
table of java.lang.ThreadLocal$ThreadLocalMap
threadLocals of weblogic.work.ExecuteThread [JNI Global, Stack Local, Thread, Monitor Used]
The SwcFile objects have references to a large object graph of other flex2.compiler.* objects that add up to cause the leak.
Expected Results:
Webtier compiler does not cause any memory leaks. The ThreadLocal references should either be cleaned up once the thread has completed its work or cached in a different place that is accessible on servlet destroy so that it can be cleaned up at that point.
Workaround (if any):
Do not use the webtier compiler.