[Fwd: [Crash-utility] crash warnings]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Begin Message ---
Badari Pulavarty wrote:

> On Thu, 2006-04-27 at 13:21 -0400, Dave Anderson wrote:
> > Badari Pulavarty wrote:
> >
> > > On Thu, 2006-04-27 at 12:21 -0400, Dave Anderson wrote:
> > > > Badari,
> > > >
> > > > What happens when you disassemble sys_read() on a live
> > > > system running that particular kernel?  Use "dis sys_read" as the
> > > > crash command.
> > > >
> > > > Thanks,
> > > >    Dave
> > >
> > > Dave,
> > >
> > > crash shows wrong dis-assembly for even live machine...
> > >
> > > Thanks,
> > > Badari
> > >
> > > elm3a242:~/crash-4.0-2.23 # ./crash /usr/src/linux/vmlinux
> > >
> > > crash 4.0-2.23
> > > Copyright (C) 2002, 2003, 2004, 2005, 2006  Red Hat, Inc.
> > > Copyright (C) 2004, 2005, 2006  IBM Corporation
> > > Copyright (C) 1999-2006  Hewlett-Packard Co
> > > Copyright (C) 2005  Fujitsu Limited
> > > Copyright (C) 2005  NEC Corporation
> > > Copyright (C) 1999, 2002  Silicon Graphics, Inc.
> > > Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
> > > This program is free software, covered by the GNU General Public
> > > License,
> > > and you are welcome to change it and/or distribute copies of it under
> > > certain conditions.  Enter "help copying" to see the conditions.
> > > This program has absolutely no warranty.  Enter "help warranty" for
> > > details.
> > >
> > > GNU gdb 6.1
> > > Copyright 2004 Free Software Foundation, Inc.
> > > GDB is free software, covered by the GNU General Public License, and you
> > > are
> > > welcome to change it and/or distribute copies of it under certain
> > > conditions.
> > > Type "show copying" to see the conditions.
> > > There is absolutely no warranty for GDB.  Type "show warranty" for
> > > details.
> > > This GDB was configured as "x86_64-unknown-linux-gnu"...
> > >
> > >   SYSTEM MAP: /usr/src/linux/System.map
> > > DEBUG KERNEL: /usr/src/linux/vmlinux (2.6.16-20-smp)
> >
> > Strange -- why is it even using /usr/src/linux/System.map?
> > You didn't enter it on the boot command line, and so I believe
> > the only way that it would possibly be set would be by the
> > find_booted_system_map() function -- which only would be
> > called by match_proc_version() when the vmlinux file doesn't
> > match the live system.
> >
> > What happens when you do this:
> >
> >   $ strings /usr/src/linux/vmlinux | grep "Linux ver"
> >
> >   $ cat /proc/version
> >
> > Are the outputs identical?
>
> Long sad story :(
>
> I am testing one of the distro build (SLES10 Beta) kernels.
> Since there is no (easy) way to get debug-info kernel for each and
> every beta kernel, I have been asked to build my own kernel from
> exact sources and config. I used source.rpm and default config
> files (only change is -g). But I am running distro shipped kernel
> instead of currently built vmlinux.
>
> elm3a242:~/crash-4.0-2.23 # strings /usr/src/linux/vmlinux | grep "Linux
> ver"
> Linux version 2.6.16-20-smp (geeko@buildhost) (gcc version 4.1.0 (SUSE
> Linux)) #1 SMP Mon Apr 24 08:19:31 PDT 2006
> elm3a242:~/crash-4.0-2.23 #
> elm3a242:~/crash-4.0-2.23 # cat /proc/version
> Linux version 2.6.16-20-smp (geeko@buildhost) (gcc version 4.1.0 (SUSE
> Linux)) #1 SMP Mon Apr 10 04:51:13 UTC 2006
>
> Thanks,
> Badari

OK, so as I understand it, neither the System.map nor the vmlinux symbol
sets, most notably the text addresses found within them, would necessarily
match the text in the vmcore -- which comes from the distro's vmlinux
that was built without -g.  Using -g has been shown to "shift" text.

I used to pull this kind of bait-and-switch with Red Hat's AS2.1,
whose distro was built without -g.  So I would rebuild the same kernel's
src.rpm, and use the newly-built vmlinux (call it vmlinux.dbg) like this:

$ crash vmlinux.dbg /boot/System.map [vmcore]

In this case, the vmlinux.dbg file won't match the live system or vmcore,
but by explicitly using the "/boot/System.map" associated with the
original non-g built vmlinux, things would work.

In your case, it's defaulting to the /usr/src/linux/System.map, which is
associated with the vmlinux that you built with -g.

Presuming you have the /boot/System.map associated with the original
distro's vmlinux file (the kernel that's running), what happens if you do
this:

$ crash vmlinux /boot/System.map [vmcore]

Dave



--- End Message ---

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux