Difference between revisions of "Debugging"
(Created page with "Category:Using Category:Development Category:HOWTO") |
|||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | == Raise verbosity == | ||
+ | |||
+ | Make sure you use the <code>-v4</code> option for extended [[logging]] and find logs in the work/images [[directories]]. | ||
+ | |||
+ | == Getting core files == | ||
+ | |||
+ | If CRIU crashes it's useful to build it with debug info and look into core file. | ||
+ | |||
+ | * build CRIU with debug info <code>make DEBUG=1</code> | ||
+ | * setup core file generation which depends on distro settings, usually the core generation template is sitting in /proc/sys/kernel/core_pattern, see more details at [http://man7.org/linux/man-pages/man5/core.5.html core.5] | ||
+ | |||
+ | Then upload core file into debugger <code>gdb criu core-file</code> and type <code>bt</code> command to fetch a backtrace. | ||
+ | |||
+ | == Docker C/R == | ||
+ | |||
+ | Docker keeps images in and logs in <code>/var/lib/docker/containers//checkpoints/chp_/criu.work/</code> | ||
+ | |||
+ | == Tracing == | ||
+ | |||
+ | CRIU uses ptrace(), so strace can't be used in some cases. perf trace is an alternative way. It isn't so informative, but it is still better than nothing. | ||
+ | |||
+ | == Images == | ||
+ | |||
+ | The [[CRIT]] tool can help to decode [[images]] into a human readable format. | ||
+ | |||
[[Category:Using]] | [[Category:Using]] | ||
[[Category:Development]] | [[Category:Development]] | ||
[[Category:HOWTO]] | [[Category:HOWTO]] |
Latest revision as of 09:48, 16 February 2017
Raise verbosityEdit
Make sure you use the -v4
option for extended logging and find logs in the work/images directories.
Getting core filesEdit
If CRIU crashes it's useful to build it with debug info and look into core file.
- build CRIU with debug info
make DEBUG=1
- setup core file generation which depends on distro settings, usually the core generation template is sitting in /proc/sys/kernel/core_pattern, see more details at core.5
Then upload core file into debugger gdb criu core-file
and type bt
command to fetch a backtrace.
Docker C/REdit
Docker keeps images in and logs in /var/lib/docker/containers//checkpoints/chp_/criu.work/
TracingEdit
CRIU uses ptrace(), so strace can't be used in some cases. perf trace is an alternative way. It isn't so informative, but it is still better than nothing.
ImagesEdit
The CRIT tool can help to decode images into a human readable format.