RFR: 8058935: CPU detection gives 0 cores per cpu, 2 threads per core in Amazon EC2 environment

Vladimir Kempik vladimir.kempik at oracle.com
Mon Nov 17 16:20:58 UTC 2014


Hi,

Please review patch adding sanity check to cores_per_cpu():

http://cr.openjdk.java.net/~vkempik/8058935/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8058935

Few months ago we've got reports of java crashing in amazon ec2 
enviroment (they use Xen).
https://bugs.openjdk.java.net/browse/JDK-8058935
https://bugs.openjdk.java.net/browse/JDK-8058937

JVM args was used to make the crash: -XX:+UnlockCommercialFeatures 
-XX:+FlightRecorder

After investigation I think the crash could only have happened if 
support_processor_topology() returned true and 
_cpuid_info.tpl_cpuidB1_ebx.bits.logical_cpus was zero.

I wasn't able to reproduce the bug on amazon ec2 cloud in present days.

The patch adds sanity check, if cpu topology was used and resulted in 0 
cores per cpu, then fallback to non-topology variant, which can't result 
in 0 cores per cpu.

Testing: JPRT.

Thanks,
Vladimir.


More information about the hotspot-runtime-dev mailing list