[CRaC] Initialize clock before restore on Mac

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • repo-crac
    • Affects Version/s: repo-crac
    • Component/s: hotspot
    • None

      `jdk/crac/recursiveCheckpoint/Test.java` test always fails in GitHub Actions on MacOS, at least on x64, with the following exception:
      ```
      java.lang.RuntimeException: Process returned unexpected exit code: 136 expected: 0 but was: 136
      at jdk.test.lib.Asserts.fail(Asserts.java:691)
      at jdk.test.lib.Asserts.assertEquals(Asserts.java:204)
      at jdk.test.lib.crac.CracProcess.waitForSuccess(CracProcess.java:107)
      at jdk.test.lib.crac.CracBuilder.doRestore(CracBuilder.java:377)
      at Test.test(Test.java:47)
      at jdk.test.lib.crac.CracTest.run(CracTest.java:155)
      at jdk.test.lib.crac.CracTest.main(CracTest.java:89)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:573)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
      at java.base/java.lang.Thread.run(Thread.java:1576)
      ```

      Upon investigation, the cause seems to be that when restoring CRaC uses time info before it is initialized on Mac which results in division by zero.

            Assignee:
            Timofei Pushkin
            Reporter:
            Timofei Pushkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: