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

Radim Vansa duke at openjdk.org
Thu Feb 16 09:27:07 UTC 2023


> Java code cannot use inherited non-standard file descriptors; these can cause trouble when trying to checkpoint the process via CRIU, and hence we will proactively close them on boot.

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.

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

Changes: https://git.openjdk.org/crac/pull/45/files
 Webrev: https://webrevs.openjdk.org/?repo=crac&pr=45&range=01
  Stats: 253 lines in 7 files changed: 237 ins; 12 del; 4 mod
  Patch: https://git.openjdk.org/crac/pull/45.diff
  Fetch: git fetch https://git.openjdk.org/crac pull/45/head:pull/45

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


More information about the crac-dev mailing list