RFR: 8241603: ZGC: java/lang/management/MemoryMXBean/MemoryTestZGC.sh crashes on macOS

Per Liden per.liden at oracle.com
Mon Apr 6 15:04:29 UTC 2020


It was reported that "Every few days, the test 
java/lang/management/MemoryMXBean/MemoryTestZGC.sh crashes on macOS. It 
is macOS 10.14.4, and it is a virtualized machine running with VMWare 
hypervisor."

The problem seems to be that the hypervisor (in some configurations) can 
migrate a "virtual CPU" from one physical CPU to another, and start to 
report a different APIC id. As a result, it can appear as if there are 
more than os:processor_count() CPUs in the system. To void this, we 
allow more than one APIC id to be mapped to the same logical processor 
id, so that os::processor_id() always returns a processor id that is 
less than os::processos_count().

One could argue that this is really a hypervisor bug, but we can still 
make an effort to mitigate the problem in the JVM.

SAP-folks (CC:ing those who commented in the bug), since you ran into 
this problem and I don't have access to a VMware setup where I can 
test/reproduce this, could you please test this patch to verify it 
solves the problem? If so, that would be much appreciated.

Bug: https://bugs.openjdk.java.net/browse/JDK-8241603
Webrev: http://cr.openjdk.java.net/~pliden/8241603/webrev.0
Testing: Tier 1-6 on macOS (but not macOS on top of VMware)

cheers,
Per



More information about the hotspot-gc-dev mailing list