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

JVM crash with -XX:G1ConcRefinementThresholdStep=16M

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 17
    • 16
    • hotspot
    • gc

      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

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

              Created:
              Updated:
              Resolved: