Tue, 12 Mar 2013 09:42:24 +0100
8009282: Assertion "assert(used_and_free == capacity_bytes) failed: Accounting is wrong" failed with -XX:+Verbose -XX:+TraceMetadataChunkAllocation
Summary: Assertion is only valid when at a safepoint, adjust accordingly.
Reviewed-by: stefank, jmasa, tamao
src/share/vm/memory/metaspace.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/memory/metaspace.cpp Mon Mar 11 15:37:10 2013 +0100 1.2 +++ b/src/share/vm/memory/metaspace.cpp Tue Mar 12 09:42:24 2013 +0100 1.3 @@ -2440,7 +2440,8 @@ 1.4 free_chunks_capacity_bytes / K, 1.5 used_and_free / K, 1.6 capacity_bytes / K); 1.7 - assert(used_and_free == capacity_bytes, "Accounting is wrong"); 1.8 + // Accounting can only be correct if we got the values during a safepoint 1.9 + assert(!SafepointSynchronize::is_at_safepoint() || used_and_free == capacity_bytes, "Accounting is wrong"); 1.10 } 1.11 1.12 // Print total fragmentation for class and data metaspaces separately