Loading... (original) (raw)

1. We were getting 'Floating point exception' i.e. 'SIGFPE => 8' and the faulting function in the core dump is 'VM_Version_Ext::resolve_cpu_information_details()'.
2. Only statement inside VM_Version_Ext::resolve_cpu_information_details which may cause 'Floating point exception' is "_no_of_packages = _no_of_threads / threads_per_package"
when 'threads_per_package' is zero.
3. Point (2) implies either 'threads_per_core()' or 'cores_per_cpu()' evaluate to zero.
4. From the implementation of function 'cores_per_cpu()' it is obvious minimum value return by this function is 1, where as threads_per_core() may evaluated to zero.

So the quick fix is fall back to a default value if we get threads_per_core '0', so that we don't crash.