<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
@font-face
        {font-family:Helvetica}
@font-face
        {font-family:宋体}
@font-face
        {font-family:宋体}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:"\@宋体"}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Calibri","sans-serif";
        color:black}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.emailstyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
span.EmailStyle18
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:72.0pt 90.0pt 72.0pt 90.0pt}
div.WordSection1
        {}
-->
</style>
</head>
<body bgcolor="white" lang="ZH-CN" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Our java version is 6u32 ,an old version. &nbsp;Actually The patch can only fix the exception &nbsp;list in the last email. Now our system has closed UseAdaptiveSizePolicy while using CMS, &nbsp;it’s runs happily.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Regards</span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">hongxi</span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">&nbsp;</span></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span style="font-size:10.0pt; font-family:宋体; color:windowtext">发件人<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:10.0pt; font-family:宋体; color:windowtext"> Bengt Rutisson
 [mailto:bengt.rutisson@oracle.com] <br>
</span><b><span style="font-size:10.0pt; font-family:宋体; color:windowtext">发送时间<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:10.0pt; font-family:宋体; color:windowtext"> 2013</span><span style="font-size:10.0pt; font-family:宋体; color:windowtext">年<span lang="EN-US">3</span>月<span lang="EN-US">19</span>日<span lang="EN-US">
 14:53<br>
</span><b>收件人<span lang="EN-US">:</span></b><span lang="EN-US"> daniel.daugherty@oracle.com<br>
</span><b>抄送<span lang="EN-US">:</span></b><span lang="EN-US"> </span>洪熙<span lang="EN-US">(hongxi); serviceability-dev@openjdk.java.net; hotspot-gc-dev@openjdk.java.net<br>
</span><b>主题<span lang="EN-US">:</span></b><span lang="EN-US"> Re: Committed should not larger than max_size in ContiguousSpacePool while using ParNew with UseAdaptiveSizePolicy</span></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US">&nbsp;</span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><br>
Hi Hongxi<br>
<br>
Thanks for supplying the patch.<br>
<br>
What Java version are you using? I think that using adaptive sizing with ParNew has never worked very well. In fact this feature has been disabled in the main branch about a year ago (I think it went in to 7u4). See:<br>
<br>
7112413 : JVM Crash, possibly GC-related<br>
<a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7112413">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7112413</a><br>
<br>
So, I would not recommend using -XX:&#43;UseAdaptiveSizePolicy with -XX:&#43;UseConcMarkSweepGC. The only supported GC for adaptive size policy is the parallel GC. Even with your patch I think you will see crashes if you continue running with the command line you supplied.<br>
<br>
I have only looked briefly at your patch, but I think that it may be hiding a problem more than fixing it. I think we should in fact have max size set up properly. If capacity turns out to be larger than max size we have a real problem. Just hiding this by
 updating the max size seems a bit scary to me.<br>
<br>
Bengt<br>
<br>
<br>
<br>
On 3/19/13 3:48 AM, Daniel D. Daugherty wrote:</span></p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">Hongxi,<br>
<br>
I'm redirecting this message to the HotSpot GC OpenJDK alias<br>
and the Serviceability OpenJDK alias. JMX is owned by the<br>
Serviceability team and you've also got some GC questions<br>
here...<br>
<br>
Dan<br>
<br>
P.S.<br>
Bcc'ed the Runtime OpenJDK so you folks know that this message<br>
has been redirected...</span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><br>
On 3/18/13 7:59 PM, </span><span style="font-family:宋体">洪熙</span><span lang="EN-US">(hongxi) wrote:</span></p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt">Hi all</span><span style="font-size:14.0pt; font-family:宋体">:</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt">&nbsp;&nbsp; Sorry if here is not the right place to submit this small fix.
</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt">&nbsp;</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt">Days ago, some of our systems occur this exception:</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;</span></p>
<p class="MsoNormal"><span lang="EN-US">2013-01-22 16:59:07,351 ERROR protocol.MBeanServerMessageHandler {141} - handle message error objectName=com.alibaba.dragoon:type=GC</span></p>
<p class="MsoNormal"><span lang="EN-US">javax.management.RuntimeErrorException: java.lang.InternalError: Memory Pool not found</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:858)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:869)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:670)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.alibaba.dragoon.common.protocol.MBeanServerMessageHandler.getAttributeInternal(MBeanServerMessageHandler.java:242)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.alibaba.dragoon.common.protocol.MBeanServerMessageHandler.handle(MBeanServerMessageHandler.java:113)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.alibaba.dragoon.common.protocol.MessageHandlerAdapter.handle(MessageHandlerAdapter.java:53)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.alibaba.dragoon.common.protocol.DragoonSession.receiveMessageIntenal(DragoonSession.java:204)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.alibaba.dragoon.common.protocol.DragoonSession.receiveMessage(DragoonSession.java:178)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.alibaba.dragoon.common.protocol.transport.socket.SocketSessionImpl$1.run(SocketSessionImpl.java:211)</span></p>
<p class="MsoNormal"><span lang="EN-US">Caused by: java.lang.InternalError: Memory Pool not found</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;at sun.management.MemoryPoolImpl.getUsage0(Native Method)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at sun.management.MemoryPoolImpl.getUsage(MemoryPoolImpl.java:77)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.alibaba.dragoon.client.jmx.GC.getEdenSpaceUsed(GC.java:185)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.reflect.Method.invoke(Method.java:597)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:65)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:216)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:666)</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ... 7 more</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt">The jvm argument is as bellow</span><span style="font-size:14.0pt; font-family:宋体">:</span><span lang="EN-US"></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:9.0pt; font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">/usr/java/bin/java&nbsp;-server&nbsp;-Xmx5g&nbsp;-Xms5g&nbsp;-Xmn512m&nbsp;-XX:PermSize=128m&nbsp;-Xss256k&nbsp;-XX:&#43;DisableExplicitGC&nbsp;-XX:&#43;UseConcMarkSweepGC&nbsp;-XX:&#43;CMSParallelRemarkEnabled&nbsp;-XX:&#43;UseCMSCompactAtFullCollection</span><span lang="EN-US"></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:9.0pt; font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">&nbsp;-XX:&#43;UseFastAccessorMethods&nbsp;-XX:&#43;UseCMSInitiatingOccupancyOnly&nbsp;-XX:CMSInitiatingOccupancyFraction=70&nbsp;-XX:&#43;UseCompressedOops&nbsp;-XX:ParallelGCThreads=4&nbsp;-XX:&#43;UseAdaptiveSizePolicy</span><span lang="EN-US"></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:9.0pt; font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">&nbsp;-Dcom.sun.management.jmxremote.port=1100&nbsp;-Dcom.sun.management.jmxremote.ssl=false&nbsp;-Dcom.sun.management.jmxremote.authenticate=false&nbsp;-Djava.rmi.server.hostname=localhost&nbsp;</span><span lang="EN-US"></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:9.0pt; font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">-Dhummock.output.logs=/home/admin/output/logs&nbsp;-Djava.awt.headless=true&nbsp;-Djava.net.preferIPv4Stack=true&nbsp;</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;</span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt">At last, we found it’s possible a jvm bug, when UseAdaptiveSizePolicy &#43; ParNew, if the eden is expanded the max size of eden’s ContiguousSpacePool will not be updated, &nbsp;perhaps the commited is
 larger than max_size. Though at last I know UseAdaptiveSizePolicy has some problems with CMS and it has been disabled in the latest jdk7u, I think I should submit a patch to fix this small bug. My patch is in the attachment.</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt">Regrads</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt">&nbsp;</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt">hongxi</span><span lang="EN-US"></span></p>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:12.0pt; font-family:宋体">&nbsp;</span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span lang="EN-US" style="font-size:12.0pt; font-family:宋体">
<hr size="2" width="100%" align="center">
</span></div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:7.5pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:gray"><br>
This email (including any attachments) is confidential and may be legally privileged. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you.<br>
<br>
</span><span style="font-size:7.5pt; font-family:宋体; color:gray">本电邮</span><span lang="EN-US" style="font-size:7.5pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:gray">(</span><span style="font-size:7.5pt; font-family:宋体; color:gray">包括任何附件</span><span lang="EN-US" style="font-size:7.5pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:gray">)</span><span style="font-size:7.5pt; font-family:宋体; color:gray">可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任</span><span style="font-size:7.5pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:gray">
</span><span style="font-size:7.5pt; font-family:宋体; color:gray">何其</span><span style="font-size:7.5pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:gray">
</span><span style="font-size:7.5pt; font-family:宋体; color:gray">他用途、或透露本邮件之内容。谢谢。</span><span lang="EN-US" style="font-size:12.0pt; font-family:宋体"></span></p>
</blockquote>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:12.0pt; font-family:宋体">&nbsp;</span></p>
</blockquote>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:12.0pt; font-family:宋体">&nbsp;</span></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
This email (including any attachments) is confidential and may be legally privileged. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you.<br>
<br>
本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内容。谢谢。<br>
</font>
</body>
</html>