Git Product home page Git Product logo

Comments (8)

adrianreber avatar adrianreber commented on June 2, 2024

The problem you see is because of duplicate PIDs. CRIU always creates processes with the same PID they had when checkpointing. In your destination environment the PID 12 is already in use so the restore fails.

Common workarounds are to use a container for each process you are trying to restore or the criu-ns script.

What are you trying to achieve? If we would know what your goal is we could maybe give you a better workaround.

Using criu-ns in a container will probably lead to nested namespaces and that is something CRIU usually does not handle well.

from criu.

liuaifu avatar liuaifu commented on June 2, 2024

@adrianreber Thank you for your response. I want to run multiple instances of the same app, with the second and subsequent instances coming from the checkpoint of the first instance. Each instance runs in a different docker container. In other words, a container runs only one instance.

from criu.

adrianreber avatar adrianreber commented on June 2, 2024

So why do you do the checkpoint inside of the container. Docker and Podman offer checkpoint commands which can easily do that:

$ podman container checkpoint -R --export=/tmp/cp.tar
$ podman container restore --import=/tmp/cp.tar --name=copy1
$ podman container restore --import=/tmp/cp.tar --name=copy2

Something like that.

from criu.

liuaifu avatar liuaifu commented on June 2, 2024

Common workarounds are to use a container for each process you are trying to restore or the criu-ns script.

It is currently restored in a different container. But report the error described above.

from criu.

adrianreber avatar adrianreber commented on June 2, 2024

Common workarounds are to use a container for each process you are trying to restore or the criu-ns script.

It is currently restored in a different container. But report the error described above.

Because there is already something running in the destination container. If you use Podman's or Docker's built-in support you avoid the problem of PID collisions.

from criu.

liuaifu avatar liuaifu commented on June 2, 2024

So why do you do the checkpoint inside of the container. Docker and Podman offer checkpoint commands which can easily do that:

$ podman container checkpoint -R --export=/tmp/cp.tar
$ podman container restore --import=/tmp/cp.tar --name=copy1
$ podman container restore --import=/tmp/cp.tar --name=copy2

Something like that.

Thanks, I'll try tomorrow.

from criu.

liuaifu avatar liuaifu commented on June 2, 2024

Common workarounds are to use a container for each process you are trying to restore or the criu-ns script.

It is currently restored in a different container. But report the error described above.

Because there is already something running in the destination container. If you use Podman's or Docker's built-in support you avoid the problem of PID collisions.

I understand a little bit. There are other programs occupying the pid.

from criu.

github-actions avatar github-actions commented on June 2, 2024

A friendly reminder that this issue had no activity for 30 days.

from criu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.