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

Oleg Nesterov oleg at redhat.com
Wed Apr 27 14:43:59 UTC 2016


On 04/27, Dave Anderson wrote:
>
> > > OK, so we're running on a host machine that has one of these memory files
> > > that is accessible as a regular file.
> >
> > Yes, and this file is the physical memory of the guest. So it is essentially
> > the RAM dump which can be used by "crash PATH-TO-THIS-FILE at 0" right now without
> > any patches. And in this particular case the offset is always zero.
> >
> > But not on x86-64, is_ramdump() insists on ramdump_to_elf() even if we could
> > use read_ramdump(), and ramdump_to_elf() doesn't support x86-64.
>
> Right, but that's a trivial fix, right?  As I mentiond before, the only reason
> it doesn't support is because nobody's tried/asked/needed-to.

Probably yes, I simply do not know. I know nothing about elf magic.

> And with x86_64
> support put into place, at least the "non-live" file should be a considered
> a ramdump, right?

Sure. But again, we do not even need to update ramdump_to_elf() and create
the elf header, read_ramdump() can work just fine. This is what 09/10 does.

> > And of course, you can't use this RAM dump in "live" mode (without these
> > changes).
>
> Right -- that's the rub here.  The "live version of a dumpfile" is a hybrid that's
> never been considered before.

Yes, so 10/10 is just a one-liner. But it depends on 1-7. Say, without 02/10
memory_source_init() fails. Without 04/10 /bin/crash segfaults.

> > > So what's the remote access needed
> > > for -- just to query for the particulars of the layout of the memory file?
> >
> > Sorry, I don't understand...
> >
> > Do you ask me what qemu does with this file or what?
>
> This is where I totally got off on the wrong foot.  I thought you had mentioned
> something about remote gdb protocol, or something along those lines where there
> was some remote communication protocal?

Heh ;) I tried to say that this is my very distant goal. Unlikely I will even try
to do this in the foreseeable future. I think it would be nice to implement, but
obviously this need more work than just 30 lines of code added by this series.

Sorry for confusion!

But after this series we can already debug the live guest using /bin/crash, just
you need to pass the additional arguments to qemu.

Oleg.




More information about the Crash-utility mailing list