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

MMapDirectory shouldn't pass along OOM wrapped as IOException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.8
    • Fix Version/s: 4.9, 6.0
    • Component/s: core/store
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The bug here is in java (not MMapDir), but i think we shoudl do something.

      Users get confused when they configure their JVM to trigger something on OOM, and then see "OutOfMemoryError: Map Failed": but their trigger doesnt fire.

      Thats because in the jdk, when it maps files it catches OutOfMemoryError, asks for a garbage collection, sleeps for 100 milliseconds, then tries to map again. if it fails a second time it wraps the OOM in a generic IOException.

      I think we should add a try/catch to our filechannel.map

        Attachments

        1. LUCENE-5673.patch
          1 kB
          Uwe Schindler
        2. LUCENE-5673.patch
          3 kB
          Uwe Schindler
        3. LUCENE-5673.patch
          3 kB
          Uwe Schindler
        4. LUCENE-5673.patch
          4 kB
          Uwe Schindler

          Activity

            People

            • Assignee:
              thetaphi Uwe Schindler
              Reporter:
              rcmuir Robert Muir
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: