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

REGRESSION: JCK1.4: 4 tests api/java_lang/System/index.html failed, Linux

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86, sparc
    • OS:
      linux, solaris_7, solaris_8

      Description



      Name: aaR10208 Date: 04/24/2002


      Filed By : J2SE-SQA [###@###.###
      JDK : jdk1.4.1-b10
      JCK : JCK1.4-b17
      Platform[s] : RedHat Linux 7.1, Turbo Linux 7, sparc 7, sparc8
      switch/Mode : -server -Xmixed -Xfuture, -client -Xfuture, PlugIn/NS621(sparc)
      JCK test owner : http://javaweb.eng/jck/usr/owners.jto
      Failing Test :
      api/java_lang/System/index.html#GetProperties [System2018, System2019]
      api/java_lang/System/index.html#GetProperty [System2021]
      api/java_lang/System/index.html#GetProperty1 [System0007]
      api/java_lang/System/index.html#SetProperties

      It seems that native method java.lang.System.initProperties works incorrectly in jdk1.4.1-b10.
      If java.lang.System.setProperties method is called twice with a null as parameter, the java.lang.OutOfMemoryError is thrown.

      Here is a sample app that demonstrate the problem:
      ===== test.java =====
      public class test {
      public static void main( String[] args ) {
              System.setProperties(null);
              System.setProperties(null);
              System.out.println("Test PASSED");
      };
      };
      ===== end test.java =====


      Here is thre test output for builds 09, 10:

      ==== test output =====
      [sundr@linux-14]> /net/linux-15/export/home/java/jdk1.4.1/linux.b09/bin/java -showversion test
      java version "1.4.1-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b09)
      Java HotSpot(TM) Client VM (build 1.4.1-beta-b09, mixed mode)
       
      Test PASSED
      [sundr@linux-14]> /net/linux-15/export/home/java/jdk1.4.1/linux/bin/java -showversion test
      java version "1.4.1-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b10)
      Java HotSpot(TM) Client VM (build 1.4.1-beta-b10, mixed mode)
       
      Java HotSpot(TM) Client VM warning: Out of PerfMemory.
              Capacity = 8192 Used = 8104 Request Size = 112
              Use -XX:PerfDataMemorySize=<size> to specify larger size.
      Exception in thread "main" java.lang.OutOfMemoryError
              at java.lang.System.initProperties(Native Method)
              at java.lang.System.setProperties(System.java:533)
              at test.main(test.java:4)
      ==== end test output =====

      The test api/java_lang/System/index.html#SetProperties has a different diagnostic message, but it seems as
      failing because of the same reson: the test fails only when "Java HotSpot(TM) Client VM warning: Out of PerfMemory"
      error message is shown. To reproduce this failure you will need to export some anount of environment variables in
      the test script (see also "How to reproduce" and "Test output" sections below).

      All the tests pass with "-XX:PerfDataMemorySize=10240" switch.

      Test source location:
      =====================
      /net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_lang/System/GetPropertiesTests.java
      /net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_lang/System/GetPropertyTests.java
      /net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_lang/System/GetProperty1Tests.java
      /net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_lang/System/SetPropertiesTests.java


      jtr file location:
      ==================
      /net/jtgb4u4c.eng/export/sail15/results/hopper/b10/jck14/linux/turbo_gnome_server_linux-4/workDir/api/java_lang/System/index_GetProperties.jtr
      /net/jtgb4u4c.eng/export/sail15/results/hopper/b10/jck14/linux/turbo_gnome_server_linux-4/workDir/api/java_lang/System/index_GetProperty.jtr
      /net/jtgb4u4c.eng/export/sail15/results/hopper/b10/jck14/linux/turbo_gnome_server_linux-4/workDir/api/java_lang/System/index_GetProperty1.jtr
      /net/jtgb4u4c.eng/export/sail15/results/hopper/b10/jck14/linux/turbo_single_gnome_server_linux-4/workDir/api/java_lang/System/index_SetProperties.jtr

      How to reproduce:
      =================
      Run the following script on RH Linux (you may need to set JAVA_HOME and JCK variables)
      --------Script START---------------------
      #!/bin/sh
      JAVA_HOME="/net/jdk/export/disk8/local.java/jdk1.4.1/linux-i386"
      JCK="/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14"
      execClass="javasoft.sqe.tests.api.java.lang.System.GetPropertiesTests"
      switches="-client -Xfuture -showversion"
      $JAVA_HOME/bin/java $switches -cp $JCK/classes:$JCK/javatest.jar $execClass
      --------Script END----------------------

      --------Script to reproduce setProperties failure START---------------------
      #!/bin/sh
      JAVA_HOME="/net/linux-15/export/home/java/jdk1.4.1/linux"
      JCK="/net/linux-15/export/home/java/jck1.4/JCK-runtime-14/"
      DISPLAY=:0
      LD_LIBRARY_PATH="$JCK/lib:$JCK/lib/Linux.i386"
      PATH=""
      OPTIONS="-server -Xmixed -Xfuture"
      export DISPLAY
      export LD_LIBRARY_PATH
      echo "--- The test should fail now ---"
      $JAVA_HOME/bin/java -server -Xmixed -Xfuture -cp $JCK/classes:$JCK/javatest.jar -Djava.security.policy=$JCK/lib/jck.policy -Djava.security.auth.policy=$JCK/lib/java.auth.policy -Djava.security.auth.login.config=$JCK/lib/java.login.config javasoft.sqe.tests.api.java.lang.System.SetPropertiesTests
      echo "--- The test should pass now ---"
      LD_LIBRARY_PATH=""
      DISPLAY=""
      export LD_LIBRARY_PATH
      export DISPLAY
      $JAVA_HOME/bin/java -server -Xmixed -Xfuture -cp $JCK/classes:$JCK/javatest.jar -Djava.security.policy=$JCK/lib/jck.policy -Djava.security.auth.policy=$JCK/lib/java.auth.policy -Djava.security.auth.login.config=$JCK/lib/java.login.config javasoft.sqe.tests.api.java.lang.System.SetPropertiesTests
      --------Script to reproduce setProperties failure END---------------------


      Test output:
      ============
      java version "1.4.1-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b10)
      Java HotSpot(TM) Client VM (build 1.4.1-beta-b10, mixed mode)
       
      Java HotSpot(TM) Client VM warning: Out of PerfMemory.
              Capacity = 8192 Used = 8168 Request Size = 56
              Use -XX:PerfDataMemorySize=<size> to specify larger size.
      System2017: Passed. OKAY
      System2018: Passed. OKAY
      java.lang.OutOfMemoryError
              at java.lang.System.initProperties(Native Method)
              at java.lang.System.setProperties(System.java:533)
              at javasoft.sqe.tests.api.java.lang.System.GetPropertiesTests.System2019(GetPropertiesTests.java:173)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:397)
              at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:193)
              at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:125)
              at javasoft.sqe.tests.api.java.lang.System.GetPropertiesTests.main(GetPropertiesTests.java:23)
      System2019: Failed. Test case throws exception: java.lang.OutOfMemoryError
      STATUS:Failed.tests: 3; passed: 2; failed: 1; first test case failure: System2019

      Test output for setProperties test
      ==================================
      --- The test should fail now ---
      Java HotSpot(TM) Server VM warning: Out of PerfMemory.
              Capacity = 8192 Used = 7840 Request Size = 568
              Use -XX:PerfDataMemorySize=<size> to specify larger size.
      Exception in thread "main" java.lang.IllegalArgumentException: Null charset name
              at java.nio.charset.Charset.lookup(Charset.java:376)
              at java.nio.charset.Charset.isSupported(Charset.java:405)
              at sun.nio.cs.StreamEncoder.forOutputStreamWriter(StreamEncoder.java:67)
              at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:93)
              at java.io.PrintStream.<init>(PrintStream.java:94)
              at java.io.PrintStream.<init>(PrintStream.java:56)
              at javasoft.sqe.javatest.lib.Deprecated.createPrintStream(Deprecated.java:35)
              at javasoft.sqe.javatest.lib.MultiTest.printStackTrace(MultiTest.java:328)
              at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:200)
              at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:125)
              at javasoft.sqe.tests.api.java.lang.System.SetPropertiesTests.main(SetPropertiesTests.java:22)
      --- The test should pass now ---
      System2024: Passed. OKAY
      System0013: Passed. OKAY
      STATUS:Passed.tests: 2; passed: 2

      Specific Machine Info:
      ======================
      Hostname: linux-4
      Os: Turbolinux Workstation 7 (Linux linux-4 2.4.5-3 #1 Thu Aug 2 17:18:07 JST 2001 i686 unknown)

      Hostname: linux-14
      OS: RH Linux 7.1 (Linux linux-14 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown)

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dstoutamsunw David Stoutamire (Inactive)
              Reporter:
              sundrsunw Sundr Sundr (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: