[Crash-utility] PATCH 00/10] teach crash to work with "live" ramdump

Oleg Nesterov oleg at redhat.com
Mon Apr 25 14:48:35 UTC 2016


Hi Dave,

Recently I used crash-tool for the first time and I was pleasantly surprised,
it really looks like a very useful and handy debugging tool ;)

And I was surprised again when I figured out that it can be used to debug the
live system on the same machine. Cool!

Now I am wondering if we can teach it to debug the live guests runnning under
qemu/kvm. This looks certainly possible, qemu supports gdb remote protocol.

But. this obviously needs more work. And. Afaics crash-tool needs some fixes
anyway. See 01/10-07/10, but probably it needs more changes, so far I only
tried to audit task.c and kernel.c. I tried to document every change, but I
am very new to this code so I can be easily wrong.

So can't we teach it to work with live/raw RAM dumpfiles for the start? See
09/10 and 10/10.

With these changes I can run qemu-kvm with the

	-object memory-backend-file,id=MEM,size=128m,mem-path=/tmp/MEM,share=on
	-numa node,memdev=MEM

options and then do

	$ crash path-to-guests-vmlinux live:/tmp/MEM at 0

to debug the live guest, No need to dump-guest-memory + restart /usr/bin/crash
which can be slow.

What do you think?

Oleg.

 defs.h    |  1 +
 filesys.c |  8 ++++----
 kernel.c  |  7 +++----
 main.c    | 11 +++++++++++
 ramdump.c | 49 ++++++++++++++++++++++++++++++++++---------------
 task.c    | 13 ++++++-------
 tools.c   |  2 +-
 7 files changed, 60 insertions(+), 31 deletions(-)




More information about the Crash-utility mailing list