abort in ZForwarding
Stuart Monteith
stuart.monteith at linaro.org
Mon Apr 8 16:39:07 UTC 2019
Hello,
I'm currently getting the following with -XX:+ZVerifyForwarding:
# Internal Error
(/home/stumon01/repos/jdk/src/hotspot/share/gc/z/zForwarding.cpp:72),
pid=13355, tid=13359
# guarantee(entry.from_index() != other.from_index()) failed: Duplicate from
Current thread (0x00007fd65c04f3a0): GCTaskThread "ZWorker#2" [stack:
0x00007fd661542000,0x00007fd661642000] [id=13359]
Stack: [0x00007fd661542000,0x00007fd661642000],
sp=0x00007fd661640c30, free space=1019k
Native frames: (J=compiled Java code, A=aot compiled Java code,
j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x13729b2] ZForwarding::verify() const+0x1c6
V [libjvm.so+0x13948c2] ZRelocate::work(ZRelocationSetParallelIterator*)+0x7a
V [libjvm.so+0x139557d] ZRelocateTask::work()+0x27
V [libjvm.so+0x139f55c] ZTask::GangTask::work(unsigned int)+0x38
V [libjvm.so+0x135353b] GangWorker::run_task(WorkData)+0xab
V [libjvm.so+0x13535f3] GangWorker::loop()+0x37
V [libjvm.so+0x135327a] AbstractGangWorker::run()+0x3e
V [libjvm.so+0x125ce2b] Thread::call_run()+0x195
V [libjvm.so+0xfb9fae] thread_native_entry(Thread*)+0x1ee
I had assumed that this was because of something I'd some wrong on
AArch64, but I find it also occurs on x86.
ZForwarding::verify() is diligent enough to skip over empty entries in
the outer loop. However, this is not done for the inner loop.
This resolves the issue:
diff -r 6eb8c555644a src/hotspot/share/gc/z/zForwarding.cpp
--- a/src/hotspot/share/gc/z/zForwarding.cpp Mon Apr 08 09:44:49 2019 +0100
+++ b/src/hotspot/share/gc/z/zForwarding.cpp Mon Apr 08 17:30:18 2019 +0100
@@ -69,6 +69,11 @@
// Check for duplicates
for (ZForwardingCursor j = i + 1; j < _entries.length(); j++) {
const ZForwardingEntry other = at(&j);
+ if (!other.populated()) {
+ // Skip empty entries
+ continue;
+ }
+
guarantee(entry.from_index() != other.from_index(), "Duplicate from");
guarantee(entry.to_offset() != other.to_offset(), "Duplicate to");
}
Have you already encountered this, shall I create a bug+ patchset ?
BR,
Stuart
More information about the zgc-dev
mailing list