-
Bug
-
Resolution: Fixed
-
P2
-
hs19
-
b01
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2200245 | 7 | Keith Mcguigan | P2 | Closed | Fixed | b112 |
JDK-2205945 | 6u25 | Keith Mcguigan | P2 | Closed | Fixed | b01 |
JDK-2201471 | 6u23 | Keith Mcguigan | P2 | Closed | Fixed | b02 |
JDK-2200013 | 6u22m | Keith Mcguigan | P2 | Closed | Fixed | b02 |
JDK-2199991 | 6u21p | Keith Mcguigan | P2 | Closed | Fixed | b04 |
JDK-2198408 | hs19 | Keith Mcguigan | P2 | Closed | Fixed | b07 |
The attached test case tries to load and initialize the following class in a loop:
/** Class that will throw exception in clinit. */
final class ErrorInClinit {
static {
willThrowError();
}
/** Implemented default constructor. */
private ErrorInClinit() { }
/** Method that throws error. */
static void willThrowError() {
throw new NoClassDefFoundError("check");
}
}
Process size grows rapidly, and eventually hits OS limits:
$ ulimit -v 2000000
$ /set/vmsqe/jdk/re/7/promoted/ea/b106/binaries/linux-amd64/bin/java KS &
$ jps -l | grep KS | (read a b; while :; do ps -o pid,size,rss,vsize --no-headers $a; sleep 10; done)
14121 1308576 56720 1356100
14121 1439648 171100 1487172
14121 1505184 285096 1552708
14121 1636256 399216 1683780
14121 1767328 513372 1814852
14121 1898400 627564 1945924
#
# A fatal error has been detected by the Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 41 bytes for char in /BUILD_AREA/jdk7/hotspot/src/share/vm/oops/instanceKlass.cpp. Out of swap space?
#
# Internal Error (allocation.inline.hpp:39), pid=14121, tid=139729910605584
# Error: char in /BUILD_AREA/jdk7/hotspot/src/share/vm/oops/instanceKlass.cpp
#
# JRE version: 7.0
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.0-b05 mixed mode linux-amd64 compressed oops)
# An error report file with more information is saved as:
# /set/vmsqe/home/sd208054/ws/ksleak/src/hs_err_pid14121.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
/** Class that will throw exception in clinit. */
final class ErrorInClinit {
static {
willThrowError();
}
/** Implemented default constructor. */
private ErrorInClinit() { }
/** Method that throws error. */
static void willThrowError() {
throw new NoClassDefFoundError("check");
}
}
Process size grows rapidly, and eventually hits OS limits:
$ ulimit -v 2000000
$ /set/vmsqe/jdk/re/7/promoted/ea/b106/binaries/linux-amd64/bin/java KS &
$ jps -l | grep KS | (read a b; while :; do ps -o pid,size,rss,vsize --no-headers $a; sleep 10; done)
14121 1308576 56720 1356100
14121 1439648 171100 1487172
14121 1505184 285096 1552708
14121 1636256 399216 1683780
14121 1767328 513372 1814852
14121 1898400 627564 1945924
#
# A fatal error has been detected by the Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 41 bytes for char in /BUILD_AREA/jdk7/hotspot/src/share/vm/oops/instanceKlass.cpp. Out of swap space?
#
# Internal Error (allocation.inline.hpp:39), pid=14121, tid=139729910605584
# Error: char in /BUILD_AREA/jdk7/hotspot/src/share/vm/oops/instanceKlass.cpp
#
# JRE version: 7.0
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.0-b05 mixed mode linux-amd64 compressed oops)
# An error report file with more information is saved as:
# /set/vmsqe/home/sd208054/ws/ksleak/src/hs_err_pid14121.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
- backported by
-
JDK-2198408 Memory leak when exception is thrown in static initializer
- Closed
-
JDK-2199991 Memory leak when exception is thrown in static initializer
- Closed
-
JDK-2200013 Memory leak when exception is thrown in static initializer
- Closed
-
JDK-2200245 Memory leak when exception is thrown in static initializer
- Closed
-
JDK-2201471 Memory leak when exception is thrown in static initializer
- Closed
-
JDK-2205945 Memory leak when exception is thrown in static initializer
- Closed
(1 backported by)