Integrated: 8264752: SIGFPE crash with option FlightRecorderOptions:threadbuffersize=30M
Hui Shi
hshi at openjdk.java.net
Tue Apr 27 15:48:35 UTC 2021
On Mon, 12 Apr 2021 09:36:56 GMT, Hui Shi <hshi at openjdk.org> wrote:
> …ize=30M
>
> Fix misc explicit JFR memory option caused crash and assertion (https://bugs.openjdk.java.net/browse/JDK-8241773).
>
> 1. Fix SIGFPE crash in div_total_by_per_unit.
> a) In valid_memory_relations, check threadbuffersize should not larger than memorysize.
> b) In "void thread_buffer_size(JfrMemoryOptions* options)", calculate memorysize if it isn't configured, avoid SIGFPE when thread buffer size is larger than default memorysize.
>
> 2. Fix "assert(free_size() == size, "invariant");" in JfrBuffer::initialize.
> Limit globalbuffersize and threadbuffersize under 2G, avoid size_t to u4 coversion lost.
>
> 3. Check and report possible inconsistent conditions after jfr memory size adjustment.
> a) globalbuffercount < MIN_BUFFER_COUNT
> b) globalbuffersize < threadbuffersize
This pull request has now been integrated.
Changeset: 377b3461
Author: Hui Shi <hshi at openjdk.org>
Committer: Markus Grönlund <mgronlun at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/377b3461
Stats: 112 lines in 5 files changed: 99 ins; 0 del; 13 mod
8264752: SIGFPE crash with option FlightRecorderOptions:threadbuffersize=30M
Reviewed-by: mgronlun
-------------
PR: https://git.openjdk.java.net/jdk/pull/3432
More information about the hotspot-jfr-dev
mailing list