Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-1326

Inflater.end() method not always called in FieldsReader

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.4
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      We've just found an insidious memory leak in our own application as we did not always call Deflater.end() and Inflater.end(). As documented here;

      http://bugs.sun.com/view_bug.do?bug_id=4797189

      The non-heap memory that the native zlib code uses is not freed in a timely manner.

      FieldsWriter appears safe as no exception can be thrown between the Deflater's creation and end() as it uses a ByteArrayOutputStream

      FieldsReader, however, is not safe. In the event of a DataFormatException the call to end() will not occur.

        Attachments

          Activity

            People

            • Assignee:
              mikemccand Michael McCandless
              Reporter:
              rnewson Robert Newson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: