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

Jan Kratochvil duke at openjdk.org
Thu May 11 15:18:17 UTC 2023


On Thu, 11 May 2023 14:54:58 GMT, Radim Vansa <duke at openjdk.org> wrote:

>> test/jdk/jdk/crac/java/lang/System/NanoTimeTest.java line 82:
>> 
>>> 80:                     "-e", "LD_PRELOAD=/opt/path-mapping-quiet.so",
>>> 81:                     "-e", "PATH_MAPPING=/proc/sys/kernel/random/boot_id:/fake_boot_id",
>>> 82:                     CracBuilder.CONTAINER_NAME, CracBuilder.DOCKER_JAVA);
>> 
>> On Fedora 36 x86_64 the testcase does not work for me:
>> 
>> Starting docker container:
>> docker run --rm -d --privileged --init --volume /home/azul/azul/crac-git/JTwork/classes/jdk/crac/java/lang/System/NanoTimeTest.d:/cp/0 --volume /home/azul/azul/crac-git/JTwork/classes/test/lib:/cp/1 --volume cr:/cr --volume /home/azul/azul/crac-git/build/linux-x86_64-server-fastdebug/jdk/lib/criu:/criu --env CRAC_CRIU_PATH=/criu --name crac-test -v /tmp/NanoTimeTest-3201524983642970594-boot_id:/fake_boot_id jdk-internal:test-system-nanotime sleep 3600
>> Starting process to be checkpointed:
>> docker exec -e LD_PRELOAD=/opt/path-mapping-quiet.so -e PATH_MAPPING=/proc/sys/kernel/random/boot_id:/fake_boot_id crac-test /jdk/bin/java -ea -cp /cp/0:/cp/1: -XX:CRaCCheckpointTo=cr jdk.test.lib.crac.CracTest __run_test__ NanoTimeTest 0 true
>> /criu: error while loading shared libraries: libbsd.so.0: cannot open shared object file: No such file or directory
>> Exception in thread "main" jdk.crac.CheckpointException
>
> Are you using your own build of CRIU? Looks like you have CRIU build with libbsd support. When you remove `libbsd-devel` and rebuild CRIU this should work.

Yes. When I remove `libbsd-devel` I get:

/usr/bin/ld: /home/azul/azul/criu-git/criu/apparmor.c:127: undefined reference to `strlcpy'
/home/azul/azul/criu-git/criu/crtools.c:130: undefined reference to `setproctitle_init'

Besides that no package should break (despite only its testcase) when some additional system feature is available.

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

PR Review Comment: https://git.openjdk.org/crac/pull/53#discussion_r1191337406


More information about the crac-dev mailing list