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
$ 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
- duplicates
-
JDK-8257228 G1: SIGFPE in G1ConcurrentRefine::create(int*) due to buffers_to_cards overflow
- Resolved