Date: Tue, 18 Mar 2014 09:54:22 +1030 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: Ryan Stone <rysto32@gmail.com> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Extracting user stack traces from a crash dump Message-ID: <3E530A84-432D-40DE-A229-6E3DFCA1FA14@gsoft.com.au> In-Reply-To: <CAFMmRNxcgoyhrZFWnYH6q12Eh4M-KmVt%2Bx8GK91VsLebWaoP4Q@mail.gmail.com> References: <21FD6187-811C-48D9-BAC8-105F54F39989@gsoft.com.au> <CAFMmRNxcgoyhrZFWnYH6q12Eh4M-KmVt%2Bx8GK91VsLebWaoP4Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_4EB32AC7-AC84-490A-8A67-5207FA555653 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 17 Mar 2014, at 22:32, Ryan Stone <rysto32@gmail.com> wrote: > On Mon, Mar 17, 2014 at 5:41 AM, Daniel O'Connor = <doconnor@gsoft.com.au> wrote: >> Hi, >> Does anyone know of a tool that can extract userland stack traces = from a crash dump? >> I did some googling and the closest I can see is to use DDB, but = obviously that is only possible when I can access the console. >>=20 >> Is it something procstat should/could be extended to do? >=20 > If I'm understanding you correctly, you have a kernel core and you > want to see the backtrace in *userland*? e.g. >=20 > malloc() > strdup() > main() Yep. > That's not possible with a minidump. A minidump does not include > memory for any userland processes, only the kernel, so you can't see > what any userland threads were doing at the time of the crash. You > could find the trap frame for the thread at the bottom of the kernel > stack and map the instruction pointer for the top userland frame, but > that's it. OK, thanks. I'll think of another way then! Do you know how to script DDB to dump userland stack frames on panic? I = had a go with... sudo ddb script 'kdb.enter.panic=3Dtextdump set; capture on; show = allpcpu; bt;ps; alltrace/u; show alllocks; call doadump; reset' However that output didn't show up in /var/crash as I was hoping.. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --Apple-Mail=_4EB32AC7-AC84-490A-8A67-5207FA555653 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iD8DBQFTJ4Qm5ZPcIHs/zowRArc5AJ4gY3f0PRvG/AMp5Kj2SQk4sY1L6ACeOYK1 plsK3b3vpVUNYQW/MteEaHc= =kLIC -----END PGP SIGNATURE----- --Apple-Mail=_4EB32AC7-AC84-490A-8A67-5207FA555653--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E530A84-432D-40DE-A229-6E3DFCA1FA14>