JDK-8166105 : Runtime.availableProcessors() ignores Linux taskset command
  • Type: Backport
  • Backport of: JDK-6515172
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-09-15
  • Updated: 2017-03-20
  • Resolved: 2016-09-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u152 b01Fixed 9Fixed
Comments
While this fix has been backported to 8u, the G1 code still uses the os::processor_count() and so will over-provision the number of threads. To address that we need to backport JDK-8147910 (to get the os::initial_active_processor_count() API) and JDK-8161993 (which updates G1 to use the new API). Other GC's will see the active processor count change, but may then be affected by the same problems as G1 if that value changes while the VM is running. So the two backports are needed regardless.
16-12-2016