JDK-8068416 : LFGarbageCollectedTest.java fails with OOME: "GC overhead limit exceeded"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 8u60,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-01-02
  • Updated: 2016-05-27
  • Resolved: 2015-06-05
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.
JDK 8 JDK 9
8u60Fixed 9 b69Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
java/lang/invoke/LFCaching/LFGarbageCollectedTest.java:
Tested LF caching feature with MethodHandles.catchException method.
java.lang.InternalError: DMH.invokeSpecial_LLDIJLFLIIDIIFI3F3JDLFDLLIILIFILI3FJFFIIFI4JIFIDIL73_L=Lambda(...
...
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
...

The reason is BMH$Species_* classes can't be unloaded, because they are  loaded using bootstrap class loader (see JDK-8078602 for details). The test creates method handles with random signatures, so the more it runs the more BMH$Species_* classes are generated.

Comments
Test fails because of issue JDK-8078602. It has been excluded. It should be turned on again when JDK-8078602 is fixed.
05-06-2015

I have run the test with the following random seeds: -Dseed=-5588748453729610610 -Dseed=7156292911094704201 -Dseed=6625522607003618497 -Dseed=985415539742461379 -Dseed=7474263309324951292 -Dseed=47745438028253060 -Dseed=1471155613794702556 -Dseed=4693720302851548226 -Dseed=4300143047479508260 -Dseed=4945317494341834072 For all these seeds the test fails with OOME against both JDK 8u and JDK 9. Average iterations number before fail is 75.
04-06-2015

This test also fails against JDK 9 if we use -Dseed=-5991131840908322363. This is because of randomness it is hard to reproduce this failure, I have to rerun the test 50 times to reproduce it.
04-06-2015

Reduce number of iterations to 40 is suggested. With this number of iterations OOME does not appear on all tested platforms.
03-06-2015

http://cr.openjdk.java.net/~kshefov/8068416/webrev.00/
03-06-2015

[~iignatyev], please, find somebody to fix this test bug. Thanks!
24-04-2015

The fix is to either increase max heap size (thus increasing execution time, because the test aggressively forces GCs) or reduce the number of test iterations.
24-04-2015

Reopening because failure showed up on 2015-03-11 again.
13-03-2015

I'm working on a bug in the test (JDK-8067344). As part of the change, I considerably speed up the test by limiting heap size and doing less Full GCs. It should eliminate timeouts.
12-01-2015