Skip to content

jhammond/xbt

Repository files navigation

xbt
===

xbt is an extension to the crash utility which displays a symbolic
backtrace. It supports x86_64 kdump images. For information about the
crash utility see http://people.redhat.com/anderson/

* HOWTO
	Set XBT_MODULE_PATH to a colon separated list of directory
	hierarchies containing the unstripped kernel modules used in
	the image.

$ make
$ export XBT_MODULE_PATH="$HOME/fs/lustre-release:/usr/lib/debug/lib/modules/$(uname -r)"
$ crash /usr/lib/debug/lib/modules/.../vmlinux /var/crash/.../vmcore
crash> extend xbt.so
crash> xbt
#0
        mod NONE, name schedule, RIP 0xffffffff814eb4d2
        frame start 0xffff8801361cf770, end 0xffff8801361cf788, *base 0xffff8801361cf8e0

#1
        mod NONE, name crash_save_cpu, RIP 0xffffffff810b8995
        frame start 0xffff8801361cf788, end 0xffff8801361cf928, *base 0xffff8801960de400

#2
        mod NONE, name machine_kexec, RIP 0xffffffff81031f7b
        frame start 0xffff8801361cf928, end 0xffff8801361cf988, *base 0xffff8801361cfa50

#3
        mod NONE, name crash_kexec, RIP 0xffffffff810b8c22
        frame start 0xffff8801361cf988, end 0xffff8801361cfa58, *base 0xffff8801361cfad0
        XBT_RBX = 0
        XBT_R12 = ffff8801361cf990
        XBT_R13 = ffff8801361d0870
        XBT_R14 = 0

#4
        mod NONE, name panic, RIP 0xffffffff814eae18
        frame start 0xffff8801361cfa58, end 0xffff8801361cfad8, *base 0xffff8801361cfaf0

#5
        mod libcfs, name lbug_with_loc, RIP 0xffffffffa02d0eeb
        frame start 0xffff8801361cfad8, end 0xffff8801361cfaf8, *base 0xffff8801361cfb40
        XBT_RBX = ffffffffa0bfe1c0
        msgdata = ffffffffa0bfe1c0

#6
        mod lod, name lod_attr_set, RIP 0xffffffffa0be956a
        frame start 0xffff8801361cfaf8, end 0xffff8801361cfb48, *base 0xffff8801361cfb90
        XBT_RBX = ffff880122c65680

#7
        mod mdd, name mdd_attr_set_internal, RIP 0xffffffffa097a411
        frame start 0xffff8801361cfb48, end 0xffff8801361cfb98, *base 0xffff8801361cfc10
        XBT_RBX = ffff88011fbfd7f0
        XBT_R12 = 10
        XBT_R13 = ffff880136197c80
        XBT_R14 = ffff8801361d0870
        XBT_R15 = 1
        env = ffff880136197c80
        obj = ffff88011fbfd7f0
        attr = ffff8801361d0870
        &handle = ffff8801361cfb50
        handle = ffff8801361cfc00 ...
        needacl = 1
#8
        mod mdd, name mdd_attr_set, RIP 0xffffffffa097d6ea
        frame start 0xffff8801361cfb98, end 0xffff8801361cfc18, *base 0xffff8801361cfc60
        XBT_RBX = ffff8801361d0800
        XBT_R12 = ffff880136197c80
        XBT_R13 = 0
        XBT_R14 = ffff880135b57c00
        XBT_R15 = ffff8801361cfc10
        env = 0
        &obj = ffff8801361cfbc8
        obj = 0 ...
        ma = ffff8801361d0800
        &mdd_obj = ffff8801361cfbc8
        mdd_obj = 0 ...
xbt: var mdd, offset 27588 has no location
        &handle = ffff8801361cfbd0
        handle = ffff88011fbfd7f0 ...
        la_copy = ffff880136197cf0
        la = ffff8801361d0818

#9
        mod mdt, name mdt_attr_set, RIP 0xffffffffa0b14498
        frame start 0xffff8801361cfc18, end 0xffff8801361cfc68, *base 0xffff8801361cfcd0
        XBT_RBX = ffff88011d323358
        XBT_R12 = ffff8801361d1000
        XBT_R13 = ffff8801361d1148
        XBT_R14 = 0
        XBT_R15 = ffff8801361d1010
        info = ffff8801361d1000
        mo = ffff88011d323358
        ma = ffff8801361d1148
        lh = ffff8801361d1010
        do_vbr = 30

#10
        mod mdt, name mdt_reint_setattr, RIP 0xffffffffa0b14d2c
        frame start 0xffff8801361cfc68, end 0xffff8801361cfcd8, *base 0xffff8801361cfcf0
        XBT_RBX = ffff88011d323358
        XBT_R12 = ffff88011c513000
        XBT_R13 = ffff8801361d1148
        XBT_R14 = 0
        XBT_R15 = ffff8801361cfcd0
        info = ffff88011d323358
        ma = ffff88011d3234a0
        rr = ffff88011d3235a0
        req = ffff8801361d1148
        med = ffff88012089dc70
        mo = ffff88011c513000
        &repbody = ffff8801361cfc88
        repbody = ffff8801361d1000 ...
        som_au = 0
xbt: var rc2, offset 91b5b has no location
...


* Make should just work on CentOS 6.3 if you have the following RPMs
  installed:
	crash
	crash-devel
	elfutils
	elfutils-libs
	elfutils-devel
	elfutils-libelf
	elfutils-libelf-devel

* Tested with:
	crash-6.1.0-1.el6.x86_64
	crash-devel-6.1.0-1.el6.x86_64
	crash-gcore-command-1.0-3.el6.x86_64
	crash-trace-command-1.0-4.el6.x86_64
	elfutils-0.152-1.el6.x86_64
	elfutils-libelf-0.152-1.el6.x86_64
	elfutils-devel-0.152-1.el6.x86_64
	elfutils-libelf-devel-0.152-1.el6.x86_64
	elfutils-libs-0.152-1.el6.x86_64

* TODOs
	Use kernel debuginfo too.

	Crash may already have loaded debuginfo (partial?) for certain
	modules can that be reused?

	Use build-ids to locate and/or validate debuginfo.

	Improve visual formatting.

	Add option to disable register restoring.

	Add options to select specific frames, objects, variables.

	Improve display of composite objects.

	Add a crash-less mode.  You build and distribute modules.
	Someone else uses your modules and sends you the output of 'bt
	-fs' , you parse it using code to be written (the crash-less
	driver), and existing code creates a symbolic trace from that.

* FIXMEs
	Lots.

* Portions based on the 'bt' backend x86_64_low_bugdet_back_trace()
  from crash-7.0.0/x86_64.c.

* Portions based on readelf.c from the elfutils source (which is not
  the binutils readelf that you know and love, but was much better
  suited for these purposes).

* Uses list.h from some version of linux.

* Maybe there's an easier way to do this.  Probably there are lots of
  bugs.  In either case please send the emails to:

	John L. Hammond
	[email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published