Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3555

FlateFilter.decode cause native memory leaks

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.12, 2.0.3, 3.0.0 PDFBox
    • Fix Version/s: 1.8.13, 2.0.4, 3.0.0 PDFBox
    • Component/s: None
    • Labels:
      None
    • Environment:
      Debian wheezy 7.11 / oracle JDK 8 - 64 bit / pdfbox 2.0.3

      Description

      The FlateFilter.decode method calls the private method FlateFilter.decompress which instanciates a java.util.zip.Inflater.

      But this method never calls the Inflater.end method so I think the native memory allocated by the Inflater is never released.

      By consequence, the java process memory size keeps growing over time.

      The simplest way we found to fix this is to call the Inflater.end when the inflater has done its job and is not used anymore at the end of FlateFilter.decompress.

      With this fix, the java process memory size remains stable over time.

      Just ask me if more details are needed.

        Attachments

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              Tyoras Yoan Alvarez
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: