[CRIU] help in CRIU

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Tue Jul 28 14:27:36 MSK 2020



On 7/28/20 11:56 AM, ashwani yadav wrote:
> Hi,
> 
> I see on your GitHub profile that you've worked in CRIU.
> I've downloaded CRIU and set up on my machine, It's for a project where 
> I've to built something on top of CRIU, add some features to it. It's 
> been 1 month and still didn't understood the code yet.

It's hard to help when we don't even know what exactly and why you are 
doing on top of criu.

If you have some problem with developing new feature to(/on top of) criu 
you can ask all your questions by opening the issue on github 
(https://github.com/checkpoint-restore/criu/issues) with detailed 
descriptions of what you are doing and links to you code. Also you can 
ask questions in gitter https://gitter.im/save-restore/CRIU, or on 
mailing list criu at openvz.org (adding it to CC).

> I was wondering if you could help me with this, explain me the 
> architecture of the CRIU code.

All common architecture is described on https://criu.org . CRIU codebase 
is developing rapidly, so there is no better source of documentation 
then code though. All your specific questions please refer to mailing 
list github or gitter.

> I want to know how did you people set up this on your machines and see 
> the results of edited code as I'm unable to run a debugger here because 
> of makefiles(and also the knowledge i've in makefiles. this seems a 
> little complex) and see the result of the changes I made in code.

You should take a look on https://criu.org/Installation

When you've installed all dependencies and cloned CRIU to some directory 
you can just run "make" in this directory and CRIU builds, for basic 
tasks you should not care about Makefiles.

When you need to debug some place in criu there is a simple trick to do 
it: Just add "sleep(20);" in code and catch criu process with gdb by pid 
"gdb -p <pid>", wait until sleep finishes and debug programm as usual. 
This trick is required because criu forks number of processes and 
attaching the first one with debugger is not of much use some times.

> Thanks in advance.
> 
> Best,
> Ashwani Yadav

We are open source, so please ask your questions to everybody. =)

-- 
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.


More information about the CRIU mailing list