[CRIU] [PHAUL][BUG] P.Haul Test Code Fails with Simple Program

Andrei Vagin avagin at virtuozzo.com
Tue Feb 6 10:31:37 MSK 2018


On Mon, Feb 05, 2018 at 10:02:35PM -0700, John Goen wrote:
> In attempting to run the test program for P.Haul provided in its source
> directory, I have run into the following issue:
> 
>     Setup:
>         1. On a single VM with updated kernel and recent criu-dev branch,
> build and run a simple program such as the one below (titled
> test-migrate.c):
>             #include <stdio.h>
>             #include <unistd.h>
> 
>             int main() {
>                 unsigned long i = 0;
>                 while(1) {
>                     printf("Iteration %u.\n", i++);
>                     sleep(1);
>                 }
>                 return 0;
>             }
> 
>         (NOTE: The provided setup with piggie.c failed for me with the
> piggie program failing to spawn it's child process, returning -1, so I
> opted for a simpler test program)
> 
>         2. In the phaul/ directory of CRIU, build and run the test with the
> following commands:
>             $ make test
>             $ ./src/test/test `pidof test-migrate`
> 
>             The program should exit with the following printouts:
>                 Make server part (socket 4)
>                 Make client part (socket 3)
>                 Migrate
>                 S: start iter
>                 Failed: operation failed (msg: err:0)
> 
>     Pre-Dump Log:
>         (00.000117) Enforcing memory tracking for pre-dump.
>         (00.000161) Enforcing tasks run after pre-dump.
>         (00.000204) irmap: Searching irmap cache in work dir
>         (00.000224) No irmap-cache image
>         (00.000233) irmap: Searching irmap cache in parent
>         (00.000253) irmap: No irmap cache
>         (00.000295) cpu: fpu:1 fxsr:1 xsave:1
>         (00.000454) vdso: VDSO detection turned off
>         (00.000464) Re-using ps socket 3
>         (00.000524) Add net ns 1 pid 916
>         (00.000546) Add mnt ns 2 pid 916
>         (00.000566) Add pid ns 3 pid 916
>         (00.000594) Error (criu/util.c:407): Can't open 32571: No such file
> or directory
>         (00.000622) Unfreezing tasks into 1
>         (00.000635) Disconnect from the page server (null):0
>         (00.000789) Error (criu/cr-dump.c:1625): Pre-dumping FAILED.
> 
> Not being knowledgeable in CRIU nor P.Haul, I'm unsure why CRIU is trying
> to and cannot open the referenced file descriptor, and the empty return
> message and error code 0 are unclear to me.
> 
> Please let me know if any additional information is required.
> 
> Also, if anyone knows of any known-working example of running P.Haul, I
> would greatly appreciate any guidance in its usage.

We run this test in Travis-CI:
https://travis-ci.org/checkpoint-restore/criu/jobs/337850196

Here is a script what we use to execute the test:
[avagin at laptop criu]$ cat scripts/travis/phaul
#!/bin/bash

set -e -x

export CC=gcc
export PATH=`pwd`/criu:$PATH &&
cd phaul/
mkdir -p src/github.com/xemul/criu &&
ln -s ../../../../ src/github.com/xemul/criu/phaul &&
export GOPATH=`pwd` &&
cd src/github.com/xemul/criu/phaul &&
make run_test

> 
> Thanks,
> John Goen

> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu



More information about the CRIU mailing list