[crac] RFR: Collect CREngine child

Dan Heidinga heidinga at openjdk.java.net
Wed Apr 20 18:02:33 UTC 2022


On Thu, 7 Apr 2022 14:02:39 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

> When VM calls for CREngine it does not properly awaits termination of the engine. In case of `criuengine`, this could lead for a dangling process in the CRIU image [1]. This patch adds missing waitpid that eliminates the problem.
> 
> [1] https://github.com/openjdk/crac/blob/crac/src/java.base/unix/native/criuengine/criuengine.c#L68

Apart from the possible fork failure case question, this looks reasonable

And not really related to this PR, but didn't we disable the non linux x64 pr builds?  Do we need to relook at that change?

src/hotspot/os/linux/os_linux.cpp line 5833:

> 5831:   }
> 5832: 
> 5833:   pid_t pid = fork();

Should we check for fork() to fail?  If so, we need to handle `-1` separately from `0` (child) and `> 0` (parent)

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

PR: https://git.openjdk.java.net/crac/pull/18


More information about the crac-dev mailing list