Extracting user stack traces from a crash dump
Daniel O'Connor
doconnor at gsoft.com.au
Mon Mar 17 23:24:45 UTC 2014
On 17 Mar 2014, at 22:32, Ryan Stone <rysto32 at gmail.com> wrote:
> On Mon, Mar 17, 2014 at 5:41 AM, Daniel O'Connor <doconnor at 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.
>>
>> Is it something procstat should/could be extended to do?
>
> If I'm understanding you correctly, you have a kernel core and you
> want to see the backtrace in *userland*? e.g.
>
> 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=textdump 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20140318/57caf194/attachment.sig>
More information about the freebsd-hackers
mailing list