Details
-
Bug
-
Resolution: Fixed
-
P2
-
6u21, 7, 9
-
b72
-
generic, x86
-
generic
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8135990 | emb-9 | Stefan Johansson | P2 | Resolved | Fixed | team |
JDK-8262164 | openjdk8u292 | Mandy Chung | P2 | Resolved | Fixed | b05 |
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
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
- backported by
-
JDK-8135990 TEST_BUG: java/lang/ref/SoftReference/Pin.java fails with OOME during System.out.println
- Resolved
-
JDK-8262164 TEST_BUG: java/lang/ref/SoftReference/Pin.java fails with OOME during System.out.println
- Resolved