Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   How do debug the kdump kernel using a Xen dump-core file? (http://www.linux-archive.org/crash-utility/487567-how-do-debug-kdump-kernel-using-xen-dump-core-file.html)

Dave Anderson 02-10-2011 12:54 PM

How do debug the kdump kernel using a Xen dump-core file?
 
----- Original Message -----
> Hi Olaf,
>
> On Thu, Feb 10, 2011 at 02:07:02PM +0100, Olaf Hering wrote:
> >
> > Hello,
> >
> > 'xm dump-core -L <domain>' generates a coredump of a Xen4 HVM guest, and
> > crash is able to poke around in this coredump.
> > Thanks for that.
> >
> > But: How can I use crash to debug the crash/kdump kernel itself?
> > I did a 'echo c > /proc/sysrq-trigger' and want to look at the crash
> > kernel, not the normal kernel.
> >
> > Olaf
>
> You can make the crash kernel come all the way up to multi-user mode.
> Then run crash. I haven't run crash under the crash kernel, but I don't
> see why it wouldn't work.

Hmmm. I've never tried it, but because of the relocation, live access
won't work. But you *may* be able to coerce it into coming up by forcing
the phys_base to whatever it is:

# crash --machdep phys_base=<physical-base-address>

BTW, that's with x86_64 only.

Dave

>
> I use this method with a SLES system:
> edit /etc/sysconfig/kdump and set KDUMP_SAVEDIR to a
> non-existing dir:
> KDUMP_SAVEDIR="file:///fubar"
> KDUMP_IMMEDIATE_REBOOT="no"
>
> Or this seems to work with a RHEL6 system:
> - edit /etc/init.d/kdump and comment out the makedumpfile and restart
> lines; just make it exit
> - modify script /sbin/mkdumprd so that it does not save a
> dump, but goes to user mode:
> 2429,2430c2429,2432
> < emit " $CORE_COLLECTOR /proc/vmcore $VMCORE-incomplete...
> > emit "# $CORE_COLLECTOR /proc/vmcore
> > $VMCORE-incomplete...
> ---
> < emit " exitcode=$?"
> > emit " exitcode=1"
> 2444c2446,2448
> < emit " $FINAL_ACTION"
> > emit " echo bye"
> and /etc/init.d/kdump to not call save_core in the crash kernel:
> start)
> if [ -s /proc/vmcoreXXX ]; then
> save_core
> )
>
> -Cliff
> --
> Cliff Wickman
> SGI
> cpw@sgi.com
> (651) 683-3824
>
> --
> Crash-utility mailing list
> Crash-utility@redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Olaf Hering 02-10-2011 01:13 PM

How do debug the kdump kernel using a Xen dump-core file?
 
On Thu, Feb 10, Dave Anderson wrote:

> Hmmm. I've never tried it, but because of the relocation, live access
> won't work. But you *may* be able to coerce it into coming up by forcing
> the phys_base to whatever it is:
>
> # crash --machdep phys_base=<physical-base-address>
>
> BTW, that's with x86_64 only.

That did the trick. Thanks.
After looking for a line like this in the normal kernel:

Reserving 128MB of memory at 32MB for crashkernel (System RAM: 1024MB)

crash --machdep phys_base=32M -s
/boot/System.map-2.6.32.27-21-default
/boot/vmlinux-2.6.32.27-21-default.gz
/var/lib/xen/dump/sles11_4/2011-0210-1335.40-sles11_4.3.core


Olaf

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility


All times are GMT. The time now is 11:56 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.