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

Radim Vansa duke at openjdk.org
Fri May 12 06:04:12 UTC 2023


On Fri, 12 May 2023 01:56:58 GMT, Jan Kratochvil <duke at openjdk.org> wrote:

>> 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.
>
> Besides discussion of this patch vs. native CRIU timens support I find easier (YMMV) and less error-prone to just use simple `LD_PRELOAD`+`RTLD_NEXT` to simulate the system reboots: https://stackoverflow.com/a/6083624/2995591

I agree with your line of thinking, and since this test actually uses custom docker image I can add those libraries to the base image. But in general it's a problem of criu packaging with implicit dependencies, officially installed binary should get this handled in dependency management. Since those few functions from libbsd are reimplemented in criu, we could just disable the dependency in our fork.
However we'll run into the same problem with libnftables - I found that with the nftables support the unprivileged restore as root in Docker container does not work anymore. And that got compiled in only because of the -dev library present, there's no compile time switch.

The error you describe can be solved with `git clean -f -x`, regrettably `make clean` does not do its job very well.

Not sure what function are you suggesting to replace?

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

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


More information about the crac-dev mailing list