JDK-8071863 : Validate G1 options that are expressed as percentages
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2015-01-29
  • Updated: 2016-02-19
  • Resolved: 2016-02-19
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 9
9Resolved
Related Reports
Duplicate :  
Relates :  
Description
There are a number of G1-specific options that are expressed as percentages, but which are not validated during argument processing.  In some cases there is no validation at all, and providing arguments outside [0,100] may produce unexpected behavior or crashes.  In other cases there is some limited checking and canonicalization where the option is used, usually with a warning message for invalid values.  It would be better to always validate these options during argument processing.

Specific options include:
- G1SATBBufferEnqueueingThresholdPercent
- G1RSetUpdatingPauseTimePercent
- G1HeapWastePercent
- G1ReservePerscent

Comments
Fixed by JDK-8078555: GC: implement ranges (optionally constraints) for those flags that have them missing URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/da9eeb2c1cbd
19-02-2016

Arguments::verify_percentage() is used Arguments::check_vm_args_consistency() to check whether an argument is a valid percentage value. The intent of this RFE is to add checks for presently unchecked or late-checked options to that check function using that verify function, with the result that there will be a message and the vm will terminate. The mentioned options are the presently unvalidated G1 percentage product options.
30-01-2015

Should these be warnings or should the VM exit with an error? I'd prefer an error but I know that some flags don't behave that way today. I there is (or will be) a common "check_percentage()" we could at least make sure all flags behave the same way.
30-01-2015

ILW = High (crash), Low (happens when the user makes an error), Low (fix the typo) = P4
30-01-2015

The TestG1PercentageOptions regression test (being added as part of JDK-8068942) verifies that such options are validated; when validation of these options is added, they should be added to the test.
29-01-2015