[crac] RFR: Correct System.nanotime() value after restore [v2]

Anton Kozlov akozlov at openjdk.org
Thu Apr 13 15:49:11 UTC 2023


On Thu, 30 Mar 2023 12:59:37 GMT, Ashutosh Mehra <duke at openjdk.org> wrote:

> Since you mention it was a bug in kernel or criu and it has been almost 3 years since your commit, may be it is worth enabling the criu changes again to see if the timedwait problem still exists, unless you have already done that.

AFAIK the bug is fixed, but I see no point of relying on OS here. Is there one? Timens that is not changed by CRIU provides correct values for our nanoTime() [1].

> The value returned represents nanoseconds since some fixed but arbitrary origin time (perhaps in the future, so values may be negative). The same origin is used by all invocations of this method in an instance of a Java virtual machine

[1] https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/System.html#nanoTime()

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

PR Comment: https://git.openjdk.org/crac/pull/53#issuecomment-1507198101


More information about the crac-dev mailing list