Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2178

Possible memory leak in XMLReaderManager

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.7, 2.6
    • None
    • transformation
    • None
    • PatchAvailable

    Description

      The XMLReaderManager caches the used XMLReader in a thread local variable. In multi tasking environments this is a possible memory leak, as the XMLReader (and everything referenced by this component) is still referenced after the process is finished - until another request uses the same thread.
      In our case this is causing out of memory exceptions.
      I don't know what the correct path to this problem is. For now, we removed the thread locals in the XMLReaderManager completly and created a new reader each time - which has a minor performance downside, but our application is still running
      I think one possible solution would be to clean up the reader when the transformation is finished - if this is possible.
      Another solution would be to make this configurable using a property?

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            cziegeler Carsten Ziegeler

            Dates

              Created:
              Updated:

              Slack

                Issue deployment