Difference between revisions of "Debugging"

From CRIU
Jump to navigation Jump to search
Line 16: Line 16:
 
Docker keeps images in ... and logs in ...
 
Docker keeps images in ... and logs in ...
  
== strace ==
+
== 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.
+
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 ==
 
== Images ==

Revision as of 20:30, 11 January 2017

Raise verbosity

Make sure you use the -v4 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 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/R

Docker keeps images in ... and logs in ...

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 image files into a human readable format.