eventually exits due to OOME. However, no message about the exception is
printed. The only indication an exception occurred is the non-zero exit
status.
$ $JAVA_HOME/bin/java -client -showversion -Xmx128m MemoryEater1
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b58)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b58, mixed mode)
$ echo $?
1
jdk1.5.0 behaves similarly.
The 1.4.2 jdk at least printed a message indicating an exception
occurred, although the message was incomplete (the type of the
exception and newline were missing):
$ $JAVA_HOME/bin/java -client -showversion -Xmx128m MemoryEater1
java version "1.4.2_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-b05)
Java HotSpot(TM) Client VM (build 1.4.2_07-b05, mixed mode)
Exception in thread "main"$
$ echo $?
1
- duplicates
-
JDK-6534149 ThreadGroup.uncaughtException needs to be more resilient to OutOfMemoryError
- Closed
- relates to
-
JDK-8168934 [TESTBUG] gc/g1/logging/TestG1LoggingFailure.java failed
- Resolved
-
JDK-6644629 JVM dies with little/misleading problem information during excessive creation of ORB threads
- Closed
-
JDK-6309516 OutOfMemoryError test silently exits with code 1 on linux
- Closed
-
JDK-6378434 (thread) IllegalThreadStateException invoking Thread.start after getting OOME (jdk5.0)
- Closed
-
JDK-6472925 OutOfMemoryError fails to generate stack trace as it now ought
- Closed
-
JDK-8060187 Tests for correct OOME catching/rethrowing should be developed.
- Closed