RFR: 8257228: G1: SIGFPE in G1ConcurrentRefine::create(int*) due to buffers_to_cards overflow [v2]

Jie Fu jiefu at openjdk.java.net
Mon Nov 30 07:05:56 UTC 2020


On Sun, 29 Nov 2020 07:59:31 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Jie Fu has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>> 
>>  - Merge branch 'master' into JDK-8257228
>>  - Refine the erro msg
>>  - Fix mul-overflow-check and error reporting
>>  - 8257228: G1: SIGFPE in G1ConcurrentRefine::create(int*) due to buffers_to_cards overflow
>
> This is only a problem when using values for some command line options that
> are far out of the "normal" range. That's just a general problem; we have
> far too many options, and some of them interact in interesting ways, so that
> it's pretty much impossible to fully test or check for problem cases. And we
> don't want to set artificially low limit values for individual options
> because it's hard to know what some application might find useful. In this
> case, it does look like we can reasonably do more checking though.

Hi @kimbarrett ,

Thanks for your review and comments.

The mul-overflow checking had been fixed. 
The error msg had been refined.


For the sake of maintenance, I didn't use constraint function.

There are quite a few flags involved in it such as:
G1UpdateBufferSize
ParallelGCThreads
G1ConcRefinementThresholdStep
G1ConcRefinementGreenZone
G1ConcRefinementYellowZone
G1ConcRefinementRedZone
Maybe, you can add the constraint function for each of them this time.
But, when a new flag is used in the future, the constraint function may be missed.
Also, it seems a little strange to add this kind of constraints to flags like ParallelGCThreads.
So I prefer to fixing it in buffers_to_cards.

What do you think?

Thanks.
Best regards,
Jie

-------------

PR: https://git.openjdk.java.net/jdk/pull/1489


More information about the hotspot-gc-dev mailing list