Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(989)

Issue 32003: Let x86 stackwalker scan stack in cases where program evaluation fails (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 1 month ago by Ted Mielczarek
Modified:
15 years, 1 month ago
Reviewers:
Mark Mentovai
Base URL:
http://google-breakpad.googlecode.com/svn/trunk/
Visibility:
Public.

Description

In Mozilla's crash reports, it's not uncommon to have crashes with a completely
bogus instruction pointer, called from code without a useful frame pointer. We
see this a lot from third-party code (plugins etc). Currently, if there's no
call frame info and dereferencing %ebp fails in program evaluation, the stack
walker gives up. This results in some really terrible stacks, like this one,
which simply shows "0x0" as the stack for the crashing thread:
http://crash-stats.mozilla.com/report/index/d6eddf4e-a71e-4efe-b796-924112090928

Jeff Muizelaar added some logic to the x86 stackwalker to scan the stack in
these cases, which gets us a more useful stack in this case. I added some other
logic (the InstructionAddressSeemsValid bit) which doesn't seem to help much
here, since we're generally in modules without symbols anyway. Jeff also added a
"trust" field to StackFrameX86, so we could identify how much the stack walker
is guessing in each case.

The stack produced in cases like these isn't perfect, but it gives us something,
as opposed to the nothing we currently have. You can follow our train of thought
here:
https://bugzilla.mozilla.org/show_bug.cgi?id=519616
Additionally, I ran minidump_stackwalk on a sampling of dumps from our
production crash reporting system, and diffed the output with/without this
patch. The output is available here:
http://people.mozilla.org/~tmielczarek/breakpad-stacks/

Mark, since you're responsible for the entire x86 stackwalker, could you take a
look at this?

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
src/google_breakpad/processor/stack_frame_cpu.h View 2 chunks +19 lines, -1 line 1 comment Download
src/google_breakpad/processor/stackwalker.h View 2 chunks +11 lines, -0 lines 0 comments Download
src/processor/minidump_stackwalk.cc View 1 chunk +22 lines, -0 lines 0 comments Download
src/processor/stackwalker.cc View 1 chunk +32 lines, -0 lines 4 comments Download
src/processor/stackwalker_x86.cc View 7 chunks +43 lines, -2 lines 2 comments Download
src/processor/testdata/minidump2.stackwalk.out View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 3
Ted Mielczarek
15 years, 1 month ago #1
Mark Mentovai
Some info is better than no info. I like where this is headed. Most of ...
15 years, 1 month ago #2
Ted Mielczarek
15 years, 1 month ago #3
On 2009/10/08 13:33:58, mark wrote:
> http://breakpad.appspot.com/32003/diff/1/3#newcode380
> Line 380: // TODO(mmentovai): The return-address check can be made even
> See my TODO here?  It seems like now that we have Instruction
AddressSeemsValid,
> we can resolve this one too.
> 
> Actually, since this whole section is so similar to the new code you're adding
> above, it seems like there should be a way for the two to share.  Would that
be
> possible?

I factored those both out into a StackwalkerX86::ScanForReturnAddress method,
which resolves the TODO along the way. Fixed all the other nits and committed at
r409. Thanks for the review!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted