<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1528" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left>Dave Anderson wrote: </DIV>
<BLOCKQUOTE TYPE="CITE">"Sampathkumar, Kishore (STSD)" wrote: 
  <BLOCKQUOTE TYPE="CITE"><SPAN class=233200414-17042006><FONT 
    face="Courier New"><FONT size=-1>Hi,</SPAN><SPAN 
    class=233200414-17042006></SPAN><SPAN class=233200414-17042006>I have been 
    working on back-porting kexec/kdump functionality from 2.6.13 vanilla kernel 
    to RHEL4, Update 2 kernel (version 2.6.9-22).</SPAN><SPAN 
    class=233200414-17042006></SPAN><SPAN class=233200414-17042006>As part of 
    that, when I try to invoke "crash" on a vmcore generated, I get the 
    following error in "crash" tool:</SPAN><SPAN 
    class=233200414-17042006></SPAN><SPAN class=233200414-17042006>[root 
    crash-4.0-2.23]# ./crash /boot/System.map-2.6.9-kdump-1 
    /usr/src/redhat/BUILD/kernel-2.6.9-kdump-1/linux- 2.6.9/vmlinux 
    /root/vmcore</SPAN><SPAN class=233200414-17042006>crash 
    4.0-2.23</FONT></FONT> <BR><FONT face="Courier New"><FONT size=-1>Copyright 
    (C) 2002, 2003, 2004, 2005, 2006  Red Hat, Inc.</FONT></FONT> <BR><FONT 
    face="Courier New"><FONT size=-1>Copyright (C) 2004, 2005, 2006  IBM 
    Corporation</FONT></FONT> <BR><FONT face="Courier New"><FONT 
    size=-1>Copyright (C) 1999-2006  Hewlett-Packard Co</FONT></FONT> 
    <BR><FONT face="Courier New"><FONT size=-1>Copyright (C) 2005  Fujitsu 
    Limited</FONT></FONT> <BR><FONT face="Courier New"><FONT size=-1>Copyright 
    (C) 2005  NEC Corporation</FONT></FONT> <BR><FONT 
    face="Courier New"><FONT size=-1>Copyright (C) 1999, 2002  Silicon 
    Graphics, Inc.</FONT></FONT> <BR><FONT face="Courier New"><FONT 
    size=-1>Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, 
    Inc.</FONT></FONT> <BR><FONT face="Courier New"><FONT size=-1>This program 
    is free software, covered by the GNU General Public License,</FONT></FONT> 
    <BR><FONT face="Courier New"><FONT size=-1>and you are welcome to change it 
    and/or distribute copies of it under</FONT></FONT> <BR><FONT 
    face="Courier New"><FONT size=-1>certain conditions.  Enter "help 
    copying" to see the conditions.</FONT></FONT> <BR><FONT 
    face="Courier New"><FONT size=-1>This program has absolutely no 
    warranty.  Enter "help warranty" for details.</SPAN><SPAN 
    class=233200414-17042006>GNU gdb 6.1</FONT></FONT> <BR><FONT 
    face="Courier New"><FONT size=-1>Copyright 2004 Free Software Foundation, 
    Inc.</FONT></FONT> <BR><FONT face="Courier New"><FONT size=-1>GDB is free 
    software, covered by the GNU General Public License, and you 
    are</FONT></FONT> <BR><FONT face="Courier New"><FONT size=-1>welcome to 
    change it and/or distribute copies of it under certain 
    conditions.</FONT></FONT> <BR><FONT face="Courier New"><FONT size=-1>Type 
    "show copying" to see the conditions.</FONT></FONT> <BR><FONT 
    face="Courier New"><FONT size=-1>There is absolutely no warranty for 
    GDB.  Type "show warranty" for details.</FONT></FONT> <BR><FONT 
    face="Courier New"><FONT size=-1>This GDB was configured as 
    "x86_64-unknown-linux-gnu"...</SPAN><SPAN class=233200414-17042006>crash: 
    read error: kernel virtual address: ffffffff813a8200  type: 
    "xtime"</SPAN><SPAN class=233200414-17042006><SPAN 
    class=233200414-17042006>[root crash-4.0-2.23]# </SPAN></SPAN><SPAN 
    class=233200414-17042006><SPAN class=233200414-17042006><SPAN 
    class=233200414-17042006>[root 
    crash-4.0-2.23]# </SPAN></SPAN></SPAN><SPAN 
    class=233200414-17042006></SPAN><SPAN class=233200414-17042006>I tried with 
    both crash-4.0-2.15 as well as crash-4.0-2.23. Same result.</SPAN><SPAN 
    class=233200414-17042006>- Should I be re-building crash as part of the 
    back-port?</SPAN><SPAN class=233200414-17042006>- Is crash 
    capable </SPAN><SPAN class=233200414-17042006>of handing vmcore's 
    generated by kdump?</SPAN><SPAN class=233200414-17042006>- Can someone 
    suggest how I can make progress to get crash to work for this?</SPAN><SPAN 
    class=233200414-17042006></SPAN><SPAN 
    class=233200414-17042006>Thanks,</SPAN><SPAN class=233200414-17042006>- 
    Kishore</FONT></FONT></SPAN> <PRE WRAP><HR width="90%" SIZE=4>--
Crash-utility mailing list
Crash-utility@redhat.com
<A href="https://www.redhat.com/mailman/listinfo/crash-utility">https://www.redhat.com/mailman/listinfo/crash-utility</A></PRE></BLOCKQUOTE>
  <P><BR><TT>Hi Sampathkumar,</TT> 
  <P><TT>First thing, presuming that the vmlinux file is associated with the 
  vmcore</TT> <BR><TT>file, take the System-map argument out of the picture -- 
  i.e, invoke the</TT> <BR><TT>session as:</TT> 
  <P><TT> $ crash -d7 vmlinux vmcore</TT> 
  <P><TT>the -d7 will display a bunch of debug data.</TT> 
  <P><TT>What looks unusual is the ffffffff813a8200 address for "xtime".  
  That</TT> <BR><TT>would seem to be too high -- except perhaps if the vmlinux 
  you're working</TT> <BR><TT>against (or maybe the unnecessary System-map) is 
  the kdump kernel loaded</TT> <BR><TT>at 16MB?</TT> 
  <P><TT>If you do this, the output should show the exact same kernels:</TT> 
  <P><TT> $ strings vmcore | grep "Linux version"</TT> 
  <P><TT> $ strings vmlinux | grep "Linux version"</TT> 
  <P><TT>Dave</TT> <BR> </P></BLOCKQUOTE><TT>Hi Kishore,</TT><TT></TT> 
<P><TT>On a RHEL4 x86_64 kernel, "xtime" is typically an address about</TT> 
<BR><TT>3-4 MB from the beginning load address of the kernel, (i.e. add</TT> 
<BR><TT>about 3-4 MB to the base virtual address of ffffffff80000000),</TT> 
<BR><TT>whereas your example shows it at about 19MB (13a8200).  Given 
that</TT> <BR><TT>the dumpfile read of ffffffff813a8200 failed, it looks as if 
the</TT> <BR><TT>physical memory region containing that address was not 
dumped,</TT> <BR><TT>which AFAICT with other kdump dumpfiles I have 
on-hand, the</TT> <BR><TT>"64MB@16MB" (or whatever size at 16MB) that is 
reserved for</TT> <BR><TT>the kdump kernel would *not* be captured in the 
/proc/vmcore</TT> <BR><TT>file.  So that kind of reinforces my suggestion 
that you are</TT> <BR><TT>perhaps using the wrong vmlinux (or System-map) 
associated with</TT> <BR><TT>the vmcore file.</TT><TT></TT> 
<P><TT>Dave</TT>  <SPAN class=232075215-18042006><FONT 
face="Courier New" color=#0000ff size=2> </FONT></SPAN></P><SPAN 
class=232075215-18042006>
<HR tabIndex=-1>

<P><SPAN class=232075215-18042006><FONT face="Courier New" color=#0000ff 
size=2>Hello Dave,</FONT></SPAN></P>
<P><SPAN class=232075215-18042006><FONT face="Courier New" color=#0000ff 
size=2>You are right on dot!</FONT></SPAN></P>
<P><SPAN class=232075215-18042006><FONT face="Courier New" color=#0000ff 
size=2>After obtaining the vmcore using kdump, I was supplying the second kernel 
(i.e., "capture" kernel as per kexec/kdump terminology) and its System-map file 
to "crash" tool, while the vmcore corresponds to the "panic'ing" kernel (i.e., 
"first" kernel as per kexec/kdump terminology).</FONT></SPAN></P>
<P><SPAN class=232075215-18042006><FONT face="Courier New" color=#0000ff 
size=2>Doing a "strings" on both the vmcore and vmlinux, as you 
suggested, immediately pointed out the blunder I was 
committing.</FONT></SPAN></P>
<P><SPAN class=232075215-18042006><FONT face="Courier New" color=#0000ff 
size=2>I tried invoking crash tool using the vmcore and the corresponding kernel 
(i.e., the first --panic'ing-- kernel): it works fine, both with crash-4.0-2.15 
as well as crash-4.0-2.23.</FONT></SPAN></P>
<P><SPAN class=232075215-18042006><FONT face="Courier New" color=#0000ff 
size=2>Thanks!</FONT></SPAN></P>
<P><SPAN class=232075215-18042006><FONT face="Courier New" color=#0000ff 
size=2>Regards,<BR>- Kishore</FONT></SPAN></SPAN></P></BODY></HTML>