RFR: 8330275: Crash in XMark::follow_array [v5]
Thomas Stuefe
stuefe at openjdk.org
Wed May 8 15:46:59 UTC 2024
On Wed, 8 May 2024 14:17:13 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>> This PR addresses the issue in ZGC where the number of address offset bits can go beyond the limit imposed by the encoding scheme in mark stack, thereby causing the encoding to fail.
>> Encoding of partial array offset in mark stack requires that the max address bit be no more than 46 bit. ~~But the current mechanism to probe maximum address offset bits on aarch64, riscv and ppc platforms can return value larger that 44 bits. This patch sets the maximum address offset bits to 44.~~
>>
>> ~~I have updated the generational mode to avoid subtracting 3 bits from the maximum address offset bit probed by the system, as the generational mode does not use multi-mapping.~~
>>
>> ~~I have also updated the code to set MarkPartialArrayMinSizeShift dynamically depending on the number of address offset bits used. This would avoid running into such problem again if in future maximum address offset bits is increased beyond 44.~~
>>
>> ~~For some reason (that I can't comprehend from the code) the existing implementation for probing the max addressable bit for ppc in non-generation ZGC is very different from other platforms and from generational mode as well. I have kept the existing implementation as is and just fixed it to ensure it does not return value greater than 44 bits.~~
>>
>> Testing: ~~test/hotspot/jtreg/gc/z and test/hotspot/jtreg/gc/x on x86~~ tier1, tier2 and tier3 on aarch64 using fastdebug build with options JTREG="EXTRA_PROBLEM_LISTS=ProblemList-zgc.txt;JAVA_OPTIONS=-XX:+UseZGC -XX:+ZVerifyOops;JOBS=4" (as per the suggestion in [JDK-8330275](https://bugs.openjdk.org/browse/JDK-8330275?focusedId=14667864&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14667864))
>>
>> Update: Striked out the changes that are not relevant now that it is only doing a point fix for aarch64
>
> Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove the confusing comment around addressable memory limit
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
Looks good, question inline.
src/hotspot/cpu/aarch64/gc/x/xGlobals_aarch64.cpp line 147:
> 145: // Default value if probing is not implemented for a certain platform: 128TB
> 146: static const size_t DEFAULT_MAX_ADDRESS_BIT = 47;
> 147: // Minimum value returned, if probing fails: 64GB
any reason you removed the comment for MINIMUM_MAX_ADDRESS_BIT?
-------------
Marked as reviewed by stuefe (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18941#pullrequestreview-2046034124
PR Review Comment: https://git.openjdk.org/jdk/pull/18941#discussion_r1594252812
More information about the hotspot-gc-dev
mailing list