-
Notifications
You must be signed in to change notification settings - Fork 582
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
Documentation #1980
Comments
Thanks for reaching out, but if nobody steps up and writes the documentation then it just does not exist. Not really sure how to help you with the overall complain that the documentation is incomplete.
CRIU currently always requires
Neither. But that is easy to figure out by trying it out.
Not sure I understand that questions. The restored process PID is always the same as during checkpointing.
Probably the PID of your process calling CRIU, but that sounds also really easy to test.
Somebody needs to step up and write the documentation. It is an open source project and any help is always welcome. |
Hi @albertz, to follow up on Adrian's comment above, CRIU is a community-driven open source project and contributions are always welcome!
I would recommend using the search tool in the top right corner at https://criu.org/.
Currently, CRIU's man page has the most complete documentation about all command-line options. In addition, there is useful information in the git history and mailing list.
There is an example and documentation about I hope this helps. Please feel free to reach out in gitter if you have any questions :) |
I was not really sure if it does not exist, or if the homepage somehow is broken. Because I know it exists. There is some documentation in the man-page. But that is missing on the homepage? So I thought something must be broken. On the homepage, I would have expected that man-page documentation + maybe sth more. So, at the very least, I would copy/paste the man-page documentation also on the homepage.
I'm still trying and so far it did not work at all, but maybe that is because I misunderstand sth, because of lacking documentation. I always get some errors.
When I call
I would help, but the problem is, I don't really know anything about criu, so I cannot really help. And I don't really know where I could even start learning about criu when there is no real documentation.
Ah, that's very unfortunate. Then I probably cannot really use it anyway in my environment. Or when I use the service (I also have not really figured out how to use that, and what that really is), would only the service require root, but then the dump/restore can happen in userspace? |
Thanks. This issue here was mostly about documentation, but as you see, I have lots of more specific questions, and I guess that's a better place to ask them. |
The restored process will have the exact same PID as during checkpointing. Independent of the CRIU main process. CRIU will use
The service is not widely used and opens up more or less the same problems as having root. You can think about giving CAP_SYS_ADMIN to the CRIU binary, but that is also very similar to having root. You can always try the non-root CRIU support in the PR mentioned. We do not know what you want to do, but it could work. |
For reference, what I try to accomplish, is this project: https://github.com/albertz/python-preloaded Python startup time including importing big modules like TensorFlow or PyTorch can take a long time (in case of slow FS, it can take 10-20 seconds). I want to dump the state right after that is loaded, and store it on disk, and then later restore the state, but allow to run any custom Python script from that state on. |
That is exactly what the non-root PR tries to achieve in combination with Java. Fast startup. |
I don't understand this. How can it have the same PID as during checkpointing? What if another process already has that PID? I actually want to restore the process multiple times, running simultaneously. How can they have all the same PID? I want that the restored processes all have their own PID. |
CRIU magic 😉 As mentioned above, we us
That is a problem and one of the limitation of CRIU. If a PID collisions happens, the restore will fail.
Does your process have child processes or threads? How should the restored process signal its child processes or threads if the PID changes. That is the reason we only restore with the same PID. If you have a process without child processes or threads you can try to change the PID in the CRIU image files using
See above not possible. The easy solution, however, is to restore each copy of the process into a new PID namespace and the problem is solved. |
Btw, in the documentation (https://criu.org/Comparison_to_other_CR_projects), it says:
So this is wrong? At least before PR #1930 is merged? |
Sounds like it is not correct. I do not know who created that table with what in mind. Maybe there is something I am not aware. |
Actually not, but it is out of date. A few years ago, CRIU used to support the so-called service mode that allows to run CRIU daemon as a systemd service and unprivileged users to connect and perform checkpoint/restore. However, this has been deprecated due to security concerns (https://criu.org/Security, a90d01a) |
A friendly reminder that this issue had no activity for 30 days. |
GitHub links https://criu.org/ as the main homepage. On that page, the documentation seems very incomplete. E.g. I wanted to read about the options for
criu dump
andcriu restore
in very detail. However, the corresponding pages seem empty? I looked here: https://criu.org/CLI. Maybe that's the wrong place?It would be nice if the documentation can be found more easily.
Very unexpectedly, it seems that the man page has some information (but with too little details). I would have expected to find a more in depth documentation somewhere on the homepage.
Some aspects I am not really sure I understand well:
Does
criu dump
requiressudo
? Always? Sometimes? Can I avoid it? I get many errors when I run it without.Does
criu restore
requiressudo
? Always? Sometimes? Can I avoid it? I get many errors when I run it without. But I really want to avoidsudo
here.--restore-detached
or--restore-sibling
, which is the default? The restored process pid is not the same as thecriu restore
pid but a separate (sub/detached) process? In case of detached, what is the parent process?What exactly does
--exec-cmd
do?Many other links on the homepage also link to empty pages. I'm not exactly sure whether that is correct or something is wrong. For example:
https://criu.org/Slow-boot_services_speed_up
The FAQ link seems to be broken: https://criu.org/FAQ
The text was updated successfully, but these errors were encountered: