JDK-8021809 : Partitioning based on eden sampling during allocation not reset correctly
Type:Bug
Component:hotspot
Sub-Component:gc
Affected Version:hs25
Priority:P3
Status:Resolved
Resolution:Fixed
Submitted:2013-07-29
Updated:2013-09-12
Resolved:2013-08-21
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.
When the sampling for CMS parallel initial mark and remark samples during eden allocation
(CMSEdenChunksRecordAlways), the sampling chunk array index can be > 0 and eden can
be empty.
This can easily be reproduced by running the test jdk/test/closed/closed/com/oracle/jfr/gc/TestGCEventMixed.java with jtreg (from the forest root):
jtreg -jdk:build/linux-x86_64-normal-server-fastdebug/images/j2sdk-image -reportDir jtreg-report -workDir jtreg-work -verbose:fail -ignore:quiet jdk/test/closed/com/oracle/jfr/gc/TestGCEventMixed.java
09-08-2013
RULE closed/com/oracle/jfr/gc/TestGCCauseWithSystemGC.java Crash Internal Error ...concurrentMarkSweepGeneration.cpp...assert(mr.is_empty() || space->used_region().contains(mr)) failed: Should be in space
RULE closed/com/oracle/jfr/gc/TestGCEventMixed.java Crash Internal Error ...memRegion.hpp...assert(end >= start) failed: incorrect constructor arguments
07-08-2013
Adding rule from JDK-8022238 which has been closed as a duplicate of this bug
RULE closed/com/oracle/jfr/gc/TestGCEventMixed.java Crash Internal Error ...concurrentMarkSweepGeneration.cpp...assert(mr.is_empty() || space->used_region().contains(mr)) failed: Should be in space
06-08-2013
Same tests pass with a product build in both 7 and 7u40. I think it is too early to say these are bad assertions.
02-08-2013
In jdk 7 this fails the same way
# assert(mr.is_empty() || space->used_region().contains(mr)) failed: Should be in space
#
# JRE version: 7.0-b147
# Java VM: Java HotSpot(TM) 64-Bit Server VM (21.0-b17-fastdebug mixed mode linux-amd64 compressed oops)
02-08-2013
This bug existed before the integration of the fixes for
6412968: CMS Long initial mark pauses
6990419: CMS Remaining work for 6572569: consistently skewed work distribution in (long) re-mark pauses
# assert(mr.is_empty() || space->used_region().contains(mr)) failed: Should be in space
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b99) (build 1.8.0-ea-fastdebug-b99)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b41-fastdebug mixed mode linux-amd64 compressed oops)
java -server -d64 -version
java version "1.8.0-ea-fastdebug"
Java(TM) SE Runtime Environment (build 1.8.0-ea-fastdebug-b99)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b41-fastdebug, mixed mode)
java -server -d64 -XX:+CMSParallelInitialMarkEnabled -version
Unrecognized VM option 'CMSParallelInitialMarkEnabled'
Did you mean '(+/-)CMSParallelRemarkEnabled'?
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
02-08-2013
When
1) a System.gc() is called
and
2) UseCMSCompactAtFullCollection is set to false
the CMS generation tells GenCollectedHeap that CMS
does not collect the young gen. That's right but I hadn't
appreciated that in that circumstance a young gen GC
was done before the CMS gen is collected. Makes sense
but the GC epilogue code is called after all the generations
have been collected by GenCollectedHeap so the
_eden_chunk_index is not reset between the young GC
and the CMS GC.