Re: Kernel Dump

From: Peter Wemm (peter_at_wemm.org)
Date: 06/23/05

  • Next message: Wilkinson, Alex: "Re: Kernel Dump"
    To: freebsd-arch@freebsd.org, Sue Howard <howardsue@gmail.com>
    Date: Wed, 22 Jun 2005 23:23:25 -0700
    
    

    On Thursday 16 June 2005 06:22 am, Sue Howard wrote:
    > Hi,
    >
    > I find there are three states of kernel dump support currently.
    > 1. ARM and PowerPC.
    > Not supported yet.
    > 2. I386, AMD64, Alpha.
    > The dump file contains dump header plus the raw physical memory
    > image. The code in dump_machdep.c is almost same.
    > 3. IA64, SPARC
    > The dump file has private header besides dump header and raw physical
    > memory image. The code is ready for importing a MI dump interface.
    >
    > I want to understand what IA64 and SPARC are different than i386.
    > What is the private header is for? Is it tech problem or historic
    > problem? Is it possible to remove the private header in order to make
    > IA64 and SPARC share the dump code of i386?

    The private header is to standardize the way savecore(8) finds the dump
    images and recovers them.

    IA64 and Sparc systems usually had sparse memory configurations and the
    old raw format didn't have any facility to avoid storing holes.

    Suppose you had a machine where 1GB of ram appeared at physical adress
    0, and the other 1GB of ram appeared at physical address 7GB. The i386
    and alpha dump method would require 8GB of dump file and swap device
    usage to record those 2 x 1GB chunks of data.

    IA64 uses an ELF "coredump" format to record the memory segments that
    are scattered around its address space. It is flexible and descriptive
    enough to handle this.

    sparc64 uses its own custom format to achieve the same thing.

    I've just rewritten the AMD64 crashdump support to use ELF like ia64.
    In fact, I reused most of the ia64 code. We ran into serious problems
    at work, first on the amd64 platform and now also the i386 platform.
    The problem is that x86 machines are increasinly having memory holes.
    The simplistic dump code has no way to skip the memory hole and tries
    to dump things like the AGP frame buffer, pci card MMIO space,
    PCI-Express configuration space (this means accessing hardware!!) and
    so on.

    We have already switched to ELF crashdump support at work (yahoo) on
    amd64 and will be backporting to i386 and even RELENG_4 (PAE systems
    expose the same problem on this hardware).

    doghouse# file /var/crash/vmcore.1
    /var/crash/vmcore.1: ELF 64-bit LSB core file AMD x86-64, invalid
    version (embedded)
    doghouse# objdump --headers /var/crash/vmcore.1
    Sections:
    Idx Name Size VMA LMA File off Algn
      0 load0 000a0000 0000000000 0000000000 00001000 2**12
                 CONTENTS, ALLOC, LOAD, READONLY
      1 load1 7c1c0000 0000100000 0000100000 000a1000 2**12
                 CONTENTS, ALLOC, LOAD, READONLY
      2 load2 00100000 007ff00000 007ff00000 7c261000 2**12
                 CONTENTS, ALLOC, LOAD, READONLY

    It doesn't mean much, but at least the standard tools let you see inside
    the crash dump. libkvm and gdb support is trivial.

    Anyway, this isn't a new problem for i386 either. I have one older
    machine in a server room that has 6GB of ram. 2GB at address 0-2GB, a
    2GB pci hotplug hole, and 4GB at 4-8GB. This 5 year old machine does
    nasty things if you crash it with dumps enabled.

    BTW: elf core dumps are really simple. They're two headers (elf and
    program headers) and then the memory contents. There isn't much to it.

    > In my understanding, it should be possible. Since /dev/mem should be
    > a physic memory image.

    Anyway, if anything, the i386 code is going away. Machines with sparse
    memory are becoming more common.

    > Howard

    -- 
    Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
    "All of this is for nothing if we don't go to the stars" - JMS/B5
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Wilkinson, Alex: "Re: Kernel Dump"

    Relevant Pages

    • Problems installing 5.1A on XP1000
      ... The drive I'm attempting an install to is an IBM ... 640 MBytes of System Memory ... isa0 at pci0 ... DUMP: Warning: no disk available for dump. ...
      (Tru64-UNIX-Managers)
    • Booting 4.0 on XP1000
      ... available memory from 0x2ef8000 to 0x7ffec000 ... isp0 at pci1 slot 6 ... gpc0 at isa0 ... DUMP: No primary swap, no explicit dumpdev. ...
      (Tru64-UNIX-Managers)
    • Re: LIVEDUMP
      ... LIVEDUMP came about as a side-effect of analyzing ... snapshot of memory is taken in a reserved memory area). ... happens if we analyze LIVE memory instead of a copy of it. ... medium systems had 0DM long before that (dump memory for mix-id 0, ...
      (comp.sys.unisys)
    • SUMMARY: Problems installing 5.1A on XP1000
      ... The drive I'm attempting an install to is an IBM ... 640 MBytes of System Memory ... isa0 at pci0 ... DUMP: Warning: no disk available for dump. ...
      (Tru64-UNIX-Managers)
    • RE: Hangs during "dump" with 6.0 and current ports
      ... Due to lack of memory I had added an additional swap-file via mdconfig 3 ... filesystem with snapshots active and the swapfile is in the same filesystem ... Hangs during "dump" with 6.0 and current ports ... Maybe you need some more swap space? ...
      (freebsd-questions)