Crash reporting overhaul: Difference between revisions

Jump to navigation Jump to search
Added information about the minidump writers
m (Updated the rust-minidump links)
(Added information about the minidump writers)
Line 10: Line 10:


== Minidump writers ==
== Minidump writers ==
Status: in progress<br>
Developer(s): gsvelto, msirringhaus (contributor) and other external contributors<br>
Source code:<br>
* https://github.com/rust-minidump/minidump-writer
Original source code:<br>
* https://searchfox.org/mozilla-central/source/toolkit/crashreporter/breakpad-client/
Bugs:<br>
* {{bug|1620998}}
=== Description ===
Minidump writers are at the core of the crash reporting infrastructure. They
extract information about a crashed process - such as register contents, thread
states & stack, interesting memory areas, list of memory mappings, etc... - and
store them in a file following Microsoft minidump format plus a few extensions
commonly used extensions. We currently leverage Breakpad's minidump writers for
generating minidumps across all platforms.
=== Rationale ===
The minidump writers manipulate the memory of a crashed process and have
several complex failure modes. Breakpad's writers have several issues that are
difficult to address:
* They are not very robust, sometimes failing to generate a minidump at all in cases where a partial one could be made
* Their error-reporting is almost non-existent. This makes it impossible to diagnose issues when they're encountered in the wild
* The existing code has limited test coverage and extending it is complex
* They are designed to support both out-of-process and in-process generation, this adds a significant amount of complexity we don't need
* The requirement to write in-process minidumps forces the code to do bare syscalls and avoid memory allocations, this heavily contributes to the existing code's complexity
* They are tightly bound to Breakpad's architecture making it impossible to re-use them in other contexts
* The way they communicate with other processes when doing out-of-process crash generation is highly platform-specific, not hidden behind an abstraction and brittle (some code relies on timeouts not to cause deadlocks!)
Because of the above we'd like to rewrite the writers in Rust using a more modular architecture, extensive error-reporting and full test coverage.
=== Plan ===
The rewrite calls for the following to be done:
* We will prepare a crate which will have the only purpose of offering minidump writing
* We will re-implement the writers starting from Breakpad's code one platform at a time starting with Linux, then Windows, then macOS
* We will only implement out-of-process crash generation, cutting out the need for brittle in-process generation code
* Functionality to synthesize minidumps will be provided to facilitate testing
* Non-Microsoft extensions will be documented and provided with test-coverage, possibly integrating them with rust-minidump so that we'd have a single source of truth WRT them


== Crash monitor ==
== Crash monitor ==
Confirmed users
423

edits

Navigation menu