Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6945136

Java Web Start - Maximum heap size significantly reduced since 1.6.0_18

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • 7
    • 6u10
    • deploy
    • x86
    • windows_xp

    Description

      FULL PRODUCT VERSION :
      java version "1.6.0_20"
      Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
      Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      System 1: 32bit, 4GB RAM
      System 2: 32bit, 2GB RAM


      A DESCRIPTION OF THE PROBLEM :
      We have observed that the largest max-heap-size that can be configured for an application launched with JWS is significantly reduced since JDK 1.6.0_18.

      The application is started on a Win XP (32-bit) machine with 4GB RAM. Up to and including JDK 1.6.0_17 we were able to set the max-heap-size up to 1398MB on that machine. Since 1.6.0_18 the launch gets immediately aborted with the error message "Could not create the Java virtual machine." whenever the configured max-heap-size exceeds 926MB!

      On a second machine (Win XP, 2GB RAM) the maximum supported value is now also 926MB instead of 1126MB with the older JDK.

      If the same application is started locally (without Web Start) the newer JDK (tested with 1.6.0_20) supports a maximum heap size that is only 2MB less than with the earlier one.

      According to our observations, the issue only occurs when javaws as well as the JRE are from 1.6.0_18+. If either is older, the memory restriction does not occur.

      Specifying a pre-1.6.0_18 version (e.g. 1.6.0_17) in the j2se element does not help. It even seems to make matters worse. In that case the restricted memory limits always apply, independent of what JREs are activated or deactivated in the Java Control Panel. If we stay with the more general "1.6+" specification in the j2se element, the issue does not occur if no JRE more current than 1.6.0_17 is activated. These observations are for the case that javaws itself is used from 1.6.0_18 or later.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      There are two ways to demonstrate the issue:

      1. Compare max heap size with local application:
      - Start any java application from the command line and try raising the "-Xmx" option until the start fails (in our case at 1399MB for a 4GB system).
      - Now start the same (or any other) application with JWS on the same system and vary the max-heap-size value to find the maximum supported value.
      <j2se version="1.6+" initial-heap-size="300m" max-heap-size="927m" />

      2. Compare max heap size supported by current JWS and previous JWS:
      - Ensure JWS and JRE are from 1.6.0_17 or older. Start any application with JWS and vary the max-heap-size value in the j2se element to find the maximum supported value.
      - Ensure JWS and JRE are from 1.6.0_18 or newer. Start any application with JWS and vary the max-heap-size value in the j2se element to find the maximum supported value.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Supported max heap size for a application started with JWS should be (nearly) as large as for previous JWS versions and as for a locally started application.

      ACTUAL -
      Starting with JWS/JDK 1.6.0_18 the supported max heap size is reduced significantly (~30%).


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Could not create the Java virtual machine.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      <j2se version="1.6+" initial-heap-size="300m" max-heap-size="927m" />
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None known, except deactiving all JREs newer than 1.6.0_17 in the Java Control Panel.

      Release Regression From : 6u10
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

      Attachments

        Issue Links

          Activity

            People

              ngthomas Thomas Ng (Inactive)
              igor Igor Nekrestyanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: