JDK-8161993 : G1 crashes if active_processor_count changes during startup
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-07-21
  • Updated: 2018-06-21
  • Resolved: 2016-07-26
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 Other
8u121Fixed 9 b131Fixed openjdk7uFixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
If os::active_processor_count changes during startup, G1 will crash because it sizes some data structures based on the first call, and then potentially accesses these data structures out of bounds.

This bugfix is about fixing the G1 crash by introducing an initial_active_processor_count() call, but not reusing it for other purposes.
noreg-hard justification: it is hard to reproducably change the number of processors returned by the function exactly after initialization and before second use; further setting the number of threads depends on OS specific functions.

Using the patch provided by JDK-8147970.