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

JVM crash with -XX:G1ConcRefinementThresholdStep=16M

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 16
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc

      Description

      The VM crash on startup can be seen on both 32/64-bit platforms:

      $ linux-32bit/jdk/bin/java -XX:G1ConcRefinementThresholdStep=16M
      $ linux-64bit/jdk/bin/java -XX:G1UpdateBufferSize=1G -XX:G1ConcRefinementThresholdStep=16G

      G1ConcurrentRefineThread.calc_min_yellow_zone_size() function calculates the step value as a product of two VM option values and then use the result as a divisor:
      > size_t step = G1UpdateBufferSize * G1ConcRefinementThresholdStep
      > if ((max_yellow_zone / step) < n_workers) {

      The issue is that under the current constraints, multiplication overflow can occur:
      > G1ConcRefinementThresholdStep: range(1, SIZE_MAX)
      > G1UpdateBufferSize: range(1, NOT_LP64(32*M) LP64_ONLY(1*G))

      Reproducer: jtreg/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bulasevich Boris Ulasevich
              Reporter:
              bulasevich Boris Ulasevich
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: