Re: 回复: 回复: JVM crashes constantly when High GC happens

Andrew Haley aph at redhat.com
Tue Apr 23 10:15:54 UTC 2019


On 4/19/19 11:08 PM, shang xinli wrote:
> 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.
> 
> 
> guarantee(numDisplacedHdrs == numObjsWithDisplacedHdrs, "Displaced hdr count”);
> 
> Here is the debug info. It would be great if somebody can help to
> guide how to instrument the code to find out the root cause.

There's no recipe that you can use here.

A displaced header occurs when an object is locked, so the object's
first word (with tag bits, etc.) is copied elswhere and replaced in
the object by a pointer to a structure. Displaced headers fairly
uncommon: it only happens when there is contention for a lock and a
thread is blocked. When a GC does its marking phase, it has to keep
track of displaced headers.

You do not have a bug in the GC. The problem is memory corruption. Are
you using any native libraries? That is where I would start.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the hotspot-gc-dev mailing list