How to get stack from every thread when doing crash dump?

From: Xin LI (delphij_at_frontfree.net)
Date: 06/23/05

  • Next message: David O'Brien: "Re: Kernel Dump"
    Date: Thu, 23 Jun 2005 18:20:24 +0800
    To: freebsd-arch@FreeBSD.org
    
    
    
    

    Dear folks,

    Recently I was working with a friend to figure out whether we can do more on
    our crashdump mechanism, as dumping the whole core memory is a painful
    process when you have some gigabytes of RAM. Finally, we have implemented
    an experimental mini-dump on our local development tree, and adopted some
    IA64 MD dump code to provide a MI interface to handle dumping. A proof-of-
    concept patchset is included (see below). As a side note,

    One problem with the mini-dump is that, since the mini-dump utilizes:
            dump_write((char *)curthread->td_kstack, curthread->td_kstack_pages * PAGE_SIZE);

    To write out the stack, and at the point before exception.S, curthread has
    been changed, we can only obtain the stack from the current thread, which
    may not be enough for analyzing the backtrace. What can we do to improve
    this situation?

    Thanks in advance!

    --------------------------------------------------------------------------
    BTW: A proof-of-concept patchset is in the attachment, which implements
    mini-dump, and adopted the MD code from IA64 dump by turning them to MI
    interfaces. At this time, the idea that peter@ has commented this morning
    has not implemented (yet), and we need to do more style cleanups on the
    code.

    The patchset is HIGHLY EXPERIMENTAL so be warned that there is glitches,
    and may boom your box :-) In order to use it, you need to patch your source
    tree with the patchset, and rebuild the kernel as well as savecore(8) and
    kgdb related stuff, a full make world/kernel procedure is recommended.

    To use minidump you need to specify "-t 1" to kgdb.
    -------------------------------------------------------------------------

    Cheers,

    -- 
    Xin LI <delphij frontfree net>	http://www.delphij.net/
    See complete headers for GPG key and other information.
    
    

    
    




  • Next message: David O'Brien: "Re: Kernel Dump"