<div dir="ltr">Hi Jesper,<div><br></div><div>I've checked and the problem was fixed between jdk9-b02 and jdk9-b03 in changeset 5864:e9fc29d2e8ae (8031686: G1: assert(_hrs.max_length() == _expansion_regions) failed)</div><div><br></div><div>Best regards,</div><div>Jakub</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-21 19:23 GMT+02:00 Jesper Wilhelmsson <span dir="ltr"><<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK. One way to find what change that fixed this in 9 would be to go back in the 9 history and see where it starts to fail. I could do that if I had a reproducer. Is it an option for you to share your reproducer? If not I guess you can step back in the mercurial history on your side if you feel comfortable building the JDK locally.<br>
<br>
Once we find the fix we can backport it to 8u. We are slightly short on time though since 8u60 is ramping down right now.<br>
<br>
Thanks,<br>
/Jesper<br>
<br>
<br>
Jakub Kubryński skrev den 20/5/15 22:46:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
I've checked with latest JDK 9 and it's OK. However 8u60 still reports incorrect<br>
number of regions for Xmx2g. For -Xmx2046m it's OK and for -Xmx2047m there<br>
are 14336 regions reported and eden capacity is <a href="tel:15032385536" value="+15032385536" target="_blank">15032385536</a> (14336.0MB).<br>
<br>
I don't know PrintHeapAtExit flag but I've added PrintHeapAtGC and it reported:<br>
<br>
Heap<br>
garbage-first heap total 125952K, used 99580K [0x66600000, 0x667001ec,<br>
0xe6600000)<br>
region size 1024K, 62 young (63488K), 7 survivors (7168K)<br>
Metaspace used 29856K, capacity 30136K, committed 30208K, reserved 31024K<br>
<br>
Cheers,<br>
Kuba<br>
<br>
<br>
2015-05-20 17:48 GMT+02:00 Jesper Wilhelmsson <<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a><br></span>
<mailto:<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a>>>:<span class=""><br>
<br>
FYI, I filed JDK-8080784 to cover this issue.<br>
<br>
<a href="https://bugs.openjdk.java.net/browse/JDK-8080784" target="_blank">https://bugs.openjdk.java.net/browse/JDK-8080784</a><br>
<br>
/Jesper<br>
<br>
<br>
Jakub Kubryński skrev den 20/5/15 16:50:<br>
<br>
Yes, I'll check it on latest Jdk9 and let you know.<br>
<br>
Best,<br>
Jakub<br>
<br>
20 maj 2015 16:35 "Jesper Wilhelmsson" <<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a><br>
<mailto:<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a>><br></span><div><div class="h5">
<mailto:<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a><br>
<mailto:<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a>>>> napisał(a):<br>
<br>
Ok. I tried that as well but it didn't reproduce.<br>
<br>
After a closer look it seems as if it is the number of regions that<br>
is wrong<br>
and causes the huge free size reported. There have been a few<br>
changes in<br>
this area recently which may have fixed this issue.<br>
<br>
Is it possible to try your reproducer with a recent build of JDK 9<br>
or the<br>
latest version of 8u from the OpenJDK source repositories?<br>
/Jesper<br>
<br>
<br>
Jakub Kubryński skrev den 20/5/15 15:23:<br>
<br>
64 bit Linux with 32bit JVM.<br>
<br>
Cheers,<br>
Jakub<br>
<br>
20 maj 2015 15:18 "Jesper Wilhelmsson"<br>
<<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a> <mailto:<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a>><br>
<mailto:<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a><br>
<mailto:<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a>>><br>
<mailto:<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a><br>
<mailto:<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a>><br>
<mailto:<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a><br>
<mailto:<a href="mailto:jesper.wilhelmsson@oracle.com" target="_blank">jesper.wilhelmsson@oracle.com</a>>>>> napisał(a):<br>
<br>
Hi,<br>
<br>
Does this reproduce every time?<br>
What platform is it?<br>
<br>
I have tried to reproduce this on 32bit linux but can't see<br>
anything weird<br>
there. It seems likely that there is a variable with the<br>
wrong type<br>
somewhere on the way. I'll see if I can find something.<br>
/Jesper<br>
<br>
<br>
Jakub Kubryński skrev den 15/5/15 17:22:<br>
<br>
Hi,<br>
<br>
I've just checked that on 32bit JVM (HotSpot 8u45)<br>
jmap reports<br>
strange<br>
region<br>
information for G1 collector. As you can see Xmx is<br>
set to 2G<br>
(which fits<br>
MaxHeapSize) but regions count (almost 15k) and<br>
capacity is<br>
incorrect.<br>
Any ideas<br>
why?<br>
<br>
Heap Configuration:<br>
MinHeapFreeRatio = 40<br>
MaxHeapFreeRatio = 70<br>
MaxHeapSize = <a href="tel:2147483648" value="+12147483648" target="_blank">2147483648</a><br>
<tel:<a href="tel:2147483648" value="+12147483648" target="_blank">2147483648</a>> <tel:<a href="tel:2147483648" value="+12147483648" target="_blank">2147483648</a> <tel:<a href="tel:2147483648" value="+12147483648" target="_blank">2147483648</a>>><br>
<tel:<a href="tel:2147483648" value="+12147483648" target="_blank">2147483648</a> <tel:<a href="tel:2147483648" value="+12147483648" target="_blank">2147483648</a>> <tel:<a href="tel:2147483648" value="+12147483648" target="_blank">2147483648</a><br>
<tel:<a href="tel:2147483648" value="+12147483648" target="_blank">2147483648</a>>>> (2048.0MB)<br>
NewSize = 1048576 (1.0MB)<br>
MaxNewSize = 428867584 (409.0MB)<br>
OldSize = 4194304 (4.0MB)<br>
NewRatio = 2<br>
SurvivorRatio = 8<br>
MetaspaceSize = 16777216 (16.0MB)<br>
CompressedClassSpaceSize = 1073741824 (1024.0MB)<br>
MaxMetaspaceSize = 4294963200<br>
(4095.99609375MB)<br>
G1HeapRegionSize = 1048576 (1.0MB)<br>
<br>
Heap Usage:<br>
G1 Heap:<br>
regions = 14336<br>
capacity = <a href="tel:15032385536" value="+15032385536" target="_blank">15032385536</a> <tel:<a href="tel:15032385536" value="+15032385536" target="_blank">15032385536</a>><br></div></div>
<tel:<a href="tel:15032385536" value="+15032385536" target="_blank">15032385536</a> <tel:<a href="tel:15032385536" value="+15032385536" target="_blank">15032385536</a>>> <tel:<a href="tel:15032385536" value="+15032385536" target="_blank">15032385536</a> <tel:<a href="tel:15032385536" value="+15032385536" target="_blank">15032385536</a>><br>
<tel:<a href="tel:15032385536" value="+15032385536" target="_blank">15032385536</a> <tel:<a href="tel:15032385536" value="+15032385536" target="_blank">15032385536</a>>>> (14336.0MB)<span class=""><br>
used = 76347888 (72.81101989746094MB)<br>
free = 14956037648 (14263.188980102539MB)<br>
0.5078893687043872% used<br>
<br>
--<br>
Best regards,<br>
Jakub Kubrynski<br>
<br>
<br>
<br>
<br>
--<br>
Best regards,<br>
Jakub Kubrynski<br>
</span></blockquote>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Best regards,<div>Jakub Kubrynski</div></div></div>
</div>