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

Hui Shi hshi at openjdk.java.net
Sat Apr 17 04:55:02 UTC 2021


> …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

Hui Shi has updated the pull request incrementally with one additional commit since the last revision:

  Fix test fail on aarch64 when VM page is larger than 4K

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3432/files
  - new: https://git.openjdk.java.net/jdk/pull/3432/files/a6245748..c1ffe6ed

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3432&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3432&range=00-01

  Stats: 11 lines in 1 file changed: 8 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3432.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3432/head:pull/3432

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


More information about the hotspot-jfr-dev mailing list