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

Memory leak per unique thread caused by RandomizedContext.contexts static map

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.1, 6.0
    • None
    • None
    • New

    Description

      In digging on the hard-to-understand OOMEs with
      TestDirectPostingsFormat ... I found (thank you YourKit) that
      RandomizedContext (in randomizedtesting JAR) seems to be holding onto
      all threads created by the test. The test does create many very short
      lived threads (testing the thread safety of the postings format), in
      BasePostingsFormatTestCase.testTerms), and somehow these seem to tie
      up a lot (~100 MB) of RAM in RandomizedContext.contexts static map.

      For now I've disabled all thread testing (committed false && inside
      BPFTC.testTerms), but hopefully we can fix the root cause here, eg
      when a thread exits can we clear it from that map?

      Attachments

        1. LUCENE-4451.patch
          8 kB
          Dawid Weiss

        Activity

          People

            dweiss Dawid Weiss
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: