JDK-6842298 : Occasional failing testcase java/lang/management/MemoryMXBean/LowMemoryTest2.sh
  • Type: Bug
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Affected Version: 7,8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-05-18
  • Updated: 2023-12-14
  • Resolved: 2015-03-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdFixed
Related Reports
Duplicate :  
Description
Failed on windows 32bit fastdebug build of the jdk. It doesn't reproduce all the time, but thought I would file this for the record.

--------------------------------------------------
TEST: java/lang/management/MemoryMXBean/LowMemoryTest2.sh
JDK under test: (C:\temp\jprt\P1\T\004513~1.OHA\TESTPR~1\WINDOW~1.0-F)
java version "1.7.0-2009-05-18-004513.ohair.jdk-fastdebug"
Java(TM) SE Runtime Environment (build 1.7.0-2009-05-18-004513.ohair.jdk-fastdebug-administrator_2009_05_17_20_05-b00)
Java HotSpot(TM) Client VM (build 16.0-b03, mixed mode, sharing)


ACTION: build -- Passed. Build successful
REASON: User specified action: run build LowMemoryTest2 MemoryUtil 
TIME:   0.813 seconds
messages:
command: build LowMemoryTest2 MemoryUtil
reason: User specified action: run build LowMemoryTest2 MemoryUtil 
elapsed time (seconds): 0.813

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.797 seconds
messages:
command: compile C:\temp\jprt\P1\T\004513.ohair\source\test\java\lang\management\MemoryMXBean\LowMemoryTest2.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.797
STDOUT:
STDERR:

ACTION: shell -- Failed. Execution failed: exit code 1
REASON: User specified action: run shell/timeout=600 LowMemoryTest2.sh 
TIME:   1.953 seconds
messages:
command: shell LowMemoryTest2.sh []
reason: User specified action: run shell/timeout=600 LowMemoryTest2.sh 
elapsed time (seconds): 1.953
STDOUT:

+ C:/temp/jprt/P1/T/004513~1.OHA/TESTPR~1/WINDOW~1.0-F/bin/java -noclassgc -XX:PermSize=8m -XX:MaxPermSize=8m -XX:+UseSerialGC LowMemoryTest2 
Selected memory pool for low memory detection.
    Memory Pool name: Code Cache
    Type: Non-heap memory
    Memory Usage: init = 163840(160K) used = 490752(479K) committed = 491520(480K) max = 33554432(32768K)
    Threshold: 26843545
    Manager = [CodeCacheManager]
Selected memory pool for low memory detection.
    Memory Pool name: Perm Gen
    Type: Non-heap memory
    Memory Usage: init = 8388608(8192K) used = 176480(172K) committed = 8388608(8192K) max = 8388608(8192K)
    Threshold: 6710886
    Manager = [MarkSweepCompact]
Selected memory pool for low memory detection.
    Memory Pool name: Perm Gen [shared-ro]
    Type: Non-heap memory
    Memory Usage: init = 8388608(8192K) used = 6862368(6701K) committed = 8388608(8192K) max = 8388608(8192K)
    Threshold: 6710886
    Manager = [MarkSweepCompact]
Selected memory pool for low memory detection.
    Memory Pool name: Perm Gen [shared-rw]
    Type: Non-heap memory
    Memory Usage: init = 12582912(12288K) used = 6911728(6749K) committed = 12582912(12288K) max = 12582912(12288K)
    Threshold: 10066329
    Manager = [MarkSweepCompact]
Exception in thread "Thread-0" java.lang.OutOfMemoryError: PermGen space
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:751)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:592)
	at LowMemoryTest2$BoundlessLoaderThread.loadNext(LowMemoryTest2.java:127)
	at LowMemoryTest2$BoundlessLoaderThread.run(LowMemoryTest2.java:147)
	at java.lang.Thread.run(Thread.java:717)
Exception in thread "Low Memory Detector" java.lang.OutOfMemoryError: PermGen space
Exception in thread "main" java.lang.RuntimeException: Test failed - notification not received!
	at LowMemoryTest2.main(LowMemoryTest2.java:226)

+ C:/temp/jprt/P1/T/004513~1.OHA/TESTPR~1/WINDOW~1.0-F/bin/java -noclassgc -XX:PermSize=8m -XX:MaxPermSize=8m -XX:+UseParallelGC LowMemoryTest2 
Selected memory pool for low memory detection.
    Memory Pool name: Code Cache
    Type: Non-heap memory
    Memory Usage: init = 163840(160K) used = 490432(478K) committed = 491520(480K) max = 33554432(32768K)
    Threshold: 26843545
    Manager = [CodeCacheManager]
Selected memory pool for low memory detection.
    Memory Pool name: PS Perm Gen
    Type: Non-heap memory
    Memory Usage: init = 8388608(8192K) used = 2051680(2003K) committed = 8388608(8192K) max = 8388608(8192K)
    Threshold: 6710886
    Manager = [PS MarkSweep]
Notification for PS Perm Gen [type = java.management.memory.threshold.exceeded count = 1]
    usage = init = 8388608(8192K) used = 6711232(6553K) committed = 8388608(8192K) max = 8388608(8192K)
Notification received - test passed.

+ C:/temp/jprt/P1/T/004513~1.OHA/TESTPR~1/WINDOW~1.0-F/bin/java -noclassgc -XX:PermSize=8m -XX:MaxPermSize=8m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC LowMemoryTest2 
Selected memory pool for low memory detection.
    Memory Pool name: Code Cache
    Type: Non-heap memory
    Memory Usage: init = 163840(160K) used = 490432(478K) committed = 491520(480K) max = 33554432(32768K)
    Threshold: 26843545
    Manager = [CodeCacheManager]
Selected memory pool for low memory detection.
    Memory Pool name: CMS Perm Gen
    Type: Non-heap memory
    Memory Usage: init = 8388608(8192K) used = 2051688(2003K) committed = 8388608(8192K) max = 8388608(8192K)
    Threshold: 6710886
    Manager = [ConcurrentMarkSweep]
Notification for CMS Perm Gen [type = java.management.memory.threshold.exceeded count = 1]
    usage = init = 8388608(8192K) used = 6711488(6554K) committed = 8388608(8192K) max = 8388608(8192K)
Notification received - test passed.

1 test(s) failed
STDERR:

TEST RESULT: Failed. Execution failed: exit code 1
--------------------------------------------------

Comments
Test has been removed.
11-03-2015

This is also failing intermittently in jdk8/tl for me. Here is an example: + /data/jenkins/jobs/jdk8-tl-build/lastSuccessful/archive/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/java -ea -esa -Xmx256m -DCompatibilityTest.disableNetwork=true -XX:-UseLargePages -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseParallelGC LowMemoryTest2 Selected memory pool for low memory detection. Memory Pool name: Code Cache Type: Non-heap memory Memory Usage: init = 2555904(2496K) used = 1094784(1069K) committed = 2555904(2496K) max = 251658240(245760K) Threshold: 201326592 Manager = [CodeCacheManager] Selected memory pool for low memory detection. Memory Pool name: Metaspace Type: Non-heap memory Memory Usage: init = 0(0K) used = 2571936(2511K) committed = 4980736(4864K) max = 16777216(16384K) Threshold: 13421772 Manager = [Metaspace Manager] Selected memory pool for low memory detection. Memory Pool name: Compressed Class Space Type: Non-heap memory Memory Usage: init = 0(0K) used = 284544(277K) committed = 524288(512K) max = 1073741824(1048576K) Threshold: 858993459 Manager = [Metaspace Manager] Exception in thread "Thread-0" java.lang.OutOfMemoryError: Metaspace at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.lang.ClassLoader.defineClass(ClassLoader.java:642) at LowMemoryTest2$BoundlessLoaderThread.loadNext(LowMemoryTest2.java:134) at LowMemoryTest2$BoundlessLoaderThread.run(LowMemoryTest2.java:155) at java.lang.Thread.run(Thread.java:744) Exception in thread "main" java.lang.RuntimeException: Test failed - notification not received! at LowMemoryTest2.main(LowMemoryTest2.java:239)
25-11-2013

JDK-7196801 tracks issue related to perm gen removal, while this one is about OOME caused by exhausted perm gen, so I think that it should be reopened to track jdk7-specific failures.
21-11-2013

JDK-7196801 tracks this bug for the metaspace in JDK8.
23-09-2013