[jdk11u-dev] RFR: 8191278: MappedByteBuffer bulk access memory failures are not handled gracefully
Sergey Nazarkin
snazarkin at azul.com
Thu Aug 5 19:15:17 UTC 2021
The patch looks scary but in general it just adds a guard at the beginning of unsafe copy block. So a bunch of code just shifted right without single line modification.
We got a few reports from the users about JVM crash when they modify file being mapped. It was definitely application issue but Unsafe contains protection for primitive types so it might be worth to have the same for copy operation.
> On Aug 5, 2021, at 11:46, Andrew Haley <aph at redhat.com> wrote:
>
> On 7/29/21 1:28 PM, Sergey Nazarkin wrote:
>
>> I'd like to backport this changes to fix crash happens on memory mapped file operations. The patch applies almost cleanly except stubGenerator_arm.cpp due to miss of JEP 340 (One AArch64 Port, Not Two), and some copyright year conflicts.
>> Need to note that a series of follow up is required to fix some platforms build. Particularly arm32/aarch64 is not buildable without 8226871. I'll create necessary PR soon.
>> Tested with tier1/tier2 and new InternalErrorTest.
>
> Wow. This is a very invasive patch for a P3 enhancement (that mysteriously
> got upgraded to a P2 for backports.) We'd need to see evidence of significant
> hardship to users in order to justify approval.
>
> As far as I know, this only has any effect if someone modifies a file in
> some way while a mapping is open.
>
> --
> Andrew Haley (he/him)
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> https://keybase.io/andrewhaley
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>
More information about the jdk-updates-dev
mailing list