Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8186502

Assert when range testing G1RefProcDrainInterval on 64-bit systems

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9, 10
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b33

      Description

      The flag G1RefProcDrainInterval is defined like this:
        product(intx, G1RefProcDrainInterval, 10, \
                "The number of discovered reference objects to process before " \
                "draining concurrent marking work queues.") \
                range(1, max_intx)

      The value of the flag is used to initialize the an int value in G1CMKeepAliveAndDrainClosure. Since the range is defined to allow max_intx this will fail on 64-bit systems where intx is 64-bits wide.

      The test runtime/CommandLine/OptionsValidation/TestOptionsWithRanges doesn't always catch this bug since a concurrent cycle needs to be triggered for the issue to show. To force this we could update the test utils with something like:
      diff --git a/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java b/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
      --- a/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
      +++ b/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
      @@ -216,6 +216,9 @@
                   case "CMSPrecleanDenominator":
                       option.addPrepend("-XX:CMSPrecleanNumerator=" + ((new Integer(option.getMin())) - 1));
                       break;
      + case "G1RefProcDrainInterval":
      + option.addPrepend("-XX:+ExplicitGCInvokesConcurrent");
      + break;
                   case "InitialTenuringThreshold":
                       option.addPrepend("-XX:MaxTenuringThreshold=" + option.getMax());
                       break;

        Attachments

          Activity

            People

            • Assignee:
              lkorinth Leo Korinth
              Reporter:
              sjohanss Stefan Johansson
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: