Confirmed users
421
edits
(Added information on the crash reporter client rewrite) |
(Added information about the minidump storage for crash annotations project) |
||
| Line 7: | Line 7: | ||
= Client-side tools and components = | = Client-side tools and components = | ||
== | == Exception handlers == | ||
== | == Minidump writers == | ||
== | == Crash monitor == | ||
== | == Minidump storage for crash annotations == | ||
== crash reporter client == | Status: not started<br> | ||
Developer(s):<br> | |||
Source code:<br> | |||
Original source code:<br> | |||
* https://hg.mozilla.org/mozilla-central/file/6f0a8dddad51/toolkit/crashreporter/ | |||
Bugs:<br> | |||
* {{bug|1759682}} | |||
=== Description === | |||
Crash annotations are a set of pieces of information that accompany a | |||
minidump to form a complete crash report. Crash annotations contain critical | |||
information such as the Firefox version and build ID but also ancillary | |||
information such as how much memory a process was using, or a user-provided | |||
string associate with a failed assertion that crashed the process. | |||
Currently crash annotations are stored in a JSON file (with an .extra suffix) | |||
that is sent along with the minidump to Socorro. Depending on the type of | |||
crash this file is either written out by the exception handler (if the main | |||
process crashed) or the contents of the annotations are forwarded to the main | |||
process which then writes them out (in the case of a child process crash). | |||
=== Rationale === | |||
There are several issues with the current system: | |||
* Having a separate file adds significant complexity both when submitting and processing crash reports, and also additional failure modes (like only one of the files being present in the report) | |||
* The file needs to be written out after the minidump has been written out, adding complexity to the exception handler | |||
* For child processes an extra IPC channel is needed to send the annotations | |||
* Setting annotations is a relatively expensive process | |||
* Some annotations are synthesized at crash time and dealt with ad-hoc code, there is no unified mechanism to handle them together with the others | |||
=== Plan === | |||
Annotations should be stored within the minidump and read directly from the | |||
crashed process. This requires several steps: | |||
* The crash annotations interface in Gecko needs to be modified so that a process can flag where its annotations are stored | |||
* The crash-time annotations need to be removed and replaced with regular ones | |||
* We need to add a mechanism to separate between the process' annotations and global ones that must be included in every crash | |||
* Minidump writers need to be modified to identify where the annotations are stored in a process memory, read them and write them out within the minidump | |||
* Finally teach the stackwalker tool to look for the annotations in the minidump and print them out | |||
== Crash reporter client == | |||
Status: not started<br> | Status: not started<br> | ||