[crac] RFR: Improve modules handling in initial FD bookkeeping

Anton Kozlov akozlov at openjdk.org
Fri Apr 21 09:54:15 UTC 2023


On Thu, 20 Apr 2023 15:59:42 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

> Replace paths comparision with `os::same_file` which compares paths first, then compares st_{ino,dev}. This makes the check a bit more robust and fixes CRaC example-lambda [1]
> 
> Also, an annoying empty line is fixed in the warning, now that looks like:
> 
> anton at mercury:~/proj/crac$ ./jdk/bin/java -XX:CRaCCheckpointTo=./cr -version
> [0.001s][warning][os] CRaC closing file descriptor 31: /dev/ptmx
> openjdk version "17-internal" 2021-09-14
> OpenJDK Runtime Environment (build 17-internal+0-adhoc..crac)
> OpenJDK 64-Bit Server VM (build 17-internal+0-adhoc..crac, mixed mode)
> 
> 
> [1] https://github.com/CRaC/example-lambda

Thank you for review. Could you please click "Approve" in Review?

The modules check became a bit more expensive, involves stat syscall. So we have a chance to match file path/fd and avoid modules test, that anyway can succeed only once.

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

PR Comment: https://git.openjdk.org/crac/pull/59#issuecomment-1517573020


More information about the crac-dev mailing list