[crac] RFR: Close extraneous file descriptors [v2]

Radim Vansa duke at openjdk.org
Fri Feb 24 11:47:38 UTC 2023


On Mon, 20 Feb 2023 18:28:47 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> Radim Vansa has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>> 
>>  - Remove unneeded check
>>  - Applied review suggestions
>>  - Close non-standard file descriptors on boot
>>    
>>    If the process is configured for Checkpoint and is started with open file descriptors (e.g. inherited from parent process), under some circumstances CRIU cannot properly execute the checkpoint. Prevent this be proactively closing file descriptors > 2 on boot.
>>    This behaviour can be overriden by settings -XX:CRIgnoreFileDescriptors to a comma-separated list of FD numbers or paths these file descriptors map to.
>
> src/hotspot/os/linux/os_linux.cpp line 6512:
> 
>> 6510:       int r = readfdlink(fd, path, sizeof(path));
>> 6511:       if (!is_fd_ignored(fd, r != -1 ? path : nullptr)) {
>> 6512:         tty->print("CRaC closing file descriptor %d: %s\n", fd, path);
> 
> `log_trace(os)` to be consistent with line 6484?

It's meant to be more visible than trace-level: for consistency I'll make this `log_warning(os)`

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

PR: https://git.openjdk.org/crac/pull/45


More information about the crac-dev mailing list