You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Morris Kwan (JIRA)" <xa...@xml.apache.org> on 2004/11/22 17:02:28 UTC

[jira] Created: (XALANJ-1999) Memory leak from DTMManager

Memory leak from DTMManager
---------------------------

         Key: XALANJ-1999
         URL: http://nagoya.apache.org/jira/browse/XALANJ-1999
     Project: XalanJ2
        Type: Bug
  Components: DTM  
    Versions: 2.6    
    Reporter: Morris Kwan
 Assigned to: Morris Kwan 


Similar to bug 1844, this problem also became
evident after the introduction of XMLReaderManager. The leak
described by 1844 is an incremental leak, where the leaked memory
increases over time, eventually resulting in an out-of-memory error.
The leak here is less serious. Only one DTM is leaked per thread. In
most cases it is unlikely to cause an out-of-memory error. 

The problem:
XMLReaderManager maintains a pool of XMLReaders and tries to reuse
them across transformations. An XMLReader has references to the DTM
objects because we call the XMLReader.setContentHandler/setDTDHandler/
setErrorHandler methods in DTMManagerDefault. The references are not
released after the tranformation is done. Therefore an active XMLReader
always has reference to the last DTM it created. In multi-thread
scenarios, we might use multiple XMLReaders, where each thread leaks its
own DTM, adding up to a bigger total leak.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-1999) Memory leak from DTMManager

Posted by "Morris Kwan (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-1999?page=comments#action_59987 ]
     
Morris Kwan commented on XALANJ-1999:
-------------------------------------

The patch was applied to the CVS. It is not in any official driver.

> Memory leak from DTMManager
> ---------------------------
>
>          Key: XALANJ-1999
>          URL: http://issues.apache.org/jira/browse/XALANJ-1999
>      Project: XalanJ2
>         Type: Bug
>   Components: DTM
>     Versions: 2.6
>     Reporter: Morris Kwan
>     Assignee: Morris Kwan
>  Attachments: 1999.patch
>
> Similar to bug 1844, this problem also became
> evident after the introduction of XMLReaderManager. The leak
> described by 1844 is an incremental leak, where the leaked memory
> increases over time, eventually resulting in an out-of-memory error.
> The leak here is less serious. Only one DTM is leaked per thread. In
> most cases it is unlikely to cause an out-of-memory error. 
> The problem:
> XMLReaderManager maintains a pool of XMLReaders and tries to reuse
> them across transformations. An XMLReader has references to the DTM
> objects because we call the XMLReader.setContentHandler/setDTDHandler/
> setErrorHandler methods in DTMManagerDefault. The references are not
> released after the tranformation is done. Therefore an active XMLReader
> always has reference to the last DTM it created. In multi-thread
> scenarios, we might use multiple XMLReaders, where each thread leaks its
> own DTM, adding up to a bigger total leak.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-1999) Memory leak from DTMManager

Posted by "Daniel Pfeifer (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-1999?page=comments#action_58595 ]
     
Daniel Pfeifer commented on XALANJ-1999:
----------------------------------------

Well, better reopen it. Neither the first nor the other suggested bugfix solves any problems.

> Memory leak from DTMManager
> ---------------------------
>
>          Key: XALANJ-1999
>          URL: http://issues.apache.org/jira/browse/XALANJ-1999
>      Project: XalanJ2
>         Type: Bug
>   Components: DTM
>     Versions: 2.6
>     Reporter: Morris Kwan
>     Assignee: Morris Kwan
>  Attachments: 1999.patch
>
> Similar to bug 1844, this problem also became
> evident after the introduction of XMLReaderManager. The leak
> described by 1844 is an incremental leak, where the leaked memory
> increases over time, eventually resulting in an out-of-memory error.
> The leak here is less serious. Only one DTM is leaked per thread. In
> most cases it is unlikely to cause an out-of-memory error. 
> The problem:
> XMLReaderManager maintains a pool of XMLReaders and tries to reuse
> them across transformations. An XMLReader has references to the DTM
> objects because we call the XMLReader.setContentHandler/setDTDHandler/
> setErrorHandler methods in DTMManagerDefault. The references are not
> released after the tranformation is done. Therefore an active XMLReader
> always has reference to the last DTM it created. In multi-thread
> scenarios, we might use multiple XMLReaders, where each thread leaks its
> own DTM, adding up to a bigger total leak.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-1999) Memory leak from DTMManager

Posted by "Morris Kwan (JIRA)" <xa...@xml.apache.org>.
     [ http://nagoya.apache.org/jira/browse/XALANJ-1999?page=comments#action_55751 ]
     
Morris Kwan commented on XALANJ-1999:
-------------------------------------

Reviewed by Christine Li (jycli@ca.ibm.com).

> Memory leak from DTMManager
> ---------------------------
>
>          Key: XALANJ-1999
>          URL: http://nagoya.apache.org/jira/browse/XALANJ-1999
>      Project: XalanJ2
>         Type: Bug
>   Components: DTM
>     Versions: 2.6
>     Reporter: Morris Kwan
>     Assignee: Morris Kwan
>  Attachments: 1999.patch
>
> Similar to bug 1844, this problem also became
> evident after the introduction of XMLReaderManager. The leak
> described by 1844 is an incremental leak, where the leaked memory
> increases over time, eventually resulting in an out-of-memory error.
> The leak here is less serious. Only one DTM is leaked per thread. In
> most cases it is unlikely to cause an out-of-memory error. 
> The problem:
> XMLReaderManager maintains a pool of XMLReaders and tries to reuse
> them across transformations. An XMLReader has references to the DTM
> objects because we call the XMLReader.setContentHandler/setDTDHandler/
> setErrorHandler methods in DTMManagerDefault. The references are not
> released after the tranformation is done. Therefore an active XMLReader
> always has reference to the last DTM it created. In multi-thread
> scenarios, we might use multiple XMLReaders, where each thread leaks its
> own DTM, adding up to a bigger total leak.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-1999) Memory leak from DTMManager

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-1999?page=all ]

Brian Minchau updated XALANJ-1999:
----------------------------------

    Fix Version: 2.7

> Memory leak from DTMManager
> ---------------------------
>
>          Key: XALANJ-1999
>          URL: http://issues.apache.org/jira/browse/XALANJ-1999
>      Project: XalanJ2
>         Type: Bug
>   Components: DTM
>     Versions: 2.6
>     Reporter: Morris Kwan
>     Assignee: Morris Kwan
>      Fix For: 2.7
>  Attachments: 1999.patch
>
> Similar to bug 1844, this problem also became
> evident after the introduction of XMLReaderManager. The leak
> described by 1844 is an incremental leak, where the leaked memory
> increases over time, eventually resulting in an out-of-memory error.
> The leak here is less serious. Only one DTM is leaked per thread. In
> most cases it is unlikely to cause an out-of-memory error. 
> The problem:
> XMLReaderManager maintains a pool of XMLReaders and tries to reuse
> them across transformations. An XMLReader has references to the DTM
> objects because we call the XMLReader.setContentHandler/setDTDHandler/
> setErrorHandler methods in DTMManagerDefault. The references are not
> released after the tranformation is done. Therefore an active XMLReader
> always has reference to the last DTM it created. In multi-thread
> scenarios, we might use multiple XMLReaders, where each thread leaks its
> own DTM, adding up to a bigger total leak.

-- 
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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-1999) Memory leak from DTMManager

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-1999?page=comments#action_59984 ]
     
Brian Minchau commented on XALANJ-1999:
---------------------------------------

Daniel, 
Morris opened this issue and supplied the patch, which was reviewed by Christine. So this problem must fix the problem he opened the issue for. It isn't correct to say that it doesn't fix any problems.

Morris, 
is this patch applied to CVS? The issue is in "Resolved" status so I presume that it was applied. Please confirm one way or the other.

> Memory leak from DTMManager
> ---------------------------
>
>          Key: XALANJ-1999
>          URL: http://issues.apache.org/jira/browse/XALANJ-1999
>      Project: XalanJ2
>         Type: Bug
>   Components: DTM
>     Versions: 2.6
>     Reporter: Morris Kwan
>     Assignee: Morris Kwan
>  Attachments: 1999.patch
>
> Similar to bug 1844, this problem also became
> evident after the introduction of XMLReaderManager. The leak
> described by 1844 is an incremental leak, where the leaked memory
> increases over time, eventually resulting in an out-of-memory error.
> The leak here is less serious. Only one DTM is leaked per thread. In
> most cases it is unlikely to cause an out-of-memory error. 
> The problem:
> XMLReaderManager maintains a pool of XMLReaders and tries to reuse
> them across transformations. An XMLReader has references to the DTM
> objects because we call the XMLReader.setContentHandler/setDTDHandler/
> setErrorHandler methods in DTMManagerDefault. The references are not
> released after the tranformation is done. Therefore an active XMLReader
> always has reference to the last DTM it created. In multi-thread
> scenarios, we might use multiple XMLReaders, where each thread leaks its
> own DTM, adding up to a bigger total leak.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Closed: (XALANJ-1999) Memory leak from DTMManager

Posted by "Morris Kwan (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-1999?page=all ]
     
Morris Kwan closed XALANJ-1999:
-------------------------------


> Memory leak from DTMManager
> ---------------------------
>
>          Key: XALANJ-1999
>          URL: http://issues.apache.org/jira/browse/XALANJ-1999
>      Project: XalanJ2
>         Type: Bug
>   Components: DTM
>     Versions: 2.6
>     Reporter: Morris Kwan
>     Assignee: Morris Kwan
>      Fix For: 2.7
>  Attachments: 1999.patch
>
> Similar to bug 1844, this problem also became
> evident after the introduction of XMLReaderManager. The leak
> described by 1844 is an incremental leak, where the leaked memory
> increases over time, eventually resulting in an out-of-memory error.
> The leak here is less serious. Only one DTM is leaked per thread. In
> most cases it is unlikely to cause an out-of-memory error. 
> The problem:
> XMLReaderManager maintains a pool of XMLReaders and tries to reuse
> them across transformations. An XMLReader has references to the DTM
> objects because we call the XMLReader.setContentHandler/setDTDHandler/
> setErrorHandler methods in DTMManagerDefault. The references are not
> released after the tranformation is done. Therefore an active XMLReader
> always has reference to the last DTM it created. In multi-thread
> scenarios, we might use multiple XMLReaders, where each thread leaks its
> own DTM, adding up to a bigger total leak.

-- 
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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Resolved: (XALANJ-1999) Memory leak from DTMManager

Posted by "Morris Kwan (JIRA)" <xa...@xml.apache.org>.
     [ http://nagoya.apache.org/jira/browse/XALANJ-1999?page=history ]
     
Morris Kwan resolved XALANJ-1999:
---------------------------------

    Resolution: Fixed

> Memory leak from DTMManager
> ---------------------------
>
>          Key: XALANJ-1999
>          URL: http://nagoya.apache.org/jira/browse/XALANJ-1999
>      Project: XalanJ2
>         Type: Bug
>   Components: DTM
>     Versions: 2.6
>     Reporter: Morris Kwan
>     Assignee: Morris Kwan
>  Attachments: 1999.patch
>
> Similar to bug 1844, this problem also became
> evident after the introduction of XMLReaderManager. The leak
> described by 1844 is an incremental leak, where the leaked memory
> increases over time, eventually resulting in an out-of-memory error.
> The leak here is less serious. Only one DTM is leaked per thread. In
> most cases it is unlikely to cause an out-of-memory error. 
> The problem:
> XMLReaderManager maintains a pool of XMLReaders and tries to reuse
> them across transformations. An XMLReader has references to the DTM
> objects because we call the XMLReader.setContentHandler/setDTDHandler/
> setErrorHandler methods in DTMManagerDefault. The references are not
> released after the tranformation is done. Therefore an active XMLReader
> always has reference to the last DTM it created. In multi-thread
> scenarios, we might use multiple XMLReaders, where each thread leaks its
> own DTM, adding up to a bigger total leak.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-1999) Memory leak from DTMManager

Posted by "Morris Kwan (JIRA)" <xa...@xml.apache.org>.
     [ http://nagoya.apache.org/jira/browse/XALANJ-1999?page=history ]

Morris Kwan updated XALANJ-1999:
--------------------------------

    Attachment: 1999.patch

Proposed fix for the memory leak

> Memory leak from DTMManager
> ---------------------------
>
>          Key: XALANJ-1999
>          URL: http://nagoya.apache.org/jira/browse/XALANJ-1999
>      Project: XalanJ2
>         Type: Bug
>   Components: DTM
>     Versions: 2.6
>     Reporter: Morris Kwan
>     Assignee: Morris Kwan
>  Attachments: 1999.patch
>
> Similar to bug 1844, this problem also became
> evident after the introduction of XMLReaderManager. The leak
> described by 1844 is an incremental leak, where the leaked memory
> increases over time, eventually resulting in an out-of-memory error.
> The leak here is less serious. Only one DTM is leaked per thread. In
> most cases it is unlikely to cause an out-of-memory error. 
> The problem:
> XMLReaderManager maintains a pool of XMLReaders and tries to reuse
> them across transformations. An XMLReader has references to the DTM
> objects because we call the XMLReader.setContentHandler/setDTDHandler/
> setErrorHandler methods in DTMManagerDefault. The references are not
> released after the tranformation is done. Therefore an active XMLReader
> always has reference to the last DTM it created. In multi-thread
> scenarios, we might use multiple XMLReaders, where each thread leaks its
> own DTM, adding up to a bigger total leak.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org