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

shang xinli shangxinli at hotmail.com
Mon Apr 22 15:02:56 UTC 2019


Can somebody explain what does "Displaced hdr count” mean? Thanks in advance!



________________________________
发件人: shang xinli <shangxinli at hotmail.com>
发送时间: 2019年4月19日 15:08
收件人: Andrew Haley; Kim Barrett; shade at redhat.com
抄送: hotspot-gc-dev at openjdk.java.net
主题: 回复: 回复: JVM crashes constantly when High GC happens

Thanks Andrew!

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.


(gdb) where

#0  0x00007f0b98256067 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56

#1  0x00007f0b98257448 in __GI_abort () at abort.c:89

#2  0x00007f0b973ae0bc in os::abort (dump_core=<optimized out>, siginfo=<optimized out>, context=<optimized out>) at /home/shangx/jdk/src/hotspot/os/linux/os_linux.cpp:1380

#3  0x00007f0b9786dac7 in VMError::report_and_die (id=id at entry=-536870912, message=message at entry=0x7f0b97ad9bd8 "guarantee(numDisplacedHdrs == numObjsWithDisplacedHdrs) failed", detail_fmt=detail_fmt at entry=0x7f0b97ad9dde "Displaced hdr count",

    detail_args=detail_args at entry=0x7ed8791a6b80, thread=0x7ed888375800, pc=pc at entry=0x0, siginfo=0x0, context=0x7f0b98190180 <g_stored_assertion_context>, filename=0x7f0b97ad9370 "/home/shangx/jdk/src/hotspot/share/gc/cms/promotionInfo.cpp", lineno=275, size=0)

    at /home/shangx/jdk/src/hotspot/share/utilities/vmError.cpp:1571

#4  0x00007f0b9786e8af in VMError::report_and_die (thread=<optimized out>, context=context at entry=0x7f0b98190180 <g_stored_assertion_context>, filename=filename at entry=0x7f0b97ad9370 "/home/shangx/jdk/src/hotspot/share/gc/cms/promotionInfo.cpp", lineno=lineno at entry=275,

    message=message at entry=0x7f0b97ad9bd8 "guarantee(numDisplacedHdrs == numObjsWithDisplacedHdrs) failed", detail_fmt=detail_fmt at entry=0x7f0b97ad9dde "Displaced hdr count", detail_args=0x7ed8791a6b80) at /home/shangx/jdk/src/hotspot/share/utilities/vmError.cpp:1287

#5  0x00007f0b96a478ee in report_vm_error (file=file at entry=0x7f0b97ad9370 "/home/shangx/jdk/src/hotspot/share/gc/cms/promotionInfo.cpp", line=line at entry=275, error_msg=error_msg at entry=0x7f0b97ad9bd8 "guarantee(numDisplacedHdrs == numObjsWithDisplacedHdrs) failed",

    detail_fmt=detail_fmt at entry=0x7f0b97ad9dde "Displaced hdr count") at /home/shangx/jdk/src/hotspot/share/utilities/debug.cpp:264

#6  0x00007f0b9746901a in PromotionInfo::verify (this=this at entry=0x7f0b90125020) at /home/shangx/jdk/src/hotspot/share/gc/cms/promotionInfo.cpp:275

#7  0x00007f0b969b6012 in promoted_oops_iterate<ParScanWithoutBarrierClosure> (cl=0x0, this=0x7f0b90125020) at /home/shangx/jdk/src/hotspot/share/gc/cms/promotionInfo.inline.hpp:46

#8  ConcurrentMarkSweepGeneration::par_oop_since_save_marks_iterate_done (this=<optimized out>, thread_num=<optimized out>) at /home/shangx/jdk/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp:1104

#9  0x00007f0b973e24c8 in ParNewGenTask::work (this=0x7ed88c5811a0, worker_id=16) at /home/shangx/jdk/src/hotspot/share/gc/cms/parNewGeneration.cpp:622

#10 0x00007f0b978df7e0 in run_task (data=..., this=0x7ed888375800) at /home/shangx/jdk/src/hotspot/share/gc/shared/workgroup.cpp:335

#11 GangWorker::loop (this=0x7ed888375800) at /home/shangx/jdk/src/hotspot/share/gc/shared/workgroup.cpp:345

#12 0x00007f0b977a996b in Thread::call_run (this=0x7ed888375800) at /home/shangx/jdk/src/hotspot/share/runtime/thread.cpp:400

#13 0x00007f0b973b8e45 in thread_native_entry (thread=0x7ed888375800) at /home/shangx/jdk/src/hotspot/os/linux/os_linux.cpp:714

#14 0x00007f0b987d8064 in start_thread (arg=0x7ed8791a7700) at pthread_create.c:309

#15 0x00007f0b9830962d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

(gdb)

(gdb)

(gdb)

(gdb)

(gdb) info args

sig = 6

(gdb) select-frame 6

(gdb)

(gdb)

(gdb)

(gdb)

(gdb) info local

numObjsWithDisplacedHdrs = <optimized out>

numDisplacedHdrs = 390463


Xinli

________________________________
发件人: Andrew Haley <aph at redhat.com>
发送时间: 2019年4月6日 8:34
收件人: shang xinli; Kim Barrett; shade at redhat.com
抄送: hotspot-gc-dev at openjdk.java.net
主题: Re: 回复: JVM crashes constantly when High GC happens

On 4/6/19 5:37 AM, shang xinli wrote:
> Does anybody know some tools can detect memory corruption at run time? In the Windows world, we can use GFLAGS<https://blogs.msdn.microsoft.com/webdav_101/2010/06/22/detecting-heap-corruption-using-gflags-and-dumps/>, is there any equivalent tool in Linux I can use?

Yes, a fastdebug build adds a lot of checking.

--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20190422/8db4c621/attachment.htm>


More information about the hotspot-gc-dev mailing list