RFR (S): 8161993: 8161993: G1 crashes if active_processor_count changes during startup

Thomas Schatzl thomas.schatzl at oracle.com
Thu Jul 21 11:28:01 UTC 2016


Hi all,

  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.

CR:
https://bugs.openjdk.java.net/browse/JDK-8161993
Webrev:
http://cr.openjdk.java.net/~tschatzl/8161993/webrev/
Testing:
manual testing, jprt, running vm.gc right now

Thanks,
  Thomas



More information about the hotspot-gc-dev mailing list