RFR (S): 8161993: 8161993: G1 crashes if active_processor_count changes during startup
thomas.schatzl at oracle.com
Thu Jul 21 11:28:01 UTC 2016
can I have reviews for this small change that fixes crashes with G1
when changing the number of available processors while running?
The problem is that some data structures are allocated using the number
of available processors at startup, and if you later change that number
(i.e. increase it), g1 uses indices to access these data structures
beyond their capacity.
The problem is in DirtyCardQueueSet::num_par_ids() that re-queries the
number of active processors, and then is used e.g. in G1FromCardCache
to index an array.
The proposed solution is to introduce an
initial_active_processor_count() in the runtime that stays fixed after
initialization. This corresponds to the suggestion in JDK-8147910, but
only fixing the immediate crash here.
I would like to have reviewers from both the gc and runtime team for
this change; I cc'ed both mailing lists.
manual testing, jprt, running vm.gc right now
More information about the hotspot-gc-dev