[crac] RFR: Print better diagnostics for spawning CRIU [v2]

Anton Kozlov akozlov at openjdk.org
Thu Aug 10 12:01:28 UTC 2023


On Thu, 10 Aug 2023 06:38:30 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

>> The problem is users do not execute `criuengine` themselves. From my experience:
>> 
>> $ $JTREG_HOME/bin/jtreg -jdk:$ZULU_HOME -v:all -timeout:10 $TEST_HOME/test/jdk/jdk/crac/BigCheckpointTest.java
>> Spawned CRIU "/home/azul/azul/crac-git/build/linux-x86_64-server-fastdebug/images/jdk/lib/criu dump -t 648896 -D cr --shell-job -v4 -o dump4.log" has not properly exited: exit code 1 - check dump4.log
>> $ ls -l dump4.log
>> ls: cannot access 'dump4.log': No such file or directory
>> 
>> How to find out `dump4.log` is hiding in the `JTwork/scratch_1/cr` subdirectory?
>> 
>> $ ls -l  ./JTwork/scratch_1/cr/dump4.log
>> -rw------- 1 azul azul 3547 Aug 10 06:58 ./JTwork/scratch_1/cr/dump4.log
>
> A little side note on the wording: the 'Spawned' looks like a verb at first glance and the command breaks fluency of the sentence. I would make the log a bit more structured:
> 
> CRIU failed with exit code 1 - check /path/to/dump4.log for details.
> Command: /home/azul/azul/crac-git/build/linux-x86_64-server-fastdebug/images/jdk/lib/criu dump -t 648896 -D cr --shell-job -v4 -o dump4.log

>> we are not required to abs(imagedir), as unprocessed that is in the same way as it was provided in the args
> The problem is users do not execute criuengine themselves. From my experience:
> $JTREG_HOME/bin/jtreg -jdk:$ZULU_HOME -v:all -timeout:10 $TEST_HOME/test/jdk/jdk/crac/BigCheckpointTest.java
Spawned CRIU "/home/azul/azul/crac-git/build/linux-x86_64-server-fastdebug/images/jdk/lib/criu dump -t 648896 -D cr --shell-job -v4 -o dump4.log" has not properly exited: exit code 1 - check dump4.log

My point was about absolute path for image dir. I.e. this one looks fine

> $ java -XX:CRaCheckpointTo=./cr
> Spawned CRIU "/home/azul/azul/crac-git/build/linux-x86_64-server-fastdebug/images/jdk/lib/criu dump -t 648896 -D ./cr --shell-job -v4 -o dump4.log" has not properly exited: exit code 1 - check *./cr/dump4.log* 

But Jtreg case is valid, OK.

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

PR Review Comment: https://git.openjdk.org/crac/pull/97#discussion_r1290012673


More information about the crac-dev mailing list