JVM intermittently fails with following assert with test on Max/MinHeapFreeRatio flags:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/HUDSON/workspace/8-2-build-linux-i586/jdk8/367/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp:162), pid=3087, tid=3077081968
# assert((_allocation_stats.prev_sweep() + _allocation_stats.split_births() + _allocation_stats.coal_births() + 1) >= (_allocation_stats.split_deaths() + _allocation_stats.coal_deaths() + (ssize_t)count())) failed: FreeList 0x9d0bac08 of size 258 violates Conservation Principle: prev_sweep(1) + split_births(1) + coal_births(1) + 1 >= split_deaths(2) coal_deaths(0) + count(2)
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b110) (build 1.8.0-ea-fastdebug-b110)
# Java VM: Java HotSpot(TM) Server VM (25.0-b52-fastdebug compiled mode linux-x86 )
# Core dump written. Default location: /tmp/core or core.3087
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
--------------- T H R E A D ---------------
Current thread (0xb7511800): GCTaskThread [stack: 0xb7608000,0xb7689000] [id=3091]
Stack: [0xb7608000,0xb7689000], sp=0xb76877c0, free space=509k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0xcbcef5] VMError::report_and_die()+0x185
V [libjvm.so+0x5929a8] report_vm_error(char const*, int, char const*, char const*)+0x68
V [libjvm.so+0x2a7175] AdaptiveFreeList<FreeChunk>::verify_stats() const+0x95
V [libjvm.so+0x503240] CompactibleFreeListSpace::par_get_chunk_of_blocks(unsigned int, unsigned int, AdaptiveFreeList<FreeChunk>*)+0xa70
V [libjvm.so+0x50356d] CFLS_LAB::get_from_global_pool(unsigned int, AdaptiveFreeList<FreeChunk>*)+0x9d
V [libjvm.so+0x50381c] CFLS_LAB::alloc(unsigned int)+0x1ec
V [libjvm.so+0x561997] ConcurrentMarkSweepGeneration::expand_and_par_lab_allocate(CMSParGCThreadState*, unsigned int)+0x57
V [libjvm.so+0x568b7b] ConcurrentMarkSweepGeneration::par_promote(int, oopDesc*, markOopDesc*, unsigned int)+0x4fb
V [libjvm.so+0xacfb40] ParNewGeneration::copy_to_survivor_space_avoiding_promotion_undo(ParScanThreadState*, oopDesc*, unsigned int, markOopDesc*)+0x8a0
V [libjvm.so+0x743508] void ParScanClosure::do_oop_work<oopDesc*>(oopDesc**, bool, bool)+0x158
V [libjvm.so+0x732fc2] InstanceKlass::oop_oop_iterate_nv(oopDesc*, ParScanWithBarrierClosure*)+0xa2
V [libjvm.so+0xad00da] ParScanThreadState::trim_queues(int)+0x1aa
V [libjvm.so+0xad01f2] ParEvacuateFollowersClosure::do_void()+0x22
V [libjvm.so+0xad0bee] ParNewGenTask::work(unsigned int)+0x1ee
V [libjvm.so+0xd00bdb] GangWorker::loop()+0x30b
V [libjvm.so+0xcff428] GangWorker::run()+0x18
V [libjvm.so+0xaa82e9] java_start(Thread*)+0x119
C [libpthread.so.0+0x69e9] abort@@GLIBC_2.0+0x69e9
Failed test loading and unloading certain amount of data and verifies that old gen resized to fit into Max/MinHeapFreeSizeRatio values:
http://cr.openjdk.java.net/~kshefov/8025166/webrev.01/raw_files/new/test/gc/arguments/TestMaxMinHeapFreeRatioFlags.java
I've attached a reproducer extracted from this test.