Memory leak in case of concurrent access to Templates object
------------------------------------------------------------
Key: XALANJ-2171
URL: http://issues.apache.org/jira/browse/XALANJ-2171
Project: XalanJ2
Type: Bug
Components: transformation
Versions: 2.6, 2.4
Environment: JBoss 3.2.6 AS, JDK 1.4.2, Windows 2000
Reporter: Nicolas Bonmariage
Priority: Critical
I use Xalan/Xerces to perform FOP processing inside a J2EE application.
I recently introduced the use of Templates object as a performance optimization.
As the spec says Templates objects have to thread safe, I used it as static
field from which I creates Transformer objects.
Note that each thread receives its own Transformer object, so the use seems
correct regarding threading issues.
However I noticed thereafter a memory leak inside the AS in case of important
load.
Using a profiling tool, I saw TransformerImpl objects (and the associated
object graph) filling up the memory.
The root to the GC showed references from the static Templates field.
I observed this phenomenon wih Xalan 2.4.1 but upgrading to version 2.6 did not
help.
The reference graph shows something like :
StylesheetRoot (static) -> Vector[ElemTemplate] -> ... -> SAX2DTM ->
TransformerImpl
I can attach the full graph if needed.
I saw related issues talking about Iterator objects keeping references and
there are indeed Iterator objects involved in the reference graph.
But in my case this shows up only in the case of an heavily threaded
environment.
Anyway, the result is an application server whose memory is filled up and
unusable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]