<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks Andrew! </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Can you explain a little bit more why the displayed hdr count implicit memory corruption? I don't quite understand why the lock contention is connected with memory corruption. </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Xinli </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<p>发送自 <a href="http://aka.ms/weboutlook">Outlook</a><br>
</p>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>发件人:</b> Andrew Haley <aph@redhat.com><br>
<b>发送时间:</b> 2019年4月23日 3:15<br>
<b>收件人:</b> shang xinli; Kim Barrett; shade@redhat.com<br>
<b>抄送:</b> hotspot-gc-dev@openjdk.java.net<br>
<b>主题:</b> Re: 回复: 回复: JVM crashes constantly when High GC happens</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">On 4/19/19 11:08 PM, shang xinli wrote:<br>
> I just reproduced it with the fastdebug build. Now it reports error at PromotionInfo:verify(). More specifically, it found numDisplaceHdrs NOT equal numObjWithDisplaceHdrs. It fails at below.<br>
> <br>
> <br>
> guarantee(numDisplacedHdrs == numObjsWithDisplacedHdrs, "Displaced hdr count”);<br>
> <br>
> Here is the debug info. It would be great if somebody can help to<br>
> guide how to instrument the code to find out the root cause.<br>
<br>
There's no recipe that you can use here.<br>
<br>
A displaced header occurs when an object is locked, so the object's<br>
first word (with tag bits, etc.) is copied elswhere and replaced in<br>
the object by a pointer to a structure. Displaced headers fairly<br>
uncommon: it only happens when there is contention for a lock and a<br>
thread is blocked. When a GC does its marking phase, it has to keep<br>
track of displaced headers.<br>
<br>
You do not have a bug in the GC. The problem is memory corruption. Are<br>
you using any native libraries? That is where I would start.<br>
<br>
-- <br>
Andrew Haley<br>
Java Platform Lead Engineer<br>
Red Hat UK Ltd. <<a href="https://www.redhat.com">https://www.redhat.com</a>><br>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>