<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, Kim and Shade!</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);">
Does anybody know some tools can detect memory corruption at run time? In the Windows world, we can use
<a href="https://blogs.msdn.microsoft.com/webdav_101/2010/06/22/detecting-heap-corruption-using-gflags-and-dumps/" title="https://blogs.msdn.microsoft.com/webdav_101/2010/06/22/detecting-heap-corruption-using-gflags-and-dumps/">
GFLAGS</a>, is there any equivalent tool in Linux I can use? </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="signature">
<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> Kim Barrett <kim.barrett@oracle.com><br>
<b>发送时间:</b> 2019年4月5日 16:07<br>
<b>收件人:</b> shang xinli<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 Apr 5, 2019, at 4:33 PM, shang xinli <shangxinli@hotmail.com> wrote:<br>
> <br>
> Thanks Kim! Yes, I agree with you it should be caused by bad objects because of every crash always reported the same invalid address 0x000000008.  This issue only happens when running a tool called smartctl. It is hard to believe a process can corrupt other's
 process's heap.<br>
<br>
smartctl seems to be capable of low-level hardware manipulation, so<br>
who knows what it might be capable of doing to another process,<br>
depending on what one is doing with it.<br>
<br>
> Only observation is when smartctl is running, a high IO usage is seen. The Linux IO may use a lot of memory for caching which puts the JVM process memory pressure. But still, I don't understand how it can cause other process's heap corruption.
<br>
> <br>
> I am very interested in finding patterns and instrumenting the JVM code. Can you explain a little or point me some wiki about "special patterns like 0xdeadbeef “?
<br>
<br>
See "Special constants for debugging" in<br>
hotspot/src/share/vm/utilities/globalDefinitions.hpp for some other<br>
examples.   But 0x8 isn’t one of those.<br>
<br>
> Also, can you point me where is the code path I can instrument for the path for scanning and pushing object into queue.
<br>
<br>
Unfortunately, I don't know the JDK 8 code base very well at all.<br>
<br>
Sorry I can't be more help.  Maybe someone else will have ideas.<br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>