Closed Bug 1310314 Opened 8 years ago Closed 2 years ago

Frame pointers can make Breakpad's stack unwinding worse

Categories

(Socorro :: Backend, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: jld, Unassigned)

References

Details

Bug 1299581 explains a problem we ran into over in sandboxing-land, and bug 1310116 is a new instance of it that just got filed: given a Firefox build with frame pointers (e.g., a Nightly) and system libraries without frame pointers (this is almost always the case) a crash in the system libraries which hasn't overwritten the frame pointer register will lose the innermost frame from Firefox. In constrast, if there were no frame pointers and Breakpad had to do stack scanning, it would (probably) find that frame. For example, in this case: _pt_root (in libpthread) calls WaitPidDaemonThread (in NSPR) which calls waitpid (in libc/libpthread) which crashes; what we want is the call site in WaitPidDaemonThread, but what we get is a bug titled “Crash in _pt_root”. Caveats: this use case probably isn't common, and if we can do client-side stack walking (bug 1280469) and use a precise EH-based unwinder then none of this will matter.
Flags: needinfo?(ted)
This is indeed unfortunate, and I don't have a good solution. Minidumps in general are designed for a system where you have frame pointers everywhere, or at least can be relatively assured that you have frame pointers for system libraries. On Win64 Microsoft makes system DLLs available via their symbol server, so the equivalent situation there tends to work OK because you can get the EH info from the system DLLs. It would be good to make sure that our client side stackwalking work does the right thing on 64-bit Linux. There's special code there to handle Win64, but not Linux.
Flags: needinfo?(ted)
This can also happen in non-sandbox-related cases: e.g., bug 1509813, where we passed a null pointer to strcmp and lost the frame that would have told us which strcmp call it was.

I don't know offhand if this is still a problem or not. If it is, then someone who can reproduce it or knows more about the specifics should write up an issue in rust-minidump.

Closing this out.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INACTIVE

To provide further information this is not a problem anymore, mostly because we extract unwinding information from Linux system libraries so we don't need to look at frame pointers anymore in the vast majority of the cases.

You need to log in before you can comment on or make changes to this bug.