[crac] RFR: Support repeated checkpoint and restore operations
Radim Vansa
duke at openjdk.org
Fri Apr 14 08:35:05 UTC 2023
On Thu, 13 Apr 2023 13:31:34 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:
>> * VM option CRaCCheckpointTo is recognized when restoring the application (destination can be changed)
>> * The main problem for checkpoint after restore was old checkpoint image mmapped to files (CRaC-specific CRIU optimization for faster boot). Before performing checkpoint we transparently swap this with memory using anonymous mapping.
>
> src/hotspot/os/linux/os_linux.cpp line 6707:
>
>> 6705: }
>> 6706:
>> 6707: // Since putenv does not do its own copy of the strings we need to keep
>
> What is the point of these putenv changes?
See the comment in the old code:
> // left this pointer unowned, it is freed when process dies
Without repeated CRs it was fine to leak some memory, but now we have to keep it around until the vars are overwritten and release afterwards. Regrettably `putenv` does not make an internal copy.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/57#discussion_r1166491181
More information about the crac-dev
mailing list