Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't restore: Desired next pid 1001 is already taken #3

Open
twood02 opened this issue Dec 7, 2020 · 0 comments
Open

Can't restore: Desired next pid 1001 is already taken #3

twood02 opened this issue Dec 7, 2020 · 0 comments

Comments

@twood02
Copy link

twood02 commented Dec 7, 2020

In my tests I sometimes have trouble restoring a container because the pid is already taken. I'm not sure why this is happening since it looks like FF already tries to jump ahead a bit in the PID space. Is there an easy way to avoid this?

[ff.run] (0.001s) Time is Sun, 06 Dec 2020 20:17:34 +0000
[ff.run] (0.001s) Host is da1273b3d3ec
[ff.run] (0.001s) Invocation ID is QIQ8Ea
[ff.run] (0.012s) Fetching image manifest for file:/tmp/ff-test
[ff.run] (0.014s) Restoring application
[ff.run] (0.499s) Uncompressed image size is 531 MiB, rate: 1099 MiB/s
set_ns_last_pid: WARN: Desired next pid 1001 is already taken
set_ns_last_pid: WARN: Desired next pid 1001 is already taken
set_ns_last_pid: WARN: Desired next pid 1001 is already taken
set_ns_last_pid: WARN: Desired next pid 1001 is already taken
set_ns_last_pid: WARN: Desired next pid 1001 is already taken
set_ns_last_pid: WARN: Desired next pid 1001 is already taken
pie: 1000: Error (criu/pie/restorer.c:1984): Unable to create a thread: 1002
pie: 1002: Error (criu/pie/restorer.c:615): Thread pid mismatch 1002/1001
pie: 1000: Error (criu/pie/restorer.c:2127): Restorer fail 1000
Error (criu/cr-restore.c:2583): Restoring FAILED.

I'm using commands from the README:

  docker run \
    --rm -t \
    --cap-add=cap_sys_ptrace \
    --name ff \
    -p 8080:8080 \
    --mount type=bind,source=$HOME/.aws,target=/mnt/.aws \
    --mount type=bind,source=/tmp,target=/tmp \
    --mount type=bind,source=`pwd`/../httpserv,target=/httpserv \
    -e AWS_CONFIG_FILE=/mnt/.aws/config \
    -e AWS_SHARED_CREDENTIALS_FILE=/mnt/.aws/credentials \
    fastfreeze:latest \
    fastfreeze run --no-restore --image-url file:/tmp/ff-test -- \
    /httpserv/httpserv -mem 512 &

  docker exec ff fastfreeze checkpoint --cpu-budget high --num-shards 4

  # wait for CP to finish
  docker exec ff fastfreeze wait

docker run \
    --rm -t \
    --cap-add=cap_sys_ptrace \
    --name ff2 \
    -p 8080:8080 \
    --mount type=bind,source=$HOME/.aws,target=/mnt/.aws \
    --mount type=bind,source=/tmp,target=/tmp \
    --mount type=bind,source=`pwd`/../httpserv,target=/httpserv \
    -e AWS_CONFIG_FILE=/mnt/.aws/config \
    -e AWS_SHARED_CREDENTIALS_FILE=/mnt/.aws/credentials \
    fastfreeze:latest \
    fastfreeze run --image-url file:/tmp/ff-test -- \
    /httpserv/httpserv -mem 512 &

(httpserv is just a simple go web server for testing; I'm using ubuntu 20.04 and FastFreeze 1.0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant