How to get stack from every thread when doing crash dump?
From: Xin LI (delphij_at_frontfree.net)
Date: 06/23/05
- Previous message: Wilkinson, Alex: "Re: Kernel Dump"
- Next in thread: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- Reply: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- Reply: Peter Wemm: "Re: How to get stack from every thread when doing crash dump?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- text/plain attachment: patchset-howard-minidump
- application/pgp-signature attachment: stored
- Previous message: Wilkinson, Alex: "Re: Kernel Dump"
- Next in thread: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- Reply: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- Reply: Peter Wemm: "Re: How to get stack from every thread when doing crash dump?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]