RFR: 8264752: SIGFPE crash with option FlightRecorderOptions:threadbuffersize=30M

Markus Grönlund mgronlun at openjdk.java.net
Fri Apr 16 11:51:41 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

Hi Hui, looks good - thank you for testing and making this a bit more robust.

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

Marked as reviewed by mgronlun (Reviewer).

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


More information about the hotspot-jfr-dev mailing list