[crac] RFR: 8362837: [CRaC] jdk/crac/MXBean.java can fail on macOS

Radim Vansa rvansa at openjdk.org
Mon Jul 21 09:15:31 UTC 2025


On Sat, 19 Jul 2025 18:26:26 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:

>> The CI runs fine but locally (Linux Fedora 42 x86_64) it is failing for me - for any testcase trying to use OutputAnalyzer for the restore-only part. Such testcases failing for me are for example:
>> - test/jdk/jdk/crac/fileDescriptors/CheckpointWithOpenFdsTest.java
>> - test/jdk/jdk/crac/fileDescriptors/LoggingFileOpenTest.java
>> - test/jdk/jdk/crac/SecureRandom/ReseedTest.java
>> 
>> It does not implement the part
>> 
>>> close to 0
>> 
>> as that is the problem being fixed.
>
> GitHub Actions should run in your repo just like on PRs here, so you should not need to create PRs to test CI. Except for whitespace checking...

@TimPushkin I don't really get the comment

> But looking at the test I would expect it to be fragile: it measures the time from the start of the checkpointed process to the start of its restore and wants it to be 0, and since this is not a reasonable thing to expect it sets a huge tolerance of 10 seconds.

On platforms that don't propagate the 'restore time', it is expected that the current time would be used (which is somewhat later than 'restore initiation'). The test asserts that from the point where we really invoke the restore up to this point it's less than 10 seconds - so asking a trivial process to be restored withing 10 seconds. I thought that this is a reasonable time, though we can make it even 60 seconds if we know that CI can be extra sluggish.

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

PR Comment: https://git.openjdk.org/crac/pull/246#issuecomment-3095838669


More information about the crac-dev mailing list