Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-5661

PriorityQueue has OOM (Requested array size exceeds VM limit) issue

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.3.1, 4.4, 4.5, 4.5.1, 4.6
    • Fix Version/s: 4.7, 6.0
    • Labels:
      None
    • Environment:

      JDK 7

      Description

      It look like JDK7 change the design for max_array_length logic, it isn't max_jint, and it should be max_jint - header_size(type).

      If you deliver the Integer.MaxValue to create the PriorityQueue and have enough memory, you will find it is ok in JVM6 but not work in JVM7.

      JVM7 will throw OOM error while do array rang checking.

      It should the compatible issue between JVM6 and JVM7.

      Maybe need protect in the code logic, throw OOM look like big issues for customer.

        Attachments

          Activity

            People

            • Assignee:
              mikemccand Michael McCandless
              Reporter:
              raintung.li Raintung Li
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: