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

TEST_BUG: java/lang/ref/SoftReference/Pin.java fails with OOME during System.out.println

    XMLWordPrintable

Details

    • b72
    • generic, x86
    • generic
    • Verified

    Backports

      Description

        The test
        java/lang/ref/SoftReference/Pin.java
        could get unexpected OOME in the line 79
         78 } catch (OutOfMemoryError e) {
         79 System.err.println("Got OutOfMemoryError, as expected.");
         80 }
        Test should be refactored to avoid memory allocation after OOME.
        Here is the log http://vmsqe.russia.sun.com/execution/results/JDK7/PROMOTION/VM/b74/G1/javase/solaris-i586/server/mixed/solaris-i586_server_mixed_LANG_REGRESSION/workDir/java/lang/ref/SoftReference.
        #section:main
        ----------messages:(3/129)----------
        command: main -ms16m -mx16mPin
        reason: User specified action: run main/othervm -ms16m -mx16m Pin
        elapsed time (seconds): 6.968
        ----------System.out:(0/0)----------
        ----------System.err:(26/1444)----------
        Turning off use of shared archive because of choice of garbage collector or large pages
        Filling array with 128 SoftReferences to blocks of 32768 bytes.
        Allowing SoftReferences to be enqueued.
        Invoking get() on SoftReferences.
        Forcing desperate garbage collection...
        Got OutOfMemoryError, as expected.java.lang.OutOfMemoryError: Java heap space
        at java.nio.CharBuffer.wrap(CharBuffer.java:369)
        at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:265)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
        at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:128)
        at java.io.PrintStream.write(PrintStream.java:493)
        at java.io.PrintStream.print(PrintStream.java:636)
        at java.io.PrintStream.println(PrintStream.java:773)
        at Pin.main(Pin.java:79)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
        at java.lang.Thread.run(Thread.java:717)

        JavaTest Message: Test threw exception: java.lang.OutOfMemoryError: Java heap space
        JavaTest Message: shutting down test

        STATUS:Failed.`main' threw exception: java.lang.OutOfMemoryError: Java heap space
        result: Failed. Execution failed: `main' threw exception: java.lang.OutOfMemoryError: Java heap space


        test result: Failed. Execution failed: `main' threw exception: java.lang.OutOfMemoryError: Java heap space

        Attachments

          Issue Links

            Activity

              People

                ssarne Stefan Sarne (Inactive)
                lmesnik Leonid Mesnik
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: