Jump to: navigation, search


377 bytes added, 13:43, 12 July 2016
Fix page to describe current coredump statate
Generate valid core dump from CRIU images.
=== Description ===
CRIU images contain lots of information about process state. In fact, it Criu-coredump is sufficient enough to generate avalid core dump which can be later be used by gdb, for example. criu-coredump does exactly tool that, it takes adirectory with CRIU images and produces Elf core dumpscores.
Basically, you can It consists of a python script(criu/coredump/criu-coredump) for cmdline use CRIU to checkpoint task when you need it (i.e. when it hangs, or when an error occures)or make your application call CRIU via one of its interfacesas well as a python module(CLI, RPC or C librarycriu/coredump/criu_coredump) and then produce core dumpand inspect it via gdbto manipulate generated cores on a deeper level.
To generate core dump of your application you don't even need to be a root, it is enough for you to be the ownerof that task. For that all you have two choices: 1) Use CRIU service running and use [[RPC]] or [[C_API]]. It isuseful if you want your app to automatically call CRIU. 2) Use CRIU binary with suid bit set.=== Prerequisites ===
criu-coredump project provides both cmdline tool and python moduleAs the main goal of CRIU is to be able to save process tree on disk to be restored later, the amount of information its images contain is much bigger than what is typically contained in a core dump(criu_coredumpi.e. memory + few notes). That and the fact that CRIU provides a number of convenient API's, so in theory gives anyone an ability to use CRIU for debugging their applications, i.e. like the abandoned google-coredumper allows you can to generate core dumps at any time. But in practice, there are no tools that have native support for criu images, making it impossible to conveniently use them for such purpose. So it in yourpython appswould be nice if we could convert criu images into much more common core dumps to be used with a great variety of available tools.
=== Limitations ===
VVAR and VSYSCALL vmas are just filled with zeroes, as CRIU doesn't currently provide them. VVAR is a tricky one and gdb also has problems dumping it[]. VSYSCALL in theory could just be read from current process, so it should be quite easy to fix.
=== Installation ===
<pre>$ python install</pre>
=== Usage ===
criu-coredump [-h] [-i IN] [-p PID] [-o OUT] CRIU core dump optional arguments: -h, --help show this help message and exit -i IN, --in IN directory where to get images from. -p PID, --pid PID generate core dump of a process identified by PID. If not specified -- generating coredump for each specific pid.(all pids py default) -o OUT, --out OUT directory to write core dump coredumps to.
=== Project resources ===
Project is located at [https://githubasciinema.comorg/efiopa/18936 Demo] of a previous version of criu-coredump GitHub], when it was planned to be a part of CRIT.

Navigation menu