Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8346796

[CRaC] Initialize clock before restore on Mac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • repo-crac
    • repo-crac
    • 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.

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

              Created:
              Updated:
              Resolved: